1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Administration › Classification sources
3 [% IF ( class_source_form ) %]
5 [% IF ( edit_class_source ) %]Modify classification source[% ELSE %]Add classification source[% END %]
7 [% IF ( sort_rule_form ) %]
9 [% IF ( edit_sort_rule ) %]Modify filing rule[% ELSE %]Add filing rule[% END %]
11 [% IF ( delete_class_source_form ) %]
12 › Confirm deletion of classification source [% class_source %]
13 [% ELSIF ( delete_sort_rule_form ) %]
14 › Confirm deletion of filing rule [% sort_rule %]
15 [% ELSIF ( delete_sort_rule_impossible ) %]
16 › Cannot delete filing rule [% sort_rule %]
19 [% INCLUDE 'doc-head-close.inc' %]
21 <script type="text/javascript">
24 function CheckSourceForm(f) {
27 if (f.class_source.value.length==0) {
28 _alertString += "\n- " + _("Classification source code missing");
30 if (f.sort_rule.value.length==0) {
31 _alertString += "\n- " + _("Filing rule code missing");
33 if (f.description.value.length==0) {
34 _alertString += "\n- " + _("Description missing");
36 if (_alertString.length==0) {
37 document.Aform.submit();
39 alertString2 = _("Form not submitted because of the following problem(s)");
40 alertString2 += "\n------------------------------------------------------------------------------------\n";
41 alertString2 += _alertString;
46 function CheckRuleForm(f) {
49 if (f.sort_rule.value.length==0) {
50 _alertString += "\n- " + _("Filing rule code missing");
52 if (f.description.value.length==0) {
53 _alertString += "\n- " + _("Description missing");
55 if (f.sort_routine.value.length==0) {
56 _alertString += "\n- " + _("Sort routine missing");
58 if (_alertString.length==0) {
59 document.Aform.submit();
61 alertString2 = _("Form not submitted because of the following problem(s)");
62 alertString2 += "\n------------------------------------------------------------------------------------\n";
63 alertString2 += _alertString;
70 <body id="admin_classsources" class="admin">
71 [% INCLUDE 'header.inc' %]
72 [% INCLUDE 'cat-search.inc' %]
74 <div id="breadcrumbs">
75 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
76 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
77 › <a href="/cgi-bin/koha/admin/classsources.pl">Classification sources</a>
78 [% IF ( class_source_form ) %]
79 › [% IF ( edit_class_source ) %]Modify classification source[% ELSE %]Add classification source[% END %]
81 [% IF ( sort_rule_form ) %]
82 › [% IF ( edit_sort_rule ) %]Modify filing rule[% ELSE %]Add filing rule[% END %]
84 [% IF ( delete_class_source_form ) %]
85 › Confirm deletion of classification source <span class="ex">'[% class_source %]'</span>
86 [% ELSIF ( delete_sort_rule_form ) %]
87 › Confirm deletion of filing rule <span class="ex">'[% sort_rule %]'</span>
88 [% ELSIF ( delete_sort_rule_impossible ) %]
89 › Cannot delete filing rule <span class="ex">'[% sort_rule %]'</span>
93 <div id="doc3" class="yui-t2">
98 [% IF ( class_source_form ) %]
99 [% IF ( edit_class_source ) %]
100 <h2>Modify classification source</h2>
102 <h2>Add classification source</h2>
104 <form action="[% script_name %]" name="Aform" method="post">
105 <input type="hidden" name="op" value="[% confirm_op %]" />
106 <fieldset class="rows">
109 [% IF ( edit_class_source ) %]
110 <span class="label">Classification source code: </span>
111 <input type="hidden" name="class_source" value="[% class_source %]" />
114 <label for="class_source">Classification source code: </label>
115 <input type="text" id="class_source" name="class_source" size="10" maxlength="10" />
118 <li><label for="description">Description: </label>
119 <input type="text" id="description" name="description" size="50" maxlength="250"
120 value="[% description %]" />
122 <li><label for="used">Source in use?</label>
123 [% IF ( used ) %]<input type="checkbox" id="used" name="used" value="used" checked="checked" />[% ELSE %]
124 <input type="checkbox" id="used" name="used" value="used" />[% END %]
126 <li><label for="sort_rule">Filing rule: </label>
127 <select id="sort_rule" name="sort_rule">
128 [% FOREACH rules_dropdow IN rules_dropdown %]
129 [% IF ( rules_dropdow.selected ) %]
130 <option value="[% rules_dropdow.rule %]" selected="selected">[% rules_dropdow.description %] ([% rules_dropdow.rule %])</option>
132 <option value="[% rules_dropdow.rule %]">[% rules_dropdow.description %] ([% rules_dropdow.rule %])</option>
139 <fieldset class="action">
140 <input type="button" value="Save" onclick="CheckSourceForm(this.form)" />
141 <a class="cancel" href="/cgi-bin/koha/admin/classsources.pl">Cancel</a>
146 [% IF ( sort_rule_form ) %]
147 [% IF ( edit_sort_rule ) %]
148 <h2>Modify filing rule</h2>
150 <h2>Add filing rule</h2>
152 <form action="[% script_name %]" name="Aform" method="post">
153 <input type="hidden" name="op" value="[% confirm_op %]" />
154 <fieldset class="rows">
157 [% IF ( edit_sort_rule ) %]
158 <span class="label">Filing rule code: </span>
159 <input type="hidden" name="sort_rule" value="[% sort_rule %]" />
162 <label for="sort_rule">Filing rule code: </label>
163 <input type="text" id="sort_rule" name="sort_rule" size="10" maxlength="10" />
166 <li><label for="description">Description: </label>
167 <input type="text" id="description" name="description" size="50" maxlength="250"
168 value="[% description %]" />
170 <li><label for="sort_routine">Filing routine: </label>
171 <select id="sort_routine" name="sort_routine">
172 [% FOREACH routines_dropdow IN routines_dropdown %]
173 [% IF ( routines_dropdow.selected ) %]
174 <option value="[% routines_dropdow.routine %]" selected="selected">[% routines_dropdow.routine %]</option>
176 <option value="[% routines_dropdow.routine %]">[% routines_dropdow.routine %]</option>
183 <fieldset class="action">
184 <input type="button" value="Save" onclick="CheckRuleForm(this.form)" />
185 <a class="cancel" href="/cgi-bin/koha/admin/classsources.pl">Cancel</a>
190 [% IF ( delete_class_source_form ) %]
191 <div class="dialog alert"><h3>Confirm deletion of classification source <span class="ex">'[% class_source %]'</span>?</h3>
192 <form action="[% script_name %]" name="Aform" method="post">
193 <input type="hidden" name="op" value="[% confirm_op %]" />
194 <input type="hidden" name="class_source" value="[% class_source %]" />
195 <input type="submit" value="Delete classification source" class="approve" />
197 <form action="[% script_name %]" method="get">
198 <input type="submit" value="No, do not delete" class="deny" />
203 [% IF ( delete_sort_rule_form ) %]
204 <div class="dialog alert"><h3>Confirm deletion of filing rule <span class="ex">'[% sort_rule %]'</span>?</h3>
205 <form action="[% script_name %]" name="Aform" method="post">
206 <input type="hidden" name="op" value="[% confirm_op %]" />
207 <input type="hidden" name="sort_rule" value="[% sort_rule %]" />
208 <input type="submit" value="Delete filing rule" class="approve" />
210 <form action="[% script_name %]" method="get">
211 <input type="submit" value="No, do not delete" class="deny" />
216 [% IF ( delete_sort_rule_impossible ) %]
217 <div class="dialog message"><h3>Cannot delete filing rule <span class="ex">'[% sort_rule %]'</span></h3>
218 <p>The filing rule [% sort_rule %] is used by at least one classification source. Please
219 remove it from all classification source definitions before trying again.
221 <form action="[% script_name %]" method="get">
222 <input type="submit" value="OK" class="approve" />
227 [% IF ( display_lists ) %]
229 <div id="toolbar" class="btn-toolbar">
230 <a class="btn btn-small" id="newsource" href="[% script_name %]?op=add_source"><i class="fa fa-plus"></i> New classification source</a>
231 <a class="btn btn-small" id="newrule" href="[% script_name %]?op=add_sort_rule"><i class="fa fa-plus"></i> New filing rule</a>
234 <h2>Classification sources</h2>
235 [% IF ( added_source ) %]
236 <div class="dialog message">Added classification source [% added_source %]</div>
238 [% IF ( edited_source ) %]
239 <div class="dialog message">Modified classification source [% edited_source %]</div>
241 [% IF ( deleted_source ) %]
242 <div class="dialog message">Deleted classification source [% deleted_source %]</div>
252 [% FOREACH class_source IN class_sources %]
254 <td>[% class_source.code %]</td>
255 <td>[% class_source.description %]</td>
256 <td>[% IF ( class_source.used ) %]Yes[% ELSE %]No[% END %]</td>
257 <td>[% class_source.sortrule %]</td>
259 <a href="[% class_source.script_name %]?op=edit_source&class_source=[% class_source.code %]">Edit</a>
260 <a href="[% class_source.script_name %]?op=delete_source&class_source=[% class_source.code %]">Delete</a>
266 <div class="pages">[% pagination_bar.raw %]</div>
268 <h2>Classification filing rules</h2>
269 [% IF ( added_rule ) %]
270 <div class="dialog message">Added filing rule [% added_rule %]</div>
272 [% IF ( edited_rule ) %]
273 <div class="dialog message">Modified filing rule [% edited_rule %]</div>
275 [% IF ( deleted_rule ) %]
276 <div class="dialog message">Deleted filing rule [% deleted_rule %]</div>
282 <th>Sorting routine</th>
285 [% FOREACH class_sort_rule IN class_sort_rules %]
286 [% IF ( loop.odd ) %]
289 <tr class="highlight">
291 <td>[% class_sort_rule.rule %]</td>
292 <td>[% class_sort_rule.description %]</td>
293 <td>[% class_sort_rule.sort_routine %]</td>
295 <a href="[% class_sort_rule.script_name %]?op=edit_sort_rule&sort_rule=[% class_sort_rule.rule %]">Edit</a>
296 <a href="[% class_sort_rule.script_name %]?op=delete_sort_rule&sort_rule=[% class_sort_rule.rule %]">Delete</a>
301 <div class="paginationBar">[% pagination_bar.raw %]</div>
308 [% INCLUDE 'admin-menu.inc' %]
311 [% INCLUDE 'intranet-bottom.inc' %]