Subversion Repositories wimsdev

Rev

Rev 13607 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !!!### language independant
  2. !if $votecnt<1
  3.   !if $wims_user!=supervisor
  4.     $name_novote $name_novotecheck
  5.     !exit
  6.   !else
  7.     $name_novote
  8.   !endif
  9. !else
  10.   !if $wims_user!=supervisor
  11.     !if $active<1
  12.       $name_noactivevote $name_novotecheck
  13.       !exit
  14.     !endif
  15.   !endif
  16.   $name_class_vote
  17.   $table_header
  18.   $table_tr<th>$wims_name_title</th><th>$name_cnt_votes</th>
  19.   <th>$wims_name_Status</th>
  20.   !if $wims_user=supervisor
  21.     <th>$wims_name_action</th>
  22.   !endif
  23.   </tr>
  24.   !for t=1 to $votecnt
  25.     !set l_=!record $t of $votedir/.votes
  26.     !distribute lines $l_ into vote_status,vote_title,vote_option,vote_show,vote_whovoteshow
  27.     !default vote_title=$name_untitled
  28.     !set vcnt=!defof vcnt in $votedir/$t.votes
  29.     !default vcnt=0
  30.     !if $wims_user!=supervisor
  31.       !if $vote_status iswordof 1 2
  32.         $table_tr
  33.         <td>
  34.         !href cmd=reply&job=read&vote=$t $vote_title
  35.         </td>
  36.         !if $vote_show>0
  37.           <td>$vcnt</td>
  38.           <td class="wims_status_$vote_status">$(name_$vote_status), $(name_$vote_option)</td>
  39.         !else
  40.           <td>&nbsp;</td>
  41.           <td>$(name_$vote_status), $(name_$vote_option)</td>
  42.         !endif
  43.         </tr>
  44.       !endif
  45.     !else
  46.       $table_tr<td>
  47.       $vote_title
  48.       </td>
  49.       <td>$vcnt</td>
  50.        <td class="small">$(name_$vote_status), $(name_$vote_option)
  51.       </td><td>
  52.       !set wims_ref_class=wims_button
  53.       !href cmd=reply&job=read&vote=$t $wims_name_Show
  54. &nbsp;
  55.       !set wims_ref_class=wims_button
  56.       !href cmd=reply&job=edit&vote=$t $wims_name_change
  57. &nbsp;
  58.       !set wims_ref_class=wims_button
  59.       !href cmd=reply&job=csv&vote=$t $wims_name_csv
  60.       !if vote_show=1 or $wims_user=supervisor
  61.         &nbsp;
  62.         !set wims_ref_class=wims_button
  63.         !href cmd=reply&job=showresult&vote=$t $name_showresult
  64.       !endif
  65.       </td>
  66.     !endif
  67.   </tr>
  68.   !next t
  69.   $table_end
  70.  
  71. !endif
  72.  
  73. !if $wims_user=supervisor
  74.   !set wims_menu_items=!append line add_vote,1,cmd=reply&job=creat\
  75. to $wims_menu_items
  76. !endif
  77.