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;
68 $(document).ready(function() {
69 new YAHOO.widget.Button("newsource");
70 new YAHOO.widget.Button("newrule");
76 <body id="admin_classsources" class="admin">
77 [% INCLUDE 'header.inc' %]
78 [% INCLUDE 'cat-search.inc' %]
80 <div id="breadcrumbs">
81 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
82 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
83 › <a href="/cgi-bin/koha/admin/classsources.pl">Classification Sources</a>
84 [% IF ( class_source_form ) %]
85 › [% IF ( edit_class_source ) %]Modify classification source[% ELSE %]Add classification source[% END %]
87 [% IF ( sort_rule_form ) %]
88 › [% IF ( edit_sort_rule ) %]Modify filing rule[% ELSE %]Add filing rule[% END %]
90 [% IF ( delete_class_source_form ) %]
91 › Confirm deletion of classification source <span class="ex">'[% class_source %]'</span>
92 [% ELSIF ( delete_sort_rule_form ) %]
93 › Confirm deletion of filing rule <span class="ex">'[% sort_rule %]'</span>
94 [% ELSIF ( delete_sort_rule_impossible ) %]
95 › Cannot delete filing rule <span class="ex">'[% sort_rule %]'</span>
99 <div id="doc3" class="yui-t2">
104 [% IF ( class_source_form ) %]
105 [% IF ( edit_class_source ) %]
106 <h2>Modify classification source</h2>
108 <h2>Add classification source</h2>
110 <form action="[% script_name %]" name="Aform" method="post">
111 <input type="hidden" name="op" value="[% confirm_op %]" />
112 <fieldset class="rows">
115 [% IF ( edit_class_source ) %]
116 <span class="label">Classification source code: </span>
117 <input type="hidden" name="class_source" value="[% class_source %]" />
120 <label for="class_source">Classification source code: </label>
121 <input type="text" id="class_source" name="class_source" size="10" maxlength="10" />
124 <li><label for="description">Description: </label>
125 <input type="text" id="description" name="description" size="50" maxlength="250"
126 value="[% description |html %]" />
128 <li><label for="used">Source in use?</label>
129 [% IF ( used ) %]<input type="checkbox" id="used" name="used" value="used" checked="checked" />[% ELSE %]
130 <input type="checkbox" id="used" name="used" value="used" />[% END %]
132 <li><label for="sort_rule">Filing Rule: </label>
133 <select id="sort_rule" name="sort_rule">
134 [% FOREACH rules_dropdow IN rules_dropdown %]
135 [% IF ( rules_dropdow.selected ) %]
136 <option value="[% rules_dropdow.rule %]" selected="selected">[% rules_dropdow.description %] ([% rules_dropdow.rule %])</option>
138 <option value="[% rules_dropdow.rule %]">[% rules_dropdow.description %] ([% rules_dropdow.rule %])</option>
145 <fieldset class="action">
146 <input type="button" value="Save" onclick="CheckSourceForm(this.form)" />
147 <a class="cancel" href="/cgi-bin/koha/admin/classsources.pl">Cancel</a>
152 [% IF ( sort_rule_form ) %]
153 [% IF ( edit_sort_rule ) %]
154 <h2>Modify filing rule</h2>
156 <h2>Add filing rule</h2>
158 <form action="[% script_name %]" name="Aform" method="post">
159 <input type="hidden" name="op" value="[% confirm_op %]" />
160 <fieldset class="rows">
163 [% IF ( edit_sort_rule ) %]
164 <span class="label">Filing rule code: </span>
165 <input type="hidden" name="sort_rule" value="[% sort_rule %]" />
168 <label for="sort_rule">Filing rule code: </label>
169 <input type="text" id="sort_rule" name="sort_rule" size="10" maxlength="10" />
172 <li><label for="description">Description: </label>
173 <input type="text" id="description" name="description" size="50" maxlength="250"
174 value="[% description |html %]" />
176 <li><label for="sort_routine">Filing Routine: </label>
177 <select id="sort_routine" name="sort_routine">
178 [% FOREACH routines_dropdow IN routines_dropdown %]
179 [% IF ( routines_dropdow.selected ) %]
180 <option value="[% routines_dropdow.routine %]" selected="selected">[% routines_dropdow.routine %]</option>
182 <option value="[% routines_dropdow.routine %]">[% routines_dropdow.routine %]</option>
189 <fieldset class="action">
190 <input type="button" value="Save" onclick="CheckRuleForm(this.form)" />
191 <a class="cancel" href="/cgi-bin/koha/admin/classsources.pl">Cancel</a>
196 [% IF ( delete_class_source_form ) %]
197 <div class="dialog alert"><h3>Confirm deletion of classification source <span class="ex">'[% class_source %]'</span>?</h3>
198 <form action="[% script_name %]" name="Aform" method="post">
199 <input type="hidden" name="op" value="[% confirm_op %]" />
200 <input type="hidden" name="class_source" value="[% class_source %]" />
201 <input type="submit" value="Delete classification source" class="approve" />
203 <form action="[% script_name %]" method="get">
204 <input type="submit" value="No, Do Not Delete" class="deny" />
209 [% IF ( delete_sort_rule_form ) %]
210 <div class="dialog alert"><h3>Confirm deletion of filing rule <span class="ex">'[% sort_rule %]'</span>?</h3>
211 <form action="[% script_name %]" name="Aform" method="post">
212 <input type="hidden" name="op" value="[% confirm_op %]" />
213 <input type="hidden" name="sort_rule" value="[% sort_rule %]" />
214 <input type="submit" value="Delete filing rule" class="approve" />
216 <form action="[% script_name %]" method="get">
217 <input type="submit" value="No, Do Not Delete" class="deny" />
222 [% IF ( delete_sort_rule_impossible ) %]
223 <div class="dialog message"><h3>Cannot delete filing rule <span class="ex">'[% sort_rule %]'</span></h3>
224 <p>The filing rule [% sort_rule %] is used by at least one classification source. Please
225 remove it from all classification source definitions before trying again.
227 <form action="[% script_name %]" method="get">
228 <input type="submit" value="OK" class="approve" />
233 [% IF ( display_lists ) %]
237 <li><a id="newsource" href="[% script_name %]?op=add_source">New Classification Source</a></li>
238 <li><a id="newrule" href="[% script_name %]?op=add_sort_rule">New Filing Rules</a></li>
241 <h2>Classification Sources</h2>
242 [% IF ( added_source ) %]
243 <div class="dialog message">Added classification source [% added_source %]</div>
245 [% IF ( edited_source ) %]
246 <div class="dialog message">Modified classification source [% edited_source %]</div>
248 [% IF ( deleted_source ) %]
249 <div class="dialog message">Deleted classification source [% deleted_source %]</div>
259 [% FOREACH class_source IN class_sources %]
260 [% IF ( loop.odd ) %]
263 <tr class="highlight">
265 <td>[% class_source.code %]</td>
266 <td>[% class_source.description %]</td>
267 <td>[% IF ( class_source.used ) %]Yes[% ELSE %]No[% END %]</td>
268 <td>[% class_source.sortrule %]</td>
270 <a href="[% class_source.script_name %]?op=edit_source&class_source=[% class_source.code |html %]">Edit</a>
271 <a href="[% class_source.script_name %]?op=delete_source&class_source=[% class_source.code |html %]">Delete</a>
277 <div class="pages">[% pagination_bar %]</div>
279 <h2>Classification Filing Rules</h2>
280 [% IF ( added_rule ) %]
281 <div class="dialog message">Added filing rule [% added_rule %]</div>
283 [% IF ( edited_rule ) %]
284 <div class="dialog message">Modified filing rule [% edited_rule %]</div>
286 [% IF ( deleted_rule ) %]
287 <div class="dialog message">Deleted filing rule [% deleted_rule %]</div>
293 <th>Sorting Routine</th>
296 [% FOREACH class_sort_rule IN class_sort_rules %]
297 [% IF ( loop.odd ) %]
300 <tr class="highlight">
302 <td>[% class_sort_rule.rule %]</td>
303 <td>[% class_sort_rule.description %]</td>
304 <td>[% class_sort_rule.sort_routine %]</td>
306 <a href="[% class_sort_rule.script_name %]?op=edit_sort_rule&sort_rule=[% class_sort_rule.rule |html %]">Edit</a>
307 <a href="[% class_sort_rule.script_name %]?op=delete_sort_rule&sort_rule=[% class_sort_rule.rule |html %]">Delete</a>
312 <div class="paginationBar">[% pagination_bar %]</div>
319 [% INCLUDE 'admin-menu.inc' %]
322 [% INCLUDE 'intranet-bottom.inc' %]