added missing admin menu to two templates
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / classsources.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Administration &rsaquo; Classification Sources
3 <!-- TMPL_IF name="class_source_form" -->
4   <!-- TMPL_IF name="edit_class_source" -->
5     &rsaquo; Modify classification source
6   <!-- TMPL_ELSE -->
7     &rsaquo; Add classification source
8   <!-- /TMPL_IF -->
9 <!-- /TMPL_IF -->
10 <!-- TMPL_IF name="sort_rule_form" -->
11   <!-- TMPL_IF name="edit_sort_rule" -->
12     &rsaquo; Modify filing rule
13   <!-- TMPL_ELSE -->
14     &rsaquo; Add filing rule
15   <!-- /TMPL_IF -->
16 <!-- /TMPL_IF -->
17 <!-- TMPL_IF name="delete_class_source_form" -->
18   &rsaquo; Confirm deletion of classification source <!-- TMPL_VAR name="class_source" -->
19 <!-- /TMPL_IF -->
20 <!-- TMPL_IF name="delete_sort_rule_form" -->
21   &rsaquo; Confirm deletion of filing rule <!-- TMPL_VAR name="sort_rule" -->
22 <!-- /TMPL_IF -->
23 <!-- TMPL_IF name="delete_sort_rule_impossible" -->
24   &rsaquo; Cannot delete filing rule <!-- TMPL_VAR name="sort_rule" -->
25 <!-- /TMPL_IF -->
26 </title>
27 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
28
29 <script type="text/javascript">
30 //<![CDATA[
31
32 function DoCancel(f) {
33   f.op.value='';
34   document.Aform.submit();
35 }
36
37 function CheckSourceForm(f) {
38     var ok=1;
39     var _alertString="";
40     var alertString2;
41     if (f.class_source.value.length==0) {
42         _alertString += "\n- " + _("Classification source code missing");
43     }
44     if (f.sort_rule.value.length==0) {
45         _alertString += "\n- " + _("Filing rule code missing");
46     }
47     if (f.description.value.length==0) {
48         _alertString += "\n- " + _("Description missing");
49     }
50     if (_alertString.length==0) {
51         document.Aform.submit();
52     } else {
53         alertString2  = _("Form not submitted because of the following problem(s)");
54         alertString2 += "\n------------------------------------------------------------------------------------\n";
55         alertString2 += _alertString;
56         alert(alertString2);
57     }
58 }
59
60 function CheckRuleForm(f) {
61     var ok=1;
62     var _alertString="";
63     var alertString2;
64     if (f.sort_rule.value.length==0) {
65         _alertString += "\n- " + _("Filing rule code missing");
66     }
67     if (f.description.value.length==0) {
68         _alertString += "\n- " + _("Description missing");
69     }
70     if (f.sort_routine.value.length==0) {
71         _alertString += "\n- " + _("Sort routine missing");
72     }
73     if (_alertString.length==0) {
74         document.Aform.submit();
75     } else {
76         alertString2  = _("Form not submitted because of the following problem(s)");
77         alertString2 += "\n------------------------------------------------------------------------------------\n";
78         alertString2 += _alertString;
79         alert(alertString2);
80     }
81 }
82
83 //]]>
84 </script>
85 </head>
86 <body>
87 <!-- TMPL_INCLUDE NAME="header.inc" -->
88 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
89
90 <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="display_lists" -->Classification Sources<!-- TMPL_ELSE --><a href="/cgi-bin/koha/admin/classsources.pl">Classification Sources</a><!-- /TMPL_IF -->
91 <!-- TMPL_IF name="class_source_form" -->
92   <!-- TMPL_IF name="edit_class_source" -->
93     &rsaquo; Modify classification source
94   <!-- TMPL_ELSE -->
95     &rsaquo; Add classification source
96   <!-- /TMPL_IF -->
97 <!-- /TMPL_IF -->
98 <!-- TMPL_IF name="sort_rule_form" -->
99   <!-- TMPL_IF name="edit_sort_rule" -->
100     &rsaquo; Modify filing rule
101   <!-- TMPL_ELSE -->
102     &rsaquo; Add filing rule
103   <!-- /TMPL_IF -->
104 <!-- /TMPL_IF -->
105 <!-- TMPL_IF name="delete_class_source_form" -->
106   &rsaquo; Confirm deletion of classification source <!-- TMPL_VAR name="class_source" -->
107 <!-- /TMPL_IF -->
108 <!-- TMPL_IF name="delete_sort_rule_form" -->
109   &rsaquo; Confirm deletion of filing rule <!-- TMPL_VAR name="sort_rule" -->
110 <!-- /TMPL_IF -->
111 <!-- TMPL_IF name="delete_sort_rule_impossible" -->
112   &rsaquo; Cannot delete filing rule <!-- TMPL_VAR name="sort_rule" -->
113 <!-- /TMPL_IF -->
114 </div>
115
116 <div id="doc3" class="yui-t2">
117
118    <div id="bd">
119     <div id="yui-main">
120     <div class="yui-b">
121
122 <!-- TMPL_IF name="class_source_form" -->
123   <!-- TMPL_IF name="edit_class_source" -->
124 <h2>Modify classification source</h2>
125   <!-- TMPL_ELSE -->
126 <h2>Add classification source</h2>
127   <!-- /TMPL_IF -->
128 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
129   <input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
130   <fieldset class="rows">
131     <ol>
132       <li>
133           <!-- TMPL_IF name="edit_class_source" -->
134                   <span class="label">Classification source code: </span>
135             <input type="hidden" name="class_source" value="<!-- TMPL_VAR name="class_source" -->" />
136             <!-- TMPL_VAR name="class_source" -->
137           <!-- TMPL_ELSE -->
138                   <label for="class_source">Classification source code: </label>
139             <input type="text" id="class_source" name="class_source"  size="10" maxlength="10" />
140           <!-- /TMPL_IF -->
141        </li>
142        <li><label for="description">Description: </label>
143            <input type="text" id="description" name="description" size="50" maxlength="250" 
144                   value="<!-- TMPL_VAR name="description" escape="HTML" -->" />
145        </li>
146        <li><label for="used">Source in use?</label>
147            <!-- TMPL_IF NAME="used" --><input type="checkbox" id="used" name="used" value="used" checked="checked" /><!-- TMPL_ELSE -->
148                   <input type="checkbox" id="used" name="used" value="used" /><!-- /TMPL_IF -->
149        </li>
150        <li><label for="sort_rule">Filing Rule: </label>
151            <select id="sort_rule" name="sort_rule">
152            <!-- TMPL_LOOP name="rules_dropdown" -->
153              <!-- TMPL_IF name="selected" -->
154              <option value="<!-- TMPL_VAR name="rule" -->" selected="selected"><!-- TMPL_VAR name="description" --> (<!-- TMPL_VAR name="rule" -->)</option>
155              <!-- TMPL_ELSE -->
156              <option value="<!-- TMPL_VAR name="rule" -->"><!-- TMPL_VAR name="description" --> (<!-- TMPL_VAR name="rule" -->)</option>
157              <!-- /TMPL_IF -->
158            <!-- /TMPL_LOOP -->
159            </select>
160        </li>    
161     </ol>
162   </fieldset>
163   <fieldset class="action">
164     <!-- TMPL_IF name="edit_class_source" -->
165     <input type="button" value="Save"
166            onclick="CheckSourceForm(this.form)" />
167     <!-- TMPL_ELSE -->
168     <input type="button" value="Save"
169            onclick="CheckSourceForm(this.form)" />
170     <!-- /TMPL_IF-->
171     <a class="cancel" href="/cgi-bin/koha/admin/classsources.pl">Cancel</a>
172   </fieldset>
173 </form>
174 <!-- /TMPL_IF -->
175
176 <!-- TMPL_IF name="sort_rule_form" -->
177   <!-- TMPL_IF name="edit_sort_rule" -->
178 <h2>Modify filing rule</h2>
179   <!-- TMPL_ELSE -->
180 <h2>Add filing rule</h2>
181   <!-- /TMPL_IF -->
182 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
183   <input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
184   <fieldset class="rows">
185     <ol>
186       <li>
187           <!-- TMPL_IF name="edit_sort_rule" -->
188                   <span class="label">Filing rule code: </span>
189             <input type="hidden" name="sort_rule" value="<!-- TMPL_VAR name="sort_rule" -->" />
190             <!-- TMPL_VAR name="sort_rule" -->
191           <!-- TMPL_ELSE -->
192                   <label for="sort_rule">Filing rule code: </label>
193             <input type="text" id="sort_rule" name="sort_rule"  size="10" maxlength="10" />
194           <!-- /TMPL_IF -->
195        </li>
196        <li><label for="description">Description: </label>
197            <input type="text" id="description" name="description" size="50" maxlength="250" 
198                   value="<!-- TMPL_VAR name="description" escape="HTML" -->" />
199        </li>
200        <li><label for="sort_routine">Filing Routine: </label>
201            <select id="sort_routine" name="sort_routine">
202            <!-- TMPL_LOOP name="routines_dropdown" -->
203              <!-- TMPL_IF name="selected" -->
204              <option value="<!-- TMPL_VAR name="routine" -->" selected="selected"><!-- TMPL_VAR name="routine" --></option>
205              <!-- TMPL_ELSE -->
206              <option value="<!-- TMPL_VAR name="routine" -->"><!-- TMPL_VAR name="routine" --></option>
207              <!-- /TMPL_IF -->
208            <!-- /TMPL_LOOP -->
209            </select>
210        </li>
211     </ol>
212   </fieldset>
213   <fieldset class="action">
214   <!-- TMPL_IF name="edit_sort_rule" -->
215         <input type="button" value="Save"
216            onclick="CheckRuleForm(this.form)" />
217     <!-- TMPL_ELSE -->
218         <input type="button" value="Save"
219            onclick="CheckRuleForm(this.form)" />    <!-- /TMPL_IF-->
220         <a class="cancel" href="/cgi-bin/koha/admin/classsources.pl">Cancel</a>
221   </fieldset>
222 </form>
223 <!-- /TMPL_IF -->
224
225 <!-- TMPL_IF name="delete_class_source_form" -->
226 <h2>Confirm deletion of classification source <!-- TMPL_VAR name="class_source" -->?</h2>
227 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
228   <input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
229   <input type="hidden" name="class_source" value="<!-- TMPL_VAR name="class_source" -->" />
230   <p id="action">
231     <input type="submit" value="Delete classification source" />
232     <input type="button" value="Cancel" onclick="DoCancel(this.form)" />
233   </p>
234 </form>
235 <!-- /TMPL_IF -->
236
237 <!-- TMPL_IF name="delete_sort_rule_form" -->
238 <h2>Confirm deletion of filing rule <!-- TMPL_VAR name="sort_rule" -->?</h2>
239 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
240   <input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
241   <input type="hidden" name="sort_rule" value="<!-- TMPL_VAR name="sort_rule" -->" />
242   <p id="action">
243     <input type="submit" value="Delete filing rule" />
244     <input type="button" value="Cancel" onclick="DoCancel(this.form)" />
245   </p>
246 </form>
247 <!-- /TMPL_IF -->
248
249 <!-- TMPL_IF name="delete_sort_rule_impossible" -->
250 <h2>Cannot delete filing rule <!-- TMPL_VAR name="sort_rule" --></h2>
251 <p>The filing rule <!-- TMPL_VAR name="sort_rule" --> is used by at least one classification source.  Please
252 remove it from all classification source definitions before trying again.
253 </p>
254 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
255   <input type="hidden" name="op" value="<!-- TMPL_VAR name="else"-->" />
256   <input type="hidden" name="sort_rule" value="<!-- TMPL_VAR name="sort_rule" -->" />
257   <p id="action">
258     <input type="button" value="Go back" onclick="DoCancel(this.form)" />
259   </p>
260 <!-- /TMPL_IF -->
261
262 <!-- TMPL_IF name="display_lists" -->
263
264 <div id="toolbar">
265         <script type="text/javascript">
266         //<![CDATA[
267         // prepare DOM for YUI Toolbar
268          $(document).ready(function() {
269             yuiToolbar();
270          });
271         // YUI Toolbar Functions
272         function yuiToolbar() {
273             new YAHOO.widget.Button("newsource");
274             new YAHOO.widget.Button("newrule");
275         }       //]]>
276         </script>
277         <ul class="toolbar">
278         <li><a id="newsource" href="<!-- TMPL_VAR name="script_name" -->?op=add_source">New Classification Source</a></li>
279         <li><a id="newrule" href="<!-- TMPL_VAR name="script_name" -->?op=add_sort_rule">New Filing Rules</a></li>
280 </ul></div>
281
282 <h2>Classification Sources</h2>
283 <!-- TMPL_IF name="added_source" -->
284 <span class="problem">Added classification source <!-- TMPL_VAR name="added_source" --></span>
285 <!-- /TMPL_IF -->
286 <!-- TMPL_IF name="edited_source" -->
287 <span class="problem">Modified classification source <!-- TMPL_VAR name="edited_source" --></span>
288 <!-- /TMPL_IF -->
289 <!-- TMPL_IF name="deleted_source" -->
290 <span class="problem">Deleted classification source <!-- TMPL_VAR name="deleted_source" --></span>
291 <!-- /TMPL_IF -->
292 <table>
293   <tr>
294     <th>Code</th>
295     <th>Description</th>
296     <th>In Use</th>
297     <th>Filing Rule</th>
298     <th>Actions</th>
299   </tr>
300   <!-- TMPL_LOOP name="class_sources" -->
301   <tr>
302     <td><!-- TMPL_VAR name="code" --></td>
303     <td><!-- TMPL_VAR name="description" --></td>
304     <td><!-- TMPL_IF name="used" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
305     <td><!-- TMPL_VAR name="sortrule" --></td>
306     <td>
307       <a href="<!-- TMPL_VAR name="script_name" -->?op=edit_source&amp;class_source=<!-- TMPL_VAR name="code" escape="HTML" -->">Edit</a>
308       <a href="<!-- TMPL_VAR name="script_name" -->?op=delete_source&amp;class_source=<!-- TMPL_VAR name="code" escape="HTML" -->">
309 Delete</a>
310     </td>
311   </tr>
312   <!-- /TMPL_LOOP -->
313 </table>
314
315 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
316
317 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
318 <h2>Classification Filing Rules</h2>
319 <!-- TMPL_IF name="added_rule" -->
320 <span class="problem">Added filing rule <!-- TMPL_VAR name="added_rule" --></span>
321 <!-- /TMPL_IF -->
322 <!-- TMPL_IF name="edited_rule" -->
323 <span class="problem">Modified filing rule <!-- TMPL_VAR name="edited_rule" --></span>
324 <!-- /TMPL_IF -->
325 <!-- TMPL_IF name="deleted_rule" -->
326 <span class="problem">Deleted filing rule <!-- TMPL_VAR name="deleted_rule" --></span>
327 <!-- /TMPL_IF -->
328 <table>
329   <tr>
330     <th>Code</th>
331     <th>Description</th>
332     <th>Sorting Routine</th>
333     <th>Actions</th>
334   </tr>
335   <!-- TMPL_LOOP name="class_sort_rules" -->
336   <tr>
337     <td><!-- TMPL_VAR name="rule" --></td>
338     <td><!-- TMPL_VAR name="description" --></td>
339     <td><!-- TMPL_VAR name="sort_routine" --></td>
340     <td>
341       <a href="<!-- TMPL_VAR name="script_name" -->?op=edit_sort_rule&amp;sort_rule=<!-- TMPL_VAR name="rule" escape="HTML" -->">Edit</a>
342       <a href="<!-- TMPL_VAR name="script_name" -->?op=delete_sort_rule&amp;sort_rule=<!-- TMPL_VAR name="rule" escape="HTML" -->">
343 Delete</a>
344     </td>
345   </tr>
346   <!-- /TMPL_LOOP -->
347 </table>
348 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
349
350 <!-- /TMPL_IF -->
351
352 </div>
353 </div>
354 <div class="yui-b">
355 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
356 </div>
357 </div>
358 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->