Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
1993 bpr 1
!!!### language independant
23 reyssat 2
!if $votecnt<1
12479 bpr 3
  !if $wims_user!=supervisor
4
    $name_novote $name_novotecheck
5
    !exit
6
  !else
7
    $name_novote
8
  !endif
23 reyssat 9
!else
12479 bpr 10
  !if $wims_user!=supervisor
11
    !if $active<1
12
      $name_noactivevote $name_novotecheck
13
      !exit
14
    !endif
23 reyssat 15
  !endif
12479 bpr 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>
13608 bpr 38
          <td class="wims_status_$vote_status">$(name_$vote_status), $(name_$vote_option)</td>
12479 bpr 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>
7443 bpr 49
      <td>$vcnt</td>
12479 bpr 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
23 reyssat 54
&nbsp;
12479 bpr 55
      !set wims_ref_class=wims_button
56
      !href cmd=reply&job=edit&vote=$t $wims_name_change
217 bpr 57
&nbsp;
12479 bpr 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>
4142 guerimand 66
    !endif
12479 bpr 67
  </tr>
68
  !next t
69
  $table_end
5850 bpr 70
 
23 reyssat 71
!endif
72
 
73
!if $wims_user=supervisor
12479 bpr 74
  !set wims_menu_items=!append line add_vote,1,cmd=reply&job=creat\
1348 bpr 75
to $wims_menu_items
23 reyssat 76
!endif