Bug 19623: (follow-up) Correct footer include in pop-up windows
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / printers.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Administration &rsaquo;
3 [% IF ( add_form ) %][% IF ( searchfield ) %] Printers &rsaquo; Modify printer '[% searchfield %]'[% ELSE %] Printers &rsaquo; New printer[% END %][% END %]
4 [% IF ( add_validate ) %] Printers &rsaquo; Printer added[% END %]
5 [% IF ( delete_confirm ) %] Printers &rsaquo; Confirm deletion of printer '[% searchfield %]'[% END %]
6 [% IF ( delete_confirmed ) %] Printers &rsaquo; Printer deleted[% END %]
7 [% IF ( else ) %]Printers[% END %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% IF ( loop ) %]
10 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
11 [% INCLUDE 'datatables.inc' %]
12 <script type="text/javascript">
13 //<![CDATA[
14     $(document).ready(function() {
15         $("#printerst").dataTable($.extend(true, {}, dataTablesDefaults, {
16             "aoColumnDefs": [
17                 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
18             ],
19             "aaSorting": [[ 0, "asc" ]],
20             "sPaginationType": "four_button"
21         }));
22     });
23 //]]>
24 </script>
25 [% END %]
26 </head>
27 <body id="admin_printers" class="admin">
28 [% INCLUDE 'header.inc' %]
29 [% INCLUDE 'cat-search.inc' %]
30
31 <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 %]
32 [% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> &rsaquo; Printer added[% END %]
33 [% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> &rsaquo; Confirm deletion of printer '[% searchfield %]'[% END %]
34 [% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> &rsaquo; Printer deleted[% END %]
35 [% IF ( else ) %]Printers[% END %]</div>
36
37 <div id="doc3" class="yui-t2">
38    
39    <div id="bd">
40         <div id="yui-main">
41         <div class="yui-b">
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 %]" 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 %]" />[% searchfield %]
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 %]"  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 %]" />
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 %]" 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 %]</em></h3>
95
96         <table>
97             <tr>
98                 <th scope="row">Printer: </th><td>[% searchfield %]</td>
99             </tr>
100             <tr>
101                 <th scope="row">Queue: </th><td>[% printqueue %]</td>
102             </tr>
103             <tr>
104                 <th scope="row">Type: </th><td>[% printtype %]</td>
105             </tr>
106         </table>
107
108         <form action="[% script_name %]" method="post">
109             <input type="hidden" name="op" value="delete_confirmed" />
110             <input type="hidden" name="searchfield" value="[% searchfield %]" />
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 %]" 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 btn-sm" 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 %]</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 %]</td>
154                         <td>[% loo.printqueue %]</td>
155                         <td>[% loo.printtype %]</td>
156             <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>
157                 </tr>
158                 [% END %]
159         </tbody>
160     </table>[% ELSE %]<div class="dialog message">No printers defined.</div>[% END %]
161 [% END %]
162
163 </div>
164 </div>
165 <div class="yui-b">
166 [% INCLUDE 'admin-menu.inc' %]
167 </div>
168 </div>
169 [% INCLUDE 'intranet-bottom.inc' %]