Druckerverwaltung auf Admin-Controller umgestellt
[kivitendo-erp.git] / templates / webpages / admin / list_printers.html
1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%]
2
3 [% INCLUDE 'common/flash.html' %]
4
5 <h1>[% HTML.escape(title) %]</h1>
6
7 [% IF !SELF.all_clients.size %]
8 <div class="error">
9  [% LxERP.t8("Error") %]:
10  [% LxERP.t8("No clients have been created yet.") %]
11 </div>
12
13 <div>
14  <a href="[% SELF.url_for(action='show') %]">[% LxERP.t8("Back") %]</a>
15 </div>
16
17 [%- ELSE %]
18
19  <div>
20   [% LxERP.t8("Actions") %]:
21   <span class="link_separator"></span>
22   <a href="[% SELF.url_for(action='show') %]">[% LxERP.t8("Back") %]</a>
23   <span class="link_separator">|</span>
24   <a href="[% SELF.url_for(action='new_printer', 'client.id'=SELF.client.id) %]">[% LxERP.t8("Add printer") %]</a>
25  </div>
26
27  <hr>
28
29  <p>
30   [% LxERP.t8("Client to configure the printers for") %]:
31   [% L.select_tag('client.id', SELF.all_clients, id='client_id', title_key='name', default=SELF.client.id) %]
32  </p>
33
34  [%- IF !SELF.all_printers.size %]
35
36   <p>
37    [% LxERP.t8("No printers have been created yet.") %]
38   </p>
39
40  [%- ELSE %]
41
42   <table width="100%">
43    <tr class="listheading">
44     <th>[% LxERP.t8('Description') %]</th>
45     <th>[% LxERP.t8('Printer Command') %]</th>
46     <th>[% LxERP.t8('Template Code') %]</th>
47    </tr>
48
49    [%- FOREACH printer = SELF.all_printers %]
50     <tr valign="top" class="listrow">
51      <td><a href="[% SELF.url_for(action='edit_printer', 'client.id'=SELF.client.id, id=printer.id) %]">[% HTML.escape(printer.printer_description) %]</a></td>
52      <td>[% HTML.escape(printer.printer_command) %]</td>
53      <td>[% HTML.escape(printer.template_code) %]</td>
54     </tr>
55    [%- END %]
56   </table>
57
58  [%- END %]
59
60  <script type="text/javascript">
61 <!--
62   $(function() {
63     $('#client_id').change(function() {
64       window.location.href = "controller.pl?action=Admin/list_printers&client.id=" + $('#client_id').val();
65     });
66   });
67 -->
68  </script>
69
70 [%- END %]