#1492 MARC subfields structure: can't switch to tab with label "@"
[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
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; Classification Sources
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><span class="label">Classification source code</span>
133           <!-- TMPL_IF name="edit_class_source" -->
134             <input type="hidden" name="class_source" value="<!-- TMPL_VAR name="class_source" -->" />
135             <!-- TMPL_VAR name="class_source" -->
136           <!-- TMPL_ELSE -->
137             <input type="text" id="class_source" name="class_source"  size="10" maxlength="10" />
138           <!-- /TMPL_IF -->
139        </li>
140        <li><span class="label">Description</span>
141            <input type="text" id="description" name="description" size="50" maxlength="250" 
142                   value="<!-- TMPL_VAR name="description" escape="HTML" -->" />
143        </li>
144        <li><span class="label">Source in use?</span>
145            <input type="checkbox" id="used" name="used" value="used" 
146                   <!-- TMPL_IF name="used" -->checked="yes"<!-- /TMPL_IF--> />
147        </li>
148        <li><span class="label">Filing Rule</span>
149            <select id="sort_rule" name="sort_rule">
150            <!-- TMPL_LOOP name="rules_dropdown" -->
151              <!-- TMPL_IF name="selected" -->
152              <option value="<!-- TMPL_VAR name="rule" -->" selected="selected"><!-- TMPL_VAR name="description" --> (<!-- TMPL_VAR name="rule" -->)</option>
153              <!-- TMPL_ELSE -->
154              <option value="<!-- TMPL_VAR name="rule" -->"><!-- TMPL_VAR name="description" --> (<!-- TMPL_VAR name="rule" -->)</option>
155              <!-- /TMPL_IF -->
156            <!-- /TMPL_LOOP -->
157            </select>
158        </li>    
159     </ol>
160   </fieldset>
161   <p id="action">
162     <!-- TMPL_IF name="edit_class_source" -->
163     <input type="button" value="Save Changes"
164            onclick="CheckSourceForm(this.form)" />
165     <!-- TMPL_ELSE -->
166     <input type="button" value="Add Classification Source"
167            onclick="CheckSourceForm(this.form)" />
168     <!-- /TMPL_IF-->
169     <input type="button" value="Cancel" onclick="DoCancel(this.form)" />
170   </p>
171 </form>
172 <!-- /TMPL_IF -->
173
174 <!-- TMPL_IF name="sort_rule_form" -->
175   <!-- TMPL_IF name="edit_sort_rule" -->
176 <h2>Modify filing rule</h2>
177   <!-- TMPL_ELSE -->
178 <h2>Add filing rule</h2>
179   <!-- /TMPL_IF -->
180 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
181   <input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
182   <fieldset class="rows">
183     <ol>
184       <li><span class="label">Filing rule code</span>
185           <!-- TMPL_IF name="edit_sort_rule" -->
186             <input type="hidden" name="sort_rule" value="<!-- TMPL_VAR name="sort_rule" -->" />
187             <!-- TMPL_VAR name="sort_rule" -->
188           <!-- TMPL_ELSE -->
189             <input type="text" id="sort_rule" name="sort_rule"  size="10" maxlength="10" />
190           <!-- /TMPL_IF -->
191        </li>
192        <li><span class="label">Description</span>
193            <input type="text" id="description" name="description" size="50" maxlength="250" 
194                   value="<!-- TMPL_VAR name="description" escape="HTML" -->" />
195        </li>
196        <li><span class="label">Filing Routine</span>
197            <select id="sort_routine" name="sort_routine">
198            <!-- TMPL_LOOP name="routines_dropdown" -->
199              <!-- TMPL_IF name="selected" -->
200              <option value="<!-- TMPL_VAR name="routine" -->" selected="selected"><!-- TMPL_VAR name="routine" --></option>
201              <!-- TMPL_ELSE -->
202              <option value="<!-- TMPL_VAR name="routine" -->"><!-- TMPL_VAR name="routine" --></option>
203              <!-- /TMPL_IF -->
204            <!-- /TMPL_LOOP -->
205            </select>
206        </li>
207     </ol>
208   </fieldset>
209   <p id="action">
210   <!-- TMPL_IF name="edit_sort_rule" -->
211         <input type="button" value="Save Changes"
212            onclick="CheckRuleForm(this.form)" />
213     <!-- TMPL_ELSE -->
214         <input type="button" value="Add Filing Rule"
215            onclick="CheckRuleForm(this.form)" />    <!-- /TMPL_IF-->
216     <input type="button" value="Cancel" onclick="DoCancel(this.form)" />
217   </p>
218 </form>
219 <!-- /TMPL_IF -->
220
221 <!-- TMPL_IF name="delete_class_source_form" -->
222 <h2>Confirm deletion of classification source <!-- TMPL_VAR name="class_source" -->?</h2>
223 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
224   <input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
225   <input type="hidden" name="class_source" value="<!-- TMPL_VAR name="class_source" -->" />
226   <p id="action">
227     <input type="submit" value="Delete classification source" />
228     <input type="button" value="Cancel" onclick="DoCancel(this.form)" />
229   </p>
230 </form>
231 <!-- /TMPL_IF -->
232
233 <!-- TMPL_IF name="delete_sort_rule_form" -->
234 <h2>Confirm deletion of filing rule <!-- TMPL_VAR name="sort_rule" -->?</h2>
235 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
236   <input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
237   <input type="hidden" name="sort_rule" value="<!-- TMPL_VAR name="sort_rule" -->" />
238   <p id="action">
239     <input type="submit" value="Delete filing rule" />
240     <input type="button" value="Cancel" onclick="DoCancel(this.form)" />
241   </p>
242 </form>
243 <!-- /TMPL_IF -->
244
245 <!-- TMPL_IF name="delete_sort_rule_impossible" -->
246 <h2>Cannot delete filing rule <!-- TMPL_VAR name="sort_rule" --></h2>
247 <p>The filing rule <!-- TMPL_VAR name="sort_rule" --> is used by at least one classification source.  Please
248 remove it from all classification source definitions before trying again.
249 </p>
250 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
251   <input type="hidden" name="op" value="<!-- TMPL_VAR name="else"-->" />
252   <input type="hidden" name="sort_rule" value="<!-- TMPL_VAR name="sort_rule" -->" />
253   <p id="action">
254     <input type="button" value="Go back" onclick="DoCancel(this.form)" />
255   </p>
256 <!-- /TMPL_IF -->
257
258 <!-- TMPL_IF name="display_lists" -->
259 <h2>Classification Sources</h2>
260 <!-- TMPL_IF name="added_source" -->
261 <span class="problem">Added classification source <!-- TMPL_VAR name="added_source" --></span>
262 <!-- /TMPL_IF -->
263 <!-- TMPL_IF name="edited_source" -->
264 <span class="problem">Modified classification source <!-- TMPL_VAR name="edited_source" --></span>
265 <!-- /TMPL_IF -->
266 <!-- TMPL_IF name="deleted_source" -->
267 <span class="problem">Deleted classification source <!-- TMPL_VAR name="deleted_source" --></span>
268 <!-- /TMPL_IF -->
269 <table>
270   <tr>
271     <th>Code</th>
272     <th>Description</th>
273     <th>In Use</th>
274     <th>Filing Rule</th>
275     <th>Actions</th>
276   </tr>
277   <!-- TMPL_LOOP name="class_sources" -->
278   <tr>
279     <td><!-- TMPL_VAR name="code" --></td>
280     <td><!-- TMPL_VAR name="description" --></td>
281     <td><!-- TMPL_IF name="used" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
282     <td><!-- TMPL_VAR name="sortrule" --></td>
283     <td>
284       <a href="<!-- TMPL_VAR name="script_name" -->?op=edit_source&amp;class_source=<!-- TMPL_VAR name="code" escape="HTML" -->">Edit</a>
285       <a href="<!-- TMPL_VAR name="script_name" -->?op=delete_source&amp;class_source=<!-- TMPL_VAR name="code" escape="HTML" -->">
286 Delete</a>
287     </td>
288   </tr>
289   <!-- /TMPL_LOOP -->
290 </table>
291
292 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
293
294 <p><a href="<!-- TMPL_VAR name="script_name" -->?op=add_source">Add Classification Source</a></p>
295
296 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
297 <h2>Classification Filing Rules</h2>
298 <!-- TMPL_IF name="added_rule" -->
299 <span class="problem">Added filing rule <!-- TMPL_VAR name="added_rule" --></span>
300 <!-- /TMPL_IF -->
301 <!-- TMPL_IF name="edited_rule" -->
302 <span class="problem">Modified filing rule <!-- TMPL_VAR name="edited_rule" --></span>
303 <!-- /TMPL_IF -->
304 <!-- TMPL_IF name="deleted_rule" -->
305 <span class="problem">Deleted filing rule <!-- TMPL_VAR name="deleted_rule" --></span>
306 <!-- /TMPL_IF -->
307 <table>
308   <tr>
309     <th>Code</th>
310     <th>Description</th>
311     <th>Sorting Routine</th>
312     <th>Actions</th>
313   </tr>
314   <!-- TMPL_LOOP name="class_sort_rules" -->
315   <tr>
316     <td><!-- TMPL_VAR name="rule" --></td>
317     <td><!-- TMPL_VAR name="description" --></td>
318     <td><!-- TMPL_VAR name="sort_routine" --></td>
319     <td>
320       <a href="<!-- TMPL_VAR name="script_name" -->?op=edit_sort_rule&amp;sort_rule=<!-- TMPL_VAR name="rule" escape="HTML" -->">Edit</a>
321       <a href="<!-- TMPL_VAR name="script_name" -->?op=delete_sort_rule&amp;sort_rule=<!-- TMPL_VAR name="rule" escape="HTML" -->">
322 Delete</a>
323     </td>
324   </tr>
325   <!-- /TMPL_LOOP -->
326 </table>
327 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
328
329 <p><a href="<!-- TMPL_VAR name="script_name" -->?op=add_sort_rule">Add Filing Rule</a></p>
330
331
332
333 <!-- /TMPL_IF -->
334
335 </div>
336 </div>
337 <div class="yui-b">
338 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
339 </div>
340 </div>
341 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->