Rev 16456 | Rev 17180 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
9447 | guerimand | 1 | !! html for create a individual class copying an exemple class |
2 | |||
9454 | guerimand | 3 | !if $step=-3 |
17165 | guerimand | 4 | <div class="wims_content"> |
5 | !if $keyword!=$empty |
||
6 | !let s=open |
||
7 | !endif |
||
8 | <details $s> |
||
9 | <summary>$name_clonebyclass</summary> |
||
12659 | bpr | 10 | !read proc/search.phtml |
11 | <p>$name_clickclone</p> |
||
12 | !if $debcls!=$empty |
||
12660 | bpr | 13 | !set table_id=TABLE_clonelist |
14 | !set table_class=sortable |
||
12659 | bpr | 15 | $table_header |
12660 | bpr | 16 | <thead> |
17 | $table_hdtr<th scope="col">$wims_name_name</th><th scope="col">$wims_name_supervisor</th> |
||
18 | <th scope="col">$name_cloning</th> |
||
19 | </thead> |
||
20 | <tbody> |
||
12659 | bpr | 21 | !for i=$debcls to $ccnt |
22 | !! find if classe is clonable |
||
23 | !let l=!record $i of wimshome/log/classes/.index |
||
24 | !distribute items $l into code,expire,inst,cl,la,ty |
||
25 | !if $ty!=4 |
||
26 | !let l1=!deaccent $l |
||
27 | !let l1=!tolower $l1 |
||
28 | !let c1=!text extract 0123456789 in $code |
||
29 | !let k=yes |
||
30 | !if $kw!=$empty |
||
31 | !for w in $kw |
||
32 | !if $w notin $l1 |
||
33 | !let k=no |
||
34 | !break |
||
35 | !endif |
||
36 | !next w |
||
37 | !endif |
||
38 | !if $k=no and $ty=2 and $kw!=$empty |
||
39 | !! find of keyword in subclasses |
||
40 | !let sbcnt=!recordcnt wimshome/log/classes/$code/.subclasses |
||
41 | !let sb=1 |
||
42 | !while $sb<=$sbcnt and $k=no |
||
43 | !let ksb=yes |
||
44 | !let l1sb=!record $sb of wimshome/log/classes/$code/.subclasses |
||
45 | !let l1sb=!deaccent $l1sb |
||
46 | !let l1sb=!tolower $l1sb |
||
47 | |||
10215 | bpr | 48 | !for w in $kw |
14335 | bpr | 49 | !if $w notin $l1sb |
50 | !let ksb=no |
||
51 | !break |
||
52 | !endif |
||
10215 | bpr | 53 | !next w |
12659 | bpr | 54 | !if $ksb=yes |
14335 | bpr | 55 | !let k=yes |
12659 | bpr | 56 | !endif |
57 | !increase sb |
||
58 | !endwhile |
||
10933 | guerimand | 59 | !endif |
12659 | bpr | 60 | !if $k!=yes |
61 | !reset l |
||
62 | !endif |
||
63 | !else |
||
64 | !reset l |
||
65 | !endif |
||
66 | !! display clonable class |
||
67 | !if $l!=$empty |
||
68 | !distribute items $l into code,expire,inst,cl,la,ty,b,b,first,last |
||
69 | !let testneighbors=!defof sharing_all in wimshome/log/classes/$code/neighbors |
||
14335 | bpr | 70 | !let test=!defof class_allowcloning in wimshome/log/classes/$code/.def |
16456 | bpr | 71 | !if ($testneighbors=$empty and $test=yes) or ($code<=9999 and $code notin $noopenclone) or $ty=2 |
12659 | bpr | 72 | !if $ty!=2 |
73 | $table_tr |
||
74 | <td>$inst <br /> |
||
75 | !href cmd=reply&step=-2&sourcecls=$code $cl |
||
76 | !if $class_info!=$empty |
||
77 | <br /> $class_info |
||
78 | !endif |
||
79 | </td> |
||
80 | <td>$first $last</td> |
||
81 | <td> |
||
82 | !if $code<=9999 |
||
83 | $name_free |
||
84 | !else |
||
85 | !if $test=yes |
||
86 | $name_protected |
||
10933 | guerimand | 87 | !else |
12659 | bpr | 88 | $name_disallowed |
10215 | bpr | 89 | !endif |
90 | !endif |
||
12659 | bpr | 91 | </td> |
92 | </tr> |
||
93 | !else |
||
94 | !! class_type=2 display subclasses |
||
95 | !let nbsubclass=!recordcnt wimshome/log/classes/$code/.subclasses |
||
96 | !let auth=$empty |
||
97 | !for j=1 to $nbsubclass |
||
98 | !let tmp=!record $j of wimshome/log/classes/$code/.subclasses |
||
99 | !let test=!defof class_allowcloning in wimshome/log/classes/$code/$j/.def |
||
100 | !if $test=yes |
||
101 | !let auth=!append item $j to $auth |
||
102 | !endif |
||
103 | !next j |
||
104 | !if $auth!=$empty |
||
105 | !for j in $auth |
||
106 | !let tmp=!record $j of wimshome/log/classes/$code/.subclasses |
||
107 | !distribute items $tmp into codes,expires,insts,cls,las,tys,b,b,firsts,lasts |
||
108 | $table_tr |
||
109 | <td>$name_subclass $inst $cl <br /> |
||
110 | !href cmd=reply&step=-2&sourcecls=$codes $cls |
||
111 | </td> |
||
112 | <td>$firsts $lasts</td> |
||
113 | <td>$name_protected</td> |
||
114 | </tr> |
||
115 | !next j |
||
116 | !endif |
||
117 | !endif |
||
10215 | bpr | 118 | !endif |
119 | !endif |
||
12659 | bpr | 120 | !next i |
12660 | bpr | 121 | </tbody> |
12659 | bpr | 122 | $table_end |
12660 | bpr | 123 | !read tablesort.phtml |
12659 | bpr | 124 | !else |
125 | $name_nofound |
||
126 | !endif |
||
17165 | guerimand | 127 | </details> |
128 | <details> |
||
129 | <summary>$(name_clonebytgz[1])</summary> |
||
130 | !set wims_form_method=file |
||
131 | !form reply |
||
132 | <fieldset class="property_fields blockcenter"> |
||
133 | <legend>$(name_clonebytgz[2])</legend> |
||
134 | <input type="hidden" name="job" value="upload" /> |
||
135 | <div class="field box fullwidth"> |
||
136 | <label for="wims_deposit">$(name_clonebytgz[3])</label> |
||
137 | <input type="hidden" name="step" value="-1" /> |
||
138 | <input type="hidden" name="sourcecls" value="file" /> |
||
139 | <input type="file" name="wims_deposit" id="wims_deposit" size="40" /> |
||
140 | </div> |
||
141 | <div class="wimscenter"> |
||
142 | <input type="submit" value="$wims_name_send" /> |
||
143 | </div> |
||
144 | </fieldset> |
||
145 | !formend |
||
146 | </details> |
||
147 | |||
148 | </div> |
||
149 | !exit |
||
9454 | guerimand | 150 | !endif |
151 | |||
152 | !if $step=-2 |
||
16456 | bpr | 153 | !! saisie du mot de passe de clonage pour les classes privées. |
12659 | bpr | 154 | $name_getcloningpwd |
155 | !form reply |
||
13066 | bpr | 156 | <input size="20" name="clonepwd" value="$clonepwd" id="clonepwd" /> |
157 | <input type="hidden" name="step" value="-1" /> |
||
12659 | bpr | 158 | <input type="submit" value="$wims_name_tosave" /> |
159 | !formend |
||
160 | !exit |
||
9454 | guerimand | 161 | !endif |
162 | |||
10216 | bpr | 163 | !if $step>=-1 and $step<3 |
12659 | bpr | 164 | <div class="wims_msg info"> |
165 | $name_cpexempleintro. |
||
17165 | guerimand | 166 | !if $ssourcecls=file |
167 | <br /> |
||
168 | $(name_clonebytgz[4]) |
||
169 | !endif |
||
12659 | bpr | 170 | </div> |
9454 | guerimand | 171 | !endif |
9449 | bpr | 172 | |
9454 | guerimand | 173 | !if $step=-1 |
12659 | bpr | 174 | <div class="wims_content spacer"> |
175 | $(name_choosemode): |
||
176 | <p> |
||
177 | !set wims_ref_class=wims_button |
||
178 | !href cmd=reply&methodecp=0&step=0 $name_btcpexemplemeth0 |
||
179 | $name_cpexemplemeth0 |
||
180 | </p><p> |
||
181 | !set wims_ref_class=wims_button |
||
182 | !href cmd=reply&methodecp=1&step=0 $name_btcpexemplemeth1 |
||
183 | $name_cpexemplemeth1 |
||
184 | </p> |
||
185 | $name_cpexemplecomment |
||
9447 | guerimand | 186 | |
12659 | bpr | 187 | !! <span class="wims_warning">$wims_name_help</span>: |
188 | !! !read lang/help.phtml.$modu_lang 1 |
||
189 | </div> |
||
190 | !exit |
||
10458 | guerimand | 191 | !endif |
192 | |||
193 | !if $step>=0 |
||
12659 | bpr | 194 | !changeto proc/newclass.phtml |
9447 | guerimand | 195 | !endif |