Rev 10736 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 10736 | Rev 12479 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | !!wims_trustfile=primitives.phtml primitives/checkbox.phtml primitives/list.phtml primitives/list.phtml primitives/uservar.phtml |
6 | !!wims_trustfile=primitives.phtml primitives/checkbox.phtml primitives/list.phtml primitives/list.phtml primitives/uservar.phtml |
7 | !!wims_readable=wims_read_parm noprint serial prim parmcnt |
7 | !!wims_readable=wims_read_parm noprint serial prim parmcnt |
8 | !!wims_writable=serial prim parms wims_read_parm |
8 | !!wims_writable=serial prim parms wims_read_parm |
9 | 9 | ||
10 | !if $wims_class=$empty or $wims_user=$empty |
10 | !if $wims_class=$empty or $wims_user=$empty |
11 | error=not_class |
11 | error=not_class |
12 | !exit |
12 | !exit |
13 | !endif |
13 | !endif |
14 | !if $seq!= |
14 | !if $seq!= |
15 | !set wims_sequence=$seq |
15 | !set wims_sequence=$seq |
16 | !endif |
16 | !endif |
17 | !read adm/lang/date.phtml.$moduclass_lang |
17 | !read adm/lang/date.phtml.$moduclass_lang |
18 | limit_textarea=600 |
18 | limit_textarea=600 |
19 | 19 | ||
20 | wims_nw=votedir Votedir userdef vote Vote job empty |
20 | wims_nw=votedir Votedir userdef vote Vote job empty |
Line 27... | Line 27... | ||
27 | 27 | ||
28 | !bound vote between integer 1 and $max_votes default 0 |
28 | !bound vote between integer 1 and $max_votes default 0 |
29 | 29 | ||
30 | 30 | ||
31 | !default gstep=0 |
31 | !default gstep=0 |
32 | 32 | ||
33 | vote_class=!defof sharing_vote in wimshome/log/classes/$wims_class/neighbors |
33 | vote_class=!defof sharing_vote in wimshome/log/classes/$wims_class/neighbors |
34 | !default vote_class=$wims_class |
34 | !default vote_class=$wims_class |
35 | !default wims_superclass=$wims_class |
35 | !default wims_superclass=$wims_class |
36 | !if $wims_superclass != $wims_class |
36 | !if $wims_superclass != $wims_class |
37 | Votevar=!replace internal $wims_superclass/ by $ in $vote_class |
37 | Votevar=!replace internal $wims_superclass/ by $ in $vote_class |
38 | Votevar=!translate internal / to _ in $Votevar |
38 | Votevar=!translate internal / to _ in $Votevar |
39 | Vote=$(Votevar)_$vote |
39 | Vote=$(Votevar)_$vote |
40 | !else |
40 | !else |
41 | Vote=$vote |
41 | Vote=$vote |
42 | Votevar= |
42 | Votevar= |
43 | !endif |
43 | !endif |
44 | 44 | ||
45 | !if $rEg!=$empty |
45 | !if $rEg!=$empty |
46 | job=reg |
46 | job=reg |
47 | rEg= |
47 | rEg= |
48 | !endif |
48 | !endif |
49 | !if $abandon!=$empty |
49 | !if $abandon!=$empty |
50 | !!!FIXME edit or home |
50 | !!!FIXME edit or home |
51 | job=edit |
51 | job=edit |
52 | !set gstep=$[max($gstep-2,0)] |
52 | !set gstep=$[max($gstep-2,0)] |
53 | abandon= |
53 | abandon= |
54 | !endif |
54 | !endif |
55 | 55 | ||
56 | readjobs=home,read,help,vote,showresult |
56 | readjobs=home,read,help,vote,showresult |
57 | editjobs=creat,guided,edit,reg,erase,preview,csv,getsource |
57 | editjobs=creat,guided,edit,reg,erase,preview,csv,getsource |
58 | !if $wims_user=supervisor |
58 | !if $wims_user=supervisor |
59 | !bound job within $readjobs,$editjobs default home |
59 | !bound job within $readjobs,$editjobs default home |
60 | !else |
60 | !else |
61 | !bound job within $readjobs default home |
61 | !bound job within $readjobs default home |
62 | !endif |
62 | !endif |
63 | !if $job=help or robot isin $session |
63 | !if $job=help or robot isin $session |
64 | !exit |
64 | !exit |
65 | !endif |
65 | !endif |
66 | 66 | ||
67 | !read tabletheme |
67 | !read tabletheme |
68 | !for i=1 to $max_votes |
68 | !for i=1 to $max_votes |
69 | m_parm$i=$(parm$i) |
69 | m_parm$i=$(parm$i) |
70 | !next i |
70 | !next i |
71 | 71 | ||
72 | votecnt=!recordcnt $votedir/.votes |
72 | votecnt=!recordcnt $votedir/.votes |
73 | !if $votecnt<1 and $job notwordof reg creat csv |
73 | !if $votecnt<1 and $job notwordof reg creat csv |
74 | job=home |
74 | job=home |
75 | !changeto home.proc |
75 | !changeto home.proc |
76 | !endif |
76 | !endif |
77 | !if $job=creat |
77 | !if $job=creat |
78 |
|
78 | !reset gstep |
79 | !if $votecnt>=$max_votes |
79 | !if $votecnt>=$max_votes |
80 | error=too_many_votes |
80 | error=too_many_votes |
81 | !exit |
81 | !exit |
82 | !else |
82 | !else |
83 | vote=$[$votecnt+1] |
83 | vote=$[$votecnt+1] |
84 | !increase votecnt |
84 | !increase votecnt |
85 | job=edit |
85 | job=edit |
86 | !endif |
86 | !endif |
87 | !endif |
87 | !endif |
88 | 88 | ||
89 | !default vote_model=$reg_model |
89 | !default vote_model=$reg_model |
90 | !if $vote>0 and $vote<=$votecnt |
90 | !if $vote>0 and $vote<=$votecnt |
91 | vdata=!record $vote of $votedir/.votes |
91 | vdata=!record $vote of $votedir/.votes |
92 | !distribute lines $vdata into vote_status,vote_title,vote_option,vote_show,vote_whovoteshow,vote_model |
92 | !distribute lines $vdata into vote_status,vote_title,vote_option,vote_show,vote_whovoteshow,vote_model |
93 | !default vote_option=anonymous |
93 | !default vote_option=anonymous |
94 | !default vote_status=0 |
94 | !default vote_status=0 |
95 | !default vote_show=1 |
95 | !default vote_show=1 |
96 | !! !default vote_model=free |
96 | !! !default vote_model=free |
97 | vote_src=!record 0 of $votedir/$vote.src |
97 | vote_src=!record 0 of $votedir/$vote.src |
98 | !readproc adm/vfilter/msgchange.proc read\ |
98 | !readproc adm/vfilter/msgchange.proc read\ |
99 | $vote_src |
99 | $vote_src |
100 | vote_src=$out_script |
100 | vote_src=$out_script |
101 | !endif |
101 | !endif |
102 | !default reg_model=$vote_model |
102 | !default reg_model=$vote_model |
103 | !! at some gstep these variables are not in the form but are required by reg.proc, so |
103 | !! at some gstep these variables are not in the form but are required by reg.proc, so |
104 | !! we need to be sure to have found defaults |
104 | !! we need to be sure to have found defaults |
105 | !default reg_status=$vote_status |
105 | !default reg_status=$vote_status |
106 | !default reg_option=$vote_option |
106 | !default reg_option=$vote_option |
107 | !default reg_show=$vote_show |
107 | !default reg_show=$vote_show |
108 | !default reg_whovoteshow=$vote_whovoteshow |
108 | !default reg_whovoteshow=$vote_whovoteshow |
109 | !if $vote<1 |
109 | !if $vote<1 |
110 | job=home |
110 | job=home |
111 | !endif |
111 | !endif |
112 | 112 | ||
113 | !! don't allow to use model if vote is sharing or sharable (waiting sharin/sharable techvar) |
113 | !! don't allow to use model if vote is sharing or sharable (waiting sharin/sharable techvar) |
114 | test_share=!defof sharable_vote,sharing_vote in wimshome/log/classes/$wims_class/neighbors |
114 | test_share=!defof sharable_vote,sharing_vote in wimshome/log/classes/$wims_class/neighbors |
115 | test_share=!nonempty item $test_share |
115 | test_share=!nonempty item $test_share |
116 | !if $test_share=$empty |
116 | !if $test_share=$empty |
117 | !set vmodellist=accessvar,group |
117 | !set vmodellist=accessvar,group |
118 | !set name_vmodellist=$(name_accessvar), $(name_group) |
118 | !set name_vmodellist=$(name_accessvar), $(name_group) |
119 | !else |
119 | !else |
120 | vmodellist=$empty |
120 | vmodellist=$empty |
121 | name_vmodellist=$empty |
121 | name_vmodellist=$empty |
122 | !endif |
122 | !endif |
123 | !read $job.proc |
123 | !read $job.proc |
124 | 124 | s |