Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / printers.tt
1 [% USE Asset %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Administration &rsaquo;
4 [% IF ( add_form ) %][% IF ( searchfield ) %] Printers &rsaquo; Modify printer '[% searchfield %]'[% ELSE %] Printers &rsaquo; New printer[% END %][% END %]
5 [% IF ( add_validate ) %] Printers &rsaquo; Printer added[% END %]
6 [% IF ( delete_confirm ) %] Printers &rsaquo; Confirm deletion of printer '[% searchfield %]'[% END %]
7 [% IF ( delete_confirmed ) %] Printers &rsaquo; Printer deleted[% END %]
8 [% IF ( else ) %]Printers[% END %]</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% IF ( loop ) %]
11 [% Asset.css("css/datatables.css") %]
12 [% INCLUDE 'datatables.inc' %]
13 <script type="text/javascript">
14 //<![CDATA[
15     $(document).ready(function() {
16         $("#printerst").dataTable($.extend(true, {}, dataTablesDefaults, {
17             "aoColumnDefs": [
18                 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
19             ],
20             "aaSorting": [[ 0, "asc" ]],
21             "sPaginationType": "four_button"
22         }));
23     });
24 //]]>
25 </script>
26 [% END %]
27 </head>
28 <body id="admin_printers" class="admin">
29 [% INCLUDE 'header.inc' %]
30 [% INCLUDE 'cat-search.inc' %]
31
32 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; [% IF ( add_form ) %][% IF ( searchfield ) %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> &rsaquo; Modify printer '[% searchfield %]'[% ELSE %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> &rsaquo; New printer[% END %][% END %]
33 [% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> &rsaquo; Printer added[% END %]
34 [% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> &rsaquo; Confirm deletion of printer '[% searchfield %]'[% END %]
35 [% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> &rsaquo; Printer deleted[% END %]
36 [% IF ( else ) %]Printers[% END %]</div>
37
38 <div id="doc3" class="yui-t2">
39    
40    <div id="bd">
41         <div id="yui-main">
42         <div class="yui-b">
43
44 [% IF ( add_form ) %]
45
46 [% IF ( searchfield ) %]
47                 <h1>Modify printer</h1>
48         [% ELSE %]
49                 <h1>New printer</h1>
50         [% END %]
51         <form action="[% script_name %]" name="Aform" method="post" class="validated">
52         <input type="hidden" name="op" value="add_validate" />
53         [% IF ( searchfield ) %]
54                 <input type="hidden" name="add" value="0" />
55         [% ELSE %]
56                 <input type="hidden" name="add" value="1" />
57         [% END %]
58         <fieldset class="rows">
59 <ol>    [% IF ( searchfield ) %]
60                 <li>
61             <span class="label">Printer name: </span>
62                                 <input type="hidden" name="printername" id="" value="[% searchfield %]" />[% searchfield %]
63                 </li>
64         [% ELSE %]
65                 <li>
66             <label for="printername" class="required">Printer name: </label>
67                 <input type="text" name="printername" id="printername" size="40" maxlength="40" class="required" required="required" />
68                 <span class="required">Required</span>
69                 </li>
70         [% END %]
71                 <li>
72             <label for="printqueue" class="required">Queue: </label>
73             <input type="text" name="printqueue" id="printqueue" size="20" maxlength="20" value="[% printqueue %]"  class="required" required="required" />
74             <span class="required">Required</span>
75                 </li>
76                 <li>
77                         <label for="printtype">Type: </label>
78             <input type="text" name="printtype" id="printtype" size="20" maxlength="20" value="[% printtype %]" />
79                 </li></ol>
80         </fieldset>
81         <fieldset class="action"><input type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/admin/printers.pl">Cancel</a></fieldset>
82         </form>
83
84 [% END %]
85
86 [% IF ( add_validate ) %]
87 <h3>Printer added</h3>
88 <form action="[% script_name %]" method="post">
89        <fieldset class="action"> <input type="submit" value="OK" /></fieldset>
90 </form>
91 [% END %]
92
93 [% IF ( delete_confirm ) %]
94     <div class="dialog alert">
95         <h3>Confirm deletion of printer <em>[% searchfield %]</em></h3>
96
97         <table>
98             <tr>
99                 <th scope="row">Printer: </th><td>[% searchfield %]</td>
100             </tr>
101             <tr>
102                 <th scope="row">Queue: </th><td>[% printqueue %]</td>
103             </tr>
104             <tr>
105                 <th scope="row">Type: </th><td>[% printtype %]</td>
106             </tr>
107         </table>
108
109         <form action="[% script_name %]" method="post">
110             <input type="hidden" name="op" value="delete_confirmed" />
111             <input type="hidden" name="searchfield" value="[% searchfield %]" />
112             <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
113         </form>
114         <form action="/cgi-bin/koha/admin/printers.pl" method="get">
115             <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
116         </form>
117     </div>
118 [% END %]
119
120 [% IF ( delete_confirmed ) %]
121     <div class="dialog message">
122         <h3>Printer deleted</h3>
123         <form action="[% script_name %]" method="post">
124             <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
125         </form>
126     </div>
127
128 [% END %]
129
130 [% IF ( else ) %]
131
132 <div id="toolbar" class="btn-toolbar">
133     <a class="btn btn-default btn-sm" id="newprinter" href="/cgi-bin/koha/admin/printers.pl?op=add_form"><i class="fa fa-plus"></i> New printer</a>
134 </div>
135
136 <h2>Printers</h2>
137         [% IF ( searchfield ) %]
138                 You searched for [% searchfield %]</span>
139         [% END %]
140
141 [% IF ( loop ) %]
142     <table id="printerst">
143         <thead>
144             <tr>
145                 <th>Name</th>
146                 <th>Queue</th>
147                 <th>Type</th>
148                 <th>&nbsp;</th>
149             </tr>
150         </thead>
151         <tbody>
152                 [% FOREACH loo IN loop %]
153         <tr>
154                         <td>[% loo.printername %]</td>
155                         <td>[% loo.printqueue %]</td>
156                         <td>[% loo.printtype %]</td>
157             <td class="actions"><a class="btn btn-default btn-xs" href="[% loo.script_name %]?op=add_form&amp;searchfield=[% loo.printername |uri %]"><i class="fa fa-pencil"></i> Edit</a> <a class="btn btn-default btn-xs" href="[% loo.script_name %]?op=delete_confirm&amp;searchfield=[% loo.printername |uri %]"><i class="fa fa-trash"></i> Delete</a></td>
158                 </tr>
159                 [% END %]
160         </tbody>
161     </table>[% ELSE %]<div class="dialog message">No printers defined.</div>[% END %]
162 [% END %]
163
164 </div>
165 </div>
166 <div class="yui-b">
167 [% INCLUDE 'admin-menu.inc' %]
168 </div>
169 </div>
170 [% INCLUDE 'intranet-bottom.inc' %]