source: extensions/lmt/admin/plugin_admin_manage.tpl @ 3396

Last change on this file since 3396 was 3396, checked in by grum, 15 years ago

Add plugin LMT

File size: 4.7 KB
Line 
1
2{if $nbphotos==0}
3  <p>{'lmt_caddie_is_empty_please_fill_it'|@translate}</p>
4{else}
5
6{literal}
7<script type="text/javascript">
8$(document).data("nbsel", {/literal}{$nbphotos}{literal});
9
10  function loadpage(pagenum)
11  {
12    http_request=create_httpobject('get', '', '{/literal}{$datas.LMT_AJAX_URL_LIST}{literal}'+pagenum, false);
13    http_request.send(null);
14
15    tmp=http_request.responseText;
16   
17    $("#nbphotos").attr("innerHTML", tmp.substr(0,tmp.indexOf("#")));
18    $("#list").attr("innerHTML", tmp.substr(tmp.indexOf("#")+1));
19  }
20
21  function swap_state(id)
22  {
23    if($("#"+id).val()=="1")
24    {
25      $("#"+id).val("0");
26      $("#img"+id).attr("className", "is_off");
27      $(document).data("nbsel", $(document).data("nbsel")-1);
28    }
29    else
30    {
31      $("#"+id).val("1");
32      $("#img"+id).attr("className", "is_on");
33      $(document).data("nbsel", $(document).data("nbsel")+1);
34    }   
35    $("#btsubmit").get(0).disabled=($(document).data("nbsel")==0);
36  }
37
38  function change_select()
39  {
40    act=$("#selectlist").val();
41    switch(act)
42    {
43      case '-':
44        break;
45      case 'all':
46        $(document).data("nbsel", {/literal}{$nbphotos}{literal});
47        $("input").filter(".none").each(
48          function(i)
49          {
50            this.value="1";
51            $("#img"+this.id).attr("className", "is_on");
52          }
53        );       
54        break;
55      case 'none':
56        $(document).data("nbsel", 0);
57        $("input").filter(".none").each(
58          function(i)
59          {
60            this.value="0";
61            $("#img"+this.id).attr("className", "is_off");
62          }
63        );       
64        break;
65      case 'invert':
66        $("input").filter(".none").each(
67          function(i)
68          {
69            if(this.value=="1")
70            {
71              this.value="0";
72              $("#img"+this.id).attr("className", "is_off");
73              $(document).data("nbsel", $(document).data("nbsel")-1);
74            }
75            else
76            {
77              this.value="1";
78              $("#img"+this.id).attr("className", "is_on");
79              $(document).data("nbsel", $(document).data("nbsel")+1);
80            }
81          }
82        );       
83        break;
84      default:
85        $(document).data("nbsel", 0);
86        $("input").filter(".none").each(
87          function(i)
88          {
89            if(this.alt==act)
90            {
91              this.value="1";
92              $("#img"+this.id).attr("className", "is_on");
93              $(document).data("nbsel", $(document).data("nbsel")+1);
94            }
95          }
96        );       
97        break;
98    }
99    $("#selectlist").get(0).options[0].selected=true;
100    $("#btsubmit").get(0).disabled=($(document).data("nbsel")==0);
101  }
102
103</script>
104{/literal}
105
106
107<form method="POST">
108
109  <fieldset>
110    <legend>{'lmt_caddie_items'|@translate}</legend>
111
112    <div id="list">
113    </div>
114
115    <p class="lmt_page" style="border-top:1px dotted;padding-top:10px;">
116      <span id="nbphotos" style="float:right;"></span>
117      <span>
118          <select id="selectlist" onchange="change_select();">
119            {html_options values=$selectlist_list_values output=$selectlist_list_labels selected=$selectlist_list_selected}
120          </select>
121      </span>
122    </p>
123  </fieldset>
124
125  <fieldset>
126    <legend>{'lmt_licence_to_apply'|@translate}</legend>
127
128    <p class="lmt_page">
129      <table class="formtable">
130        <tr>
131          <td>{'lmt_licence'|@translate}</td>
132          <td>
133            <select name="licence">
134              {html_options values=$licences_list_values output=$licences_list_labels selected=$licences_list_selected}
135            </select>
136          </td>
137        </tr>
138        <tr>
139          <td>{'lmt_author'|@translate}</td>
140          <td>
141            <select name="author">
142              {html_options values=$author_list_values output=$author_list_labels}
143            </select>
144          </td>
145        </tr>
146      </table>
147    </p>
148  </fieldset>
149
150  <fieldset>
151    <legend>{'Caddie management'|@translate}</legend>
152    <label><input type="radio" name="manage_caddie" value="app_nothing" checked>&nbsp;{'lmt_apply_do_nothing'|@translate}</label><br/>
153    <label><input type="radio" name="manage_caddie" value="app_clear">&nbsp;{'lmt_apply_do_clear'|@translate}</label><br/>
154    <label><input type="radio" name="manage_caddie" value="app_clear_selected">&nbsp;{'lmt_apply_do_clear_selected'|@translate}</label><br/>
155    <label><input type="radio" name="manage_caddie" value="napp_clear_selected">&nbsp;{'lmt_dontapply_do_clear_selected'|@translate}</label><br/>
156</fieldset>
157
158  <p><input type="submit" id="btsubmit" name="submit_apply_licence" value="{'lmt_apply'|@translate}"></p>
159
160</form>
161
162<script type="text/javascript">
163  loadpage(1);
164</script>
165
166{/if}
Note: See TracBrowser for help on using the repository browser.