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