Bug 23458: Clean up holds template in the staff client
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / printers.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha &rsaquo; Administration &rsaquo;
5 [% IF ( add_form ) %][% IF ( searchfield ) %] Printers &rsaquo; Modify printer '[% searchfield | html %]'[% ELSE %] Printers &rsaquo; New printer[% END %][% END %]
6 [% IF ( add_validate ) %] Printers &rsaquo; Printer added[% END %]
7 [% IF ( delete_confirm ) %] Printers &rsaquo; Confirm deletion of printer '[% searchfield | html %]'[% END %]
8 [% IF ( delete_confirmed ) %] Printers &rsaquo; Printer deleted[% END %]
9 [% IF ( else ) %]Printers[% END %]</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 [% IF ( loop ) %]
12 [% INCLUDE 'datatables.inc' %]
13 <script>
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 | html %]'[% 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 | html %]'[% 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 class="main container-fluid">
39     <div class="row">
40         <div class="col-sm-10 col-sm-push-2">
41             <main>
42
43 [% IF ( add_form ) %]
44
45 [% IF ( searchfield ) %]
46                 <h1>Modify printer</h1>
47         [% ELSE %]
48                 <h1>New printer</h1>
49         [% END %]
50         <form action="[% script_name | html %]" name="Aform" method="post" class="validated">
51         <input type="hidden" name="op" value="add_validate" />
52         [% IF ( searchfield ) %]
53                 <input type="hidden" name="add" value="0" />
54         [% ELSE %]
55                 <input type="hidden" name="add" value="1" />
56         [% END %]
57         <fieldset class="rows">
58 <ol>    [% IF ( searchfield ) %]
59                 <li>
60             <span class="label">Printer name: </span>
61                                 <input type="hidden" name="printername" id="" value="[% searchfield | html %]" />[% searchfield | html %]
62                 </li>
63         [% ELSE %]
64                 <li>
65             <label for="printername" class="required">Printer name: </label>
66                 <input type="text" name="printername" id="printername" size="40" maxlength="40" class="required" required="required" />
67                 <span class="required">Required</span>
68                 </li>
69         [% END %]
70                 <li>
71             <label for="printqueue" class="required">Queue: </label>
72             <input type="text" name="printqueue" id="printqueue" size="20" maxlength="20" value="[% printqueue | html %]"  class="required" required="required" />
73             <span class="required">Required</span>
74                 </li>
75                 <li>
76                         <label for="printtype">Type: </label>
77             <input type="text" name="printtype" id="printtype" size="20" maxlength="20" value="[% printtype | html %]" />
78                 </li></ol>
79         </fieldset>
80         <fieldset class="action"><input type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/admin/printers.pl">Cancel</a></fieldset>
81         </form>
82
83 [% END %]
84
85 [% IF ( add_validate ) %]
86 <h3>Printer added</h3>
87 <form action="[% script_name | html %]" method="post">
88        <fieldset class="action"> <input type="submit" value="OK" /></fieldset>
89 </form>
90 [% END %]
91
92 [% IF ( delete_confirm ) %]
93     <div class="dialog alert">
94         <h3>Confirm deletion of printer <em>[% searchfield | html %]</em></h3>
95
96         <table>
97             <tr>
98                 <th scope="row">Printer: </th><td>[% searchfield | html %]</td>
99             </tr>
100             <tr>
101                 <th scope="row">Queue: </th><td>[% printqueue | html %]</td>
102             </tr>
103             <tr>
104                 <th scope="row">Type: </th><td>[% printtype | html %]</td>
105             </tr>
106         </table>
107
108         <form action="[% script_name | html %]" method="post">
109             <input type="hidden" name="op" value="delete_confirmed" />
110             <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
111             <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
112         </form>
113         <form action="/cgi-bin/koha/admin/printers.pl" method="get">
114             <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
115         </form>
116     </div>
117 [% END %]
118
119 [% IF ( delete_confirmed ) %]
120     <div class="dialog message">
121         <h3>Printer deleted</h3>
122         <form action="[% script_name | html %]" method="post">
123             <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
124         </form>
125     </div>
126
127 [% END %]
128
129 [% IF ( else ) %]
130
131 <div id="toolbar" class="btn-toolbar">
132     <a class="btn btn-default" id="newprinter" href="/cgi-bin/koha/admin/printers.pl?op=add_form"><i class="fa fa-plus"></i> New printer</a>
133 </div>
134
135 <h2>Printers</h2>
136         [% IF ( searchfield ) %]
137                 You searched for [% searchfield | html %]</span>
138         [% END %]
139
140 [% IF ( loop ) %]
141     <table id="printerst">
142         <thead>
143             <tr>
144                 <th>Name</th>
145                 <th>Queue</th>
146                 <th>Type</th>
147                 <th>&nbsp;</th>
148             </tr>
149         </thead>
150         <tbody>
151                 [% FOREACH loo IN loop %]
152         <tr>
153                         <td>[% loo.printername | html %]</td>
154                         <td>[% loo.printqueue | html %]</td>
155                         <td>[% loo.printtype | html %]</td>
156             <td class="actions"><a class="btn btn-default btn-xs" href="[% loo.script_name | url %]?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 | url %]?op=delete_confirm&amp;searchfield=[% loo.printername |uri %]"><i class="fa fa-trash"></i> Delete</a></td>
157                 </tr>
158                 [% END %]
159         </tbody>
160     </table>[% ELSE %]<div class="dialog message">No printers defined.</div>[% END %]
161 [% END %]
162
163             </main>
164         </div> <!-- /.col-sm-10.col-sm-push-2 -->
165
166         <div class="col-sm-2 col-sm-pull-10">
167             <aside>
168                 [% INCLUDE 'admin-menu.inc' %]
169             </aside>
170         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
171      </div> <!-- /.row -->
172
173 [% INCLUDE 'intranet-bottom.inc' %]