Fixing nomenclature and tmpl_process3.pl bugs
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / printers.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Administration &rsaquo;
3 <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" --> Printers &rsaquo; Modify printer '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE --> Printers &rsaquo; New printer<!-- /TMPL_IF --><!-- /TMPL_IF -->
4 <!-- TMPL_IF NAME="add_validate" --> Printers &rsaquo; Printer Added<!-- /TMPL_IF -->
5 <!-- TMPL_IF NAME="delete_confirm" --> Printers &rsaquo; Confirm Deletion of Printer '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
6 <!-- TMPL_IF NAME="delete_confirmed" --> Printers &rsaquo; Printer Deleted<!-- /TMPL_IF -->
7 <!-- TMPL_IF NAME="else" -->Printers<!-- /TMPL_IF --></title>
8 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
9 <!-- TMPL_IF NAME="add_form" --><script type="text/javascript">
10 //<![CDATA[
11         //
12         function isNotNull(f,noalert) {
13                 if (f.value.length ==0) {
14    return false;
15                 }
16                 return true;
17         }
18         //
19         function toUC(f) {
20                 var x=f.value.toUpperCase();
21                 f.value=x;
22                 return true;
23         }
24         //
25         function isNum(v,maybenull) {
26         var n = new Number(v.value);
27         if (isNaN(n)) {
28                 return false;
29                 }
30         if (maybenull==0 && v.value=="") {
31                 return false;
32         }
33         return true;
34         }
35         //
36         function isDate(f) {
37                 var t = Date.parse(f.value);
38                 if (isNaN(t)) {
39                         return false;
40                 }
41         }
42         //
43         function Check(f) {
44                 var ok=1;
45                 var _alertString="";
46                 var alertString2;
47                 if (f.printername.value.length==0) {
48                         _alertString += "- printer name missing\n";
49                 }
50                 if (f.printqueue.value.length==0) {
51                         _alertString += "- Queue missing\n";
52                 }
53                 if (_alertString.length==0) {
54                         document.Aform.submit();
55                 } else {
56                         alertString2 = "Form not submitted because of the following problem(s)\n";
57                         alertString2 += "------------------------------------------------------------------------------------\n\n";
58                         alertString2 += _alertString;
59                         alert(alertString2);
60                 }
61         }
62         //]]>
63 </script>
64         <!-- /TMPL_IF -->
65 </head>
66 <body>
67 <!-- TMPL_INCLUDE NAME="header.inc" -->
68 <!-- TMPL_INCLUDE NAME="printers-admin-search.inc" -->
69
70 <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; <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" --> <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> &rsaquo; Modify printer '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE --> <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> &rsaquo; New printer<!-- /TMPL_IF --><!-- /TMPL_IF -->
71 <!-- TMPL_IF NAME="add_validate" --> <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> &rsaquo; Printer Added<!-- /TMPL_IF -->
72 <!-- TMPL_IF NAME="delete_confirm" --> <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> &rsaquo; Confirm Deletion of Printer '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
73 <!-- TMPL_IF NAME="delete_confirmed" --> <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> &rsaquo; Printer Deleted<!-- /TMPL_IF -->
74 <!-- TMPL_IF NAME="else" -->Printers<!-- /TMPL_IF --></div>
75
76 <div id="doc3" class="yui-t2">
77    
78    <div id="bd">
79         <div id="yui-main">
80         <div class="yui-b">
81
82 <!-- TMPL_IF NAME="add_form" -->
83         
84
85
86         
87 <!-- TMPL_IF NAME="searchfield" -->
88                 <h1>Modify printer</h1>
89         <!-- TMPL_ELSE -->
90                 <h1>New printer</h1>
91         <!-- /TMPL_IF -->
92         <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
93         <input type="hidden" name="op" value="add_validate" />
94         <fieldset class="rows">
95 <ol>    <!-- TMPL_IF NAME="searchfield" -->
96                 <li>
97                         <span class="label">Printer Name: </span>
98                         
99                                 <input type="hidden" name="printername" id="" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
100                         
101                 </li>
102         <!-- TMPL_ELSE -->
103                 <li>
104                         <label for="printername">Printer Name: </label>
105                         
106                                 <input type="text" name="printername" id="printername" size="50" maxlength="50" />
107                         
108                 </li>
109         <!-- /TMPL_IF -->
110
111                 <li>
112                         <label for="printqueue">Queue: </label>
113                         <input type="text" name="printqueue" id="printqueue" size="50" maxlength="50" value="<!-- TMPL_VAR NAME="printqueue" -->" /> 
114                 </li>
115                 <li>
116                         <label for="printtype">Type: </label>
117                         <input type="text" name="printtype" id="printtype" size="50" maxlength="50" value="<!-- TMPL_VAR NAME="printtype" -->" /> 
118                 </li></ol>
119         </fieldset>
120                 <fieldset class="action"><input type="submit" value="Submit" onclick="Check(this.form);" /> <a class="cancel" href="/cgi-bin/koha/admin/printers.pl">Cancel</a></fieldset>
121         </form>
122
123 <!-- /TMPL_IF -->
124
125 <!-- TMPL_IF NAME="add_validate" -->
126 <h3>Printer Added</h3>
127 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
128        <fieldset class="action"> <input type="submit" value="OK" /></fieldset>
129 </form>
130 <!-- /TMPL_IF -->
131
132 <!-- TMPL_IF NAME="delete_confirm" -->
133 <h3>Confirm Deletion of Printer <em><!-- TMPL_VAR NAME="searchfield" --></em></h3>
134 <ul>
135                 <li>
136                         <strong>Printer: </strong>
137                         <!-- TMPL_VAR NAME="searchfield" -->
138                 </li>
139                 <li>
140                         <strong>Queue: </strong>
141                         <!-- TMPL_VAR NAME="printqueue" -->
142                 </li>
143                 <li>
144                         <strong>Type: </strong>
145                         <!-- TMPL_VAR NAME="printtype" -->
146                 </li>
147         </ul>
148         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
149                         <input type="hidden" name="op" value="delete_confirmed" />
150                         <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
151                         <input type="submit" value="Delete this Printer" />
152                         </form> <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
153                                 <input type="submit" value="Do not Delete" />
154                         </form>
155 <!-- /TMPL_IF -->
156
157 <!-- TMPL_IF NAME="delete_confirmed" -->
158 <h3>Printer Deleted</h3>
159 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
160                 <fieldset class="action"><input type="submit" value="Ok" /></fieldset>
161 </form>
162 <!-- /TMPL_IF -->
163
164 <!-- TMPL_IF NAME="else" -->
165
166 <div id="toolbar">
167         <script type="text/javascript">
168         //<![CDATA[
169         // prepare DOM for YUI Toolbar
170          $(document).ready(function() {
171             yuiToolbar();
172          });
173         // YUI Toolbar Functions
174         function yuiToolbar() {
175             new YAHOO.widget.Button("newprinter");
176         }       //]]>
177         </script>
178         <ul class="toolbar">
179         <li><a id="newprinter" href="/cgi-bin/koha/admin/printers.pl?op=add_form">New Printer</a></li>
180 </ul></div>
181
182 <h2>Printers</h2>
183         <!-- TMPL_IF NAME="searchfield" -->
184                 You searched for <!-- TMPL_VAR NAME="searchfield" --></span>
185         <!-- /TMPL_IF -->
186
187 <!-- TMPL_IF NAME="loop" --><table>
188                 <tr>
189                         <th>Name</th>
190                         <th>Queue</th>
191                         <th>Type</th>
192                         <th>&nbsp;</th>
193                 </tr>
194                 <!-- TMPL_LOOP NAME="loop" -->
195                 <tr>
196                         <td><!-- TMPL_VAR NAME="printername" --></td>
197                         <td><!-- TMPL_VAR NAME="printqueue" --></td>
198                         <td><!-- TMPL_VAR NAME="printtype" --></td>
199                         <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;searchfield=<!-- TMPL_VAR NAME="printername" -->">Edit</a> <a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;searchfield=<!-- TMPL_VAR NAME="printername" -->">Delete</a></td>
200                 </tr>
201                 <!-- /TMPL_LOOP -->
202         </table><!-- TMPL_ELSE --><div class="notice">No printers defined.</div><!-- /TMPL_IF -->
203
204         <!-- TMPL_IF NAME="offsetgtzero" -->
205                 <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; Previous</a>
206         <!-- /TMPL_IF -->
207
208         <!-- TMPL_IF NAME="ltcount" -->
209                 <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next &gt;&gt;</a>       
210         <!-- /TMPL_iF -->
211 <!-- /TMPL_IF -->
212
213
214 </div>
215 </div>
216 <div class="yui-b">
217 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
218 </div>
219 </div>
220 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->