source: extensions/event_cats/admin/evntcats_admin.tpl @ 3970

Last change on this file since 3970 was 3970, checked in by LucMorizur, 15 years ago

[Event Cats] All files converted in UTF-8 without BOM

File size: 15.7 KB
Line 
1{* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *}
2
3{* <!-- Tabs for admin page surfing --> *} {*
4<ul class = "tabsheet">
5  <li class = "selected_tab">
6    <a href = "??...">
7      <span>{'ec_tab_autoid'|@translate}</span>
8    </a>
9  </li>
10  <li class = "normal_tab">
11    <a href = "??...">
12      <span>{'ec_tab_config'|@translate}</span>
13    </a>
14  </li>
15</ul> *}
16
17{* <!-- Help button --> *} {*
18<ul class = "HelpActions">
19  <li>
20    <a href = "aide" onclick = "popuphelp(this.href); return false;" title = "{'ec_help'|@translate}" style = "margin-top: -28px;" >
21      <img src = "{$ROOT_URL}{$themeconf.admin_icon_dir}/help.png" class = "button" alt = "(?)" />
22    </a>
23  </li>
24</ul> *}
25
26{* <!-- Page title --> *}
27<div class = "titrePage" style="margin-top: -20px;">
28  <h2>{'ec_admin_page_title'|@translate} {$EVNTCATS_VERSION}</h2>
29</div>
30
31{* <!-- JavaScript warning message --> *}
32<div id = "ec_js_warn">
33  {'ec_javascript_needed'|@translate}<br><br>
34</div>
35<script type = "text/javascript"><!-- // Removes JavaScript warning message
36  document.getElementById('ec_js_warn').innerHTML = ''; //-->
37</script>
38
39{* <!-- Upper banner : infos, errors... --> *}
40{if $ec_howto}
41  <div>
42    {'ec_admin_page_howto'|@translate}
43  </div>
44{/if}
45
46<p>
47  <hr width = 75% size = 3 />
48</p>
49
50{* <!-- First section : form to view and modify codes, or create a new one --> *}
51<form class = "filter" method = "post" name = "ec_up_code" action = "">
52 
53  <div style = "text-align:right; font-style:italic;">
54    {if $ec_ap_ok}
55      {'ec_plugin_ap_ok'|@translate}
56      <script type = "text/javascript"><!--
57        var ec_ap_ok = true; //-->
58      </script>
59    {else}
60      {'ec_plugin_ap_nok'|@translate}
61      <script type = "text/javascript"><!--
62        var ec_ap_ok = false; //-->
63      </script>
64    {/if}
65  </div>
66 
67  <div style = "text-align:center; font-weight:bold; font-size:120%;">{'ec_entry_table_title'|@translate}</div><br>
68 
69  <table class = "table2" width = "97%"> {* <!-- Table to show codes present in MySQL table --> *}
70    <thead>
71      <tr class = "throw">
72        <td>{'ec_col_name_entry'|@translate}</td>
73        <td>{'ec_col_name_code'|@translate}</td>
74        <td>{'ec_col_name_user'|@translate}</td>
75        <td>{'ec_col_name_bhvr'|@translate}</td>
76        <td>{'ec_col_name_dspl'|@translate}</td>
77        <td>{'ec_col_name_actn'|@translate}</td>
78      </tr>
79    </thead>
80   
81    {foreach from=$code_list item=code_line name=code_loop}
82      <tr class = "{if $smarty.foreach.code_loop.index is odd}row1{else}row2{/if}">
83        <td>
84          <input type = "radio" name = "ec_entry_sel" value = "{$code_line.id}" id = "selection-{$code_line.id}"
85           onclick = "ec_mark_line({$code_line.id});"
86          />
87          <label for = "selection-{$code_line.id}">&nbsp;{$code_line.id}</label>
88        </td>
89        <td><label for = "selection-{$code_line.id}">{$code_line.Code}</label></td>
90        <td><label for = "selection-{$code_line.id}">{$code_line.Username}</label></td>
91        <td><label for = "selection-{$code_line.id}">{$code_line.Action|@translate}</label></td>
92        <td><label for = "selection-{$code_line.id}">{$code_line.Arg1}</label></td>
93        <td>
94          <a
95           href = "{$code_line.code_URL}" title = "{'ec_test_tooltip'|@translate}"
96           name = "ec_code_URL" onclick = "return ec_check_tst({$code_line.id});"
97          />
98            <img src = "{$EVNTCATS_URLS.ROOT}icon/url2.png" class = "button" style = "border:none"
99             alt = "{'ec_test_tooltip'|@translate}" title = "{'ec_test_tooltip'|@translate}" />
100          </a>
101          &nbsp;
102          <a href = "javascript:void()" onclick = "return ec_check_del({$code_line.id});">
103     {* envoi formulaire par JS : document.forms[nom_formulaire].submit() ( http://www.toutjavascript.com/reference/reference.php?iref=178 ) *}
104            <img src = "{$EVNTCATS_URLS.ROOT}icon/delete.png" class = "button" style = "border:none"
105             alt = "{'ec_url_delete'|@translate}" title = "{'ec_url_delete'|@translate}" />
106          </a>
107          {if $code_line.log_OK}
108            &nbsp;
109            <a href = "javascript:void()" onclick = "return ec_check_dis({$code_line.id});">
110              <img src = "{$EVNTCATS_URLS.ROOT}icon/disable.png" class = "button" style = "border:none"
111               alt = "{'ec_url_disable'|@translate}" title = "{'ec_url_disable'|@translate}" />
112            </a>
113            {if $code_line.Forced == 'true'}
114              &nbsp;
115              <a href = "javascript:void()" title = "{'ec_toggle_forced'|@translate}" onclick = "return ec_toggle_forced({$code_line.id});">
116                <img class = "button" style = "border:none" src = "{$EVNTCATS_URLS.ROOT}icon/forced.png"
117                 alt = "{'ec_url_forced'|@translate}" title = "{'ec_url_forced'|@translate}"/>
118              </a>
119            {else}
120              &nbsp;
121              <a href = "javascript:void()" title = "{'ec_toggle_forced'|@translate}" onclick = "return ec_toggle_forced({$code_line.id});">
122                <img class = "button" style = "border:none" src = "{$EVNTCATS_URLS.ROOT}icon/nforced.png"
123                 alt = "{'ec_url_nforced'|@translate}" title = "{'ec_url_nforced'|@translate}"/>
124              </a>
125              &nbsp;
126              <a href = "javascript:void()" title = "{'ec_duplicate_entry'|@translate}" onclick = "return ec_duplicate_entry({$code_line.id});">
127                <img src = "{$EVNTCATS_URLS.ROOT}icon/duplicate.png" class = "button" style = "border:none"
128                 alt = "{'ec_url_duplicate'|@translate}" title = "{'ec_url_duplicate'|@translate}" />
129              </a>
130            {/if}
131          {/if}
132        </td>
133      </tr>
134    {/foreach}
135  </table>
136 
137  {* <!-- This is not really a table, looks like a unique cell at the end of previous table,
138  to show URL for currently selected line in above table --> *}
139  <table class = "table2" width = "97%">
140    <tr class = "row2">
141      <td style = "text-align:center; padding-top:5px; padding-bottom:5px;">
142        <label title = "{'ec_url_tooltip'|@translate}">
143          {'ec_show_URL'|@translate}
144          <input type = "text" id = "ec_show_URL" size = "100%" title = "{'ec_url_tooltip'|@translate}" readonly = "readonly" />
145        </label>
146      </td>
147    </tr>
148  </table><br>
149 
150  {* <!-- Parameters list --> *}
151  <table style="border-spacing:30px" width = "97%">
152   
153    {* <!-- New entry --> *}
154    <tr>
155      <td>
156        <label for = "selection--1" onclick = "ec_mark_line(-1);">
157          <input type = "radio" name = "ec_entry_sel" value = "-1" id = "selection--1" onclick = "ec_mark_line(-1);" />
158          <span style = "font-weight:bold; font-style:italic; font-size:120%; text-decoration:underline;">{'ec_create_modify_code'|@translate}</span>
159        </label>
160      </td>
161      <td>
162        <input class = "submit" type = "button" name = "ec_submit_gen_full_auto" value = "{'ec_new_full_auto'|@translate}"
163         id = "ec_submit_gen_full_auto_id" onclick = "ec_gen_full_auto();" style = "margin-top:0;"
164        /><br>
165      </td>
166    </tr>
167   
168    {* <!-- Code selection --> *}
169    <tr>
170      <td><strong><span onclick = "Test();">{'ec_new_entry'|@translate}</span></strong></td>
171      <td>
172        <input type = "text" name = "ec_in_up_code" maxlength = "32" size = "40"
173         id = "ec_in_up_code_id" onclick = "ec_mark_line(-1);" onblur = "ec_new_code_text = this.value;"
174        />
175        &nbsp;
176        <label for = "ec_in_up_code_id" style = "margin:0;">
177          <input class = "submit" type = "button" name = "ec_submit_gen_code" value = "{'ec_new_entry_button'|@translate}"
178           id = "ec_submit_gen_code_id" onclick = "ec_gen_code();" style = "margin:0;"
179          />
180        </label>
181        {'ec_gen_code_nb_pre'|@translate}
182        <select name = "ec_in_up_auto_code_length" id = "ec_in_up_auto_code_length_id" onchange = "ec_auto_code_digits_nb = this.value;">
183          <option value = "4">4</option>
184          <option value = "5">5</option>
185          <option value = "8">8</option>
186          <option value = "10" selected = "selected">10</option>
187          <option value = "12">12</option>
188          <option value = "15">15</option>
189          <option value = "16">16</option>
190          <option value = "20">20</option>
191          <option value = "24">24</option>
192          <option value = "25">25</option>
193          <option value = "30">30</option>
194          <option value = "32">32{'ec_gen_code_nb_max'|@translate}</option>
195        </select>
196        {'ec_gen_code_nb_end'|@translate}
197      </td>
198    </tr>
199   
200    {* <!-- User to identify --> *}
201    <tr>
202      <td style = "vertical-align:top;"><strong>{'ec_up_code_lbl_user'|@translate}</strong></td>
203      <td>
204      <li>
205        {* <!-- None --> *}
206        <label onclick = "ec_mark_user('ec_sel_user_none');">
207          <input type = "radio" name = "ec_sel_user" value = "none" id = "ec_sel_user_none"
208           onclick = "ec_mark_user('ec_sel_user_none');"
209          />
210          {'ec_up_code_lbl_user_none'|@translate}
211        </label><br>
212      </li>
213       
214      <li>
215        {* <!-- New user (to create) --> *}
216        <label for = "ec_in_up_usr_txt_id" onclick = "ec_mark_user('ec_sel_user_new');">
217          <input type = "radio" name = "ec_sel_user" for = "ec_in_up_usr_txt_id" value = "new"
218           id = "ec_sel_user_new" onclick = "ec_mark_user('ec_sel_user_new');"
219          />
220          {'ec_up_code_lbl_user_new'|@translate}
221        </label>
222        &nbsp;
223        <input class = "submit" type = "button" name = "ec_submit_gen_user" value = "{'ec_up_code_lbl_gen_user'|@translate}"
224         id = "ec_submit_gen_user_id" onclick = "ec_gen_user();"
225        /><br>
226        <ul><li>
227          <label class = "ec_block">{'ec_new_user_name'|@translate}<br>
228            <input type = "text" name = "ec_in_up_usr_txt" id = "ec_in_up_usr_txt_id" maxlength = "32"
229             size = "20" onclick = "ec_mark_user('ec_sel_user_new');" onblur = "ec_new_user_text = this.value;"
230            />
231          </label>
232          <label class = "ec_block">{'ec_new_user_pswd'|@translate}<br>
233            <input type = "text" name = "ec_in_up_psd_txt" id = "ec_in_up_psd_txt_id" maxlength = "32"
234             size = "20" onclick = "ec_mark_user('ec_sel_user_new');" onblur = "ec_new_psd_text = this.value; ec_check_pwd_text();"
235            />
236          </label>
237          <label class = "ec_block">&nbsp;<br>
238            <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn">&nbsp;</span>
239          </label>
240         
241        </li></ul><br>
242      </li>
243     
244      <li>
245        {* <!-- Known user --> *}
246        <label for = "ec_in_up_usr_list_id" onclick = "ec_mark_user('ec_sel_user_old');">
247          <input type = "radio" name = "ec_sel_user" for = "ec_in_up_usr_list_id"
248           value = "old" id = "ec_sel_user_old" onclick = "ec_mark_user('ec_sel_user_old');"
249          />
250          {'ec_up_code_lbl_user_old'|@translate}
251        </label>
252        <select name = "ec_in_up_usr_list" id = "ec_in_up_usr_list_id" onclick = "ec_mark_user('ec_sel_user_old');"
253         onchange = "ec_selected_old_user = this.value;"
254        >
255          <option label = "------------" value = "-1" id = "ec_old_user_-1">------------</option>
256          {foreach from=$ec_lists.user_ids key=ec_key item=ec_val name=opt_loop}
257            <option label = "{$ec_val}" value = "{$ec_key}" id = "ec_old_user_{$ec_key}">{$ec_val}</option>
258          {/foreach}
259        </select><br>
260      </li>
261      </td>
262    </tr>
263   
264    {* <!-- Page to display --> *}
265    <tr>
266      <td style = "vertical-align:top;"><strong>{'ec_up_code_lbl_action'|@translate}</strong></td>
267      <td>
268       
269        {* <!-- Additionnal Page, provided the plugin is activated --> *}
270        <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "ec_mark_action('ec_input_action_add_p');"
271         {if !$ec_ap_ok}style = "display:none;"{/if}
272        >
273          <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p" for = "ec_in_up_aps_id"
274           onclick = "ec_mark_action('ec_input_action_add_p');"
275          />
276          {'ec_up_code_lbl_aps'|@translate}<br>
277          <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id"
278           onclick = "ec_mark_action('ec_input_action_add_p');" onchange = "ec_selected_AP = this.value;"
279          >
280            <option label = "------------" value = "-1" style = "display:none;">------------</option>
281            {html_options options=$ec_lists.add_pages}
282          </select>
283        </label>
284       
285        {* <!-- Category --> *}
286        <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "ec_mark_action('ec_input_action_cat');">
287          <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat" for = "ec_in_up_cats_id"
288           onclick = "ec_mark_action('ec_input_action_cat');"
289          />
290          {'ec_up_code_lbl_cats'|@translate}<br>
291          <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id"
292           onclick = "ec_mark_action('ec_input_action_cat');" onchange = "ec_selected_cat = this.value;"
293          >
294            <option label = "------------" value = "-1" style = "display:none;">------------</option>
295            {html_options options=$ec_lists.categories}
296          </select>
297        </label>
298       
299        {* <!-- Image --> *}
300        <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "ec_mark_action('ec_input_action_img');">
301          <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img" for = "ec_in_up_imgs_id"
302           onclick = "ec_mark_action('ec_input_action_img');"
303          />
304          {'ec_up_code_lbl_img'|@translate}<br>
305          <input type = "text" name = "ec_in_up_imgs" id = "ec_in_up_imgs_id" maxlength = "6"
306           size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "ec_mark_action('ec_input_action_img');"
307          /><br>
308          <span id = "ec_in_up_imgs_warn">&nbsp;</span>
309        </label>
310       
311        {* <!-- Index page --> *}
312        <label class = "ec_block" onclick = "ec_mark_action('ec_input_action_home');">
313          <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home"
314           onclick = "ec_mark_action('ec_input_action_home');"
315          />
316          {'ec_up_code_lbl_home'|@translate}
317        </label>
318      </td>
319    </tr>
320  </table>
321</form>
322
323{* <!-- JavaScript functions --> *}
324<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/evntcats_admin.js"></script>
325<script type = "text/javascript">
326  <!--
327 
328  // ec_test();
329 
330  ec_checked_URL[-1] = '';
331  {foreach from=$code_list key=ec_key item=code_line name=code_loop}
332    ec_checked_URL[{$ec_key}] = '{$code_line.code_URL}';
333  {/foreach}
334 
335  ec_JS_message['ec_confirm_disable'] = "{'ec_confirm_disable'|@translate|@escape:javascript}";
336  ec_JS_message['ec_confirm_delete'] = "{'ec_confirm_delete'|@translate|@escape:javascript}";
337  ec_JS_message['ec_confirm_test'] = "{'ec_confirm_test'|@translate|@escape:javascript}";
338  ec_JS_message['ec_gen_user_act_miss'] = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}";
339  ec_JS_message['ec_act_cat_miss'] = "{'ec_act_cat_miss'|@translate|@escape:javascript}";
340  ec_JS_message['ec_new_pwd_gen'] = "{'ec_new_pwd_gen'|@translate|@escape:javascript}";
341 
342  ec_init();
343 
344  {literal}
345 
346  function Test() {                                                /*
347    document.getElementById('ec_sel_user_none').checked = '';
348    document.getElementById('ec_sel_user_new').checked = '';
349    document.getElementById('ec_sel_user_old').checked = '';       */
350  }
351 
352  //-->{/literal}
353</script>
354
355{* <!-- {$test0tpl} --> *}
356{$test1tpl}
357{$test2tpl}
358{$test3tpl}
359
360{* <!--
361--> *}
362
363{* Peut-être utile ?
364
365Colonne "outils" :
366Titre colonne :
367Cellules :
368          <td style = "text-align:center;">
369          </td>
370
371*}
Note: See TracBrowser for help on using the repository browser.