3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Administration › Classification sources
5 [% IF ( class_source_form ) %]
7 [% IF ( edit_class_source ) %]Modify classification source[% ELSE %]Add classification source[% END %]
9 [% IF ( sort_rule_form ) %]
11 [% IF ( edit_sort_rule ) %]Modify filing rule[% ELSE %]Add filing rule[% END %]
13 [% IF ( delete_class_source_form ) %]
14 › Confirm deletion of classification source [% class_source %]
15 [% ELSIF ( delete_sort_rule_form ) %]
16 › Confirm deletion of filing rule [% sort_rule %]
17 [% ELSIF ( delete_sort_rule_impossible ) %]
18 › Cannot delete filing rule [% sort_rule %]
21 [% INCLUDE 'doc-head-close.inc' %]
24 <body id="admin_classsources" class="admin">
25 [% INCLUDE 'header.inc' %]
26 [% INCLUDE 'prefs-admin-search.inc' %]
28 <div id="breadcrumbs">
29 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
30 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
31 › <a href="/cgi-bin/koha/admin/classsources.pl">Classification sources</a>
32 [% IF ( class_source_form ) %]
33 › [% IF ( edit_class_source ) %]Modify classification source[% ELSE %]Add classification source[% END %]
35 [% IF ( sort_rule_form ) %]
36 › [% IF ( edit_sort_rule ) %]Modify filing rule[% ELSE %]Add filing rule[% END %]
38 [% IF ( delete_class_source_form ) %]
39 › Confirm deletion of classification source <span class="ex">'[% class_source %]'</span>
40 [% ELSIF ( delete_sort_rule_form ) %]
41 › Confirm deletion of filing rule <span class="ex">'[% sort_rule %]'</span>
42 [% ELSIF ( delete_sort_rule_impossible ) %]
43 › Cannot delete filing rule <span class="ex">'[% sort_rule %]'</span>
47 <div id="doc3" class="yui-t2">
52 [% IF ( class_source_form ) %]
53 [% IF ( edit_class_source ) %]
54 <h2>Modify classification source</h2>
56 <h2>Add classification source</h2>
58 <form action="[% script_name %]" name="Aform" class="validated" method="post">
59 <input type="hidden" name="op" value="[% confirm_op %]" />
60 <fieldset class="rows">
63 [% IF ( edit_class_source ) %]
64 <span class="label">Classification source code: </span>
65 <input type="hidden" name="class_source" value="[% class_source %]" />
68 <label class="required" for="class_source">Classification source code: </label>
69 <input class="required" required="required" type="text" id="class_source" name="class_source" size="10" maxlength="10" />
70 <span class="required">Required</span>
73 <li><label class="required" for="description">Description: </label>
74 <input class="required" required="required" type="text" id="description" name="description" size="50" maxlength="250" value="[% description |html %]" />
75 <span class="required">Required</span>
77 <li><label for="used">Source in use?</label>
78 [% IF ( used ) %]<input type="checkbox" id="used" name="used" value="used" checked="checked" />[% ELSE %]
79 <input type="checkbox" id="used" name="used" value="used" />[% END %]
81 <li><label class="required" for="sort_rule">Filing rule: </label>
82 <select class="required" required="required" id="sort_rule" name="sort_rule">
83 [% FOREACH rules_dropdow IN rules_dropdown %]
84 [% IF ( rules_dropdow.selected ) %]
85 <option value="[% rules_dropdow.rule %]" selected="selected">[% rules_dropdow.description %] ([% rules_dropdow.rule %])</option>
87 <option value="[% rules_dropdow.rule %]">[% rules_dropdow.description %] ([% rules_dropdow.rule %])</option>
91 <span class="required">Required</span>
95 <fieldset class="action">
96 <input type="submit" value="Save" />
97 <a class="cancel" href="/cgi-bin/koha/admin/classsources.pl">Cancel</a>
102 [% IF ( sort_rule_form ) %]
103 [% IF ( edit_sort_rule ) %]
104 <h2>Modify filing rule</h2>
106 <h2>Add filing rule</h2>
108 <form action="[% script_name %]" name="Aform" class="validated" method="post">
109 <input type="hidden" name="op" value="[% confirm_op %]" />
110 <fieldset class="rows">
113 [% IF ( edit_sort_rule ) %]
114 <span class="label">Filing rule code: </span>
115 <input type="hidden" name="sort_rule" value="[% sort_rule %]" />
118 <label for="sort_rule" class="required">Filing rule code: </label>
119 <input class="required" required="required" type="text" id="sort_rule" name="sort_rule" size="10" maxlength="10" />
120 <span class="required">Required</span>
123 <li><label for="description" class="required">Description: </label>
124 <input class="required" required="required" type="text" id="description" name="description" size="50" maxlength="250" value="[% description |html %]" />
125 <span class="required">Required</span>
127 <li><label for="sort_routine" class="required">Filing routine: </label>
128 <select class="required" required="required" id="sort_routine" name="sort_routine">
129 [% FOREACH routines_dropdow IN routines_dropdown %]
130 [% IF ( routines_dropdow.selected ) %]
131 <option value="[% routines_dropdow.routine %]" selected="selected">[% routines_dropdow.routine %]</option>
133 <option value="[% routines_dropdow.routine %]">[% routines_dropdow.routine %]</option>
137 <span class="required">Required</span>
141 <fieldset class="action">
142 <input type="submit" value="Save" />
143 <a class="cancel" href="/cgi-bin/koha/admin/classsources.pl">Cancel</a>
148 [% IF ( delete_class_source_form ) %]
149 <div class="dialog alert">
150 <h3>Confirm deletion of classification source <span class="ex">'[% class_source %]'</span>?</h3>
151 <form action="[% script_name %]" name="Aform" method="post">
152 <input type="hidden" name="op" value="[% confirm_op %]" />
153 <input type="hidden" name="class_source" value="[% class_source %]" />
154 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete classification source</button>
156 <form action="[% script_name %]" method="get">
157 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
162 [% IF ( delete_sort_rule_form ) %]
163 <div class="dialog alert">
164 <h3>Confirm deletion of filing rule <span class="ex">'[% sort_rule %]'</span>?</h3>
165 <form action="[% script_name %]" name="Aform" method="post">
166 <input type="hidden" name="op" value="[% confirm_op %]" />
167 <input type="hidden" name="sort_rule" value="[% sort_rule %]" />
168 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete filing rule</button>
170 <form action="[% script_name %]" method="get">
171 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
176 [% IF ( delete_sort_rule_impossible ) %]
177 <div class="dialog alert"><h3>Cannot delete filing rule <span class="ex">'[% sort_rule %]'</span></h3>
178 <p>The filing rule [% sort_rule %] is used by at least one classification source. Please
179 remove it from all classification source definitions before trying again.
181 <form action="[% script_name %]" method="get">
182 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
187 [% IF ( display_lists ) %]
189 <div id="toolbar" class="btn-toolbar">
190 <a class="btn btn-default btn-sm" id="newsource" href="[% script_name %]?op=add_source"><i class="fa fa-plus"></i> New classification source</a>
191 <a class="btn btn-default btn-sm" id="newrule" href="[% script_name %]?op=add_sort_rule"><i class="fa fa-plus"></i> New filing rule</a>
194 <h2>Classification sources</h2>
195 [% IF ( added_source ) %]
196 <div class="dialog message">Added classification source [% added_source %]</div>
198 [% IF ( edited_source ) %]
199 <div class="dialog message">Modified classification source [% edited_source %]</div>
201 [% IF ( deleted_source ) %]
202 <div class="dialog message">Deleted classification source [% deleted_source %]</div>
204 [% IF ( failed_add_source ) %]
205 <div class="dialog message">Failed to add classification source [% failed_add_source %]. Perhaps the code already exists?</div>
215 [% FOREACH class_source IN class_sources %]
217 <td>[% class_source.code %]</td>
218 <td>[% class_source.description |html %]</td>
219 <td>[% IF ( class_source.used ) %]Yes[% ELSE %]No[% END %]</td>
220 <td>[% class_source.sortrule %]</td>
222 <a class="btn btn-default btn-xs" href="[% class_source.script_name %]?op=edit_source&class_source=[% class_source.code |html %]"><i class="fa fa-pencil"></i> Edit</a>
223 <a class="btn btn-default btn-xs" href="[% class_source.script_name %]?op=delete_source&class_source=[% class_source.code |html %]"><i class="fa fa-trash"></i> Delete</a>
229 <h2>Classification filing rules</h2>
230 [% IF ( added_rule ) %]
231 <div class="dialog message">Added filing rule [% added_rule %]</div>
233 [% IF ( edited_rule ) %]
234 <div class="dialog message">Modified filing rule [% edited_rule %]</div>
236 [% IF ( deleted_rule ) %]
237 <div class="dialog message">Deleted filing rule [% deleted_rule %]</div>
239 [% IF ( failed_add_rule ) %]
240 <div class="dialog message">Failed to add filing rule [% failed_add_rule %]. Perhaps the code already exists?</div>
246 <th>Sorting routine</th>
249 [% FOREACH class_sort_rule IN class_sort_rules %]
251 <td>[% class_sort_rule.rule %]</td>
252 <td>[% class_sort_rule.description |html %]</td>
253 <td>[% class_sort_rule.sort_routine %]</td>
255 <a class="btn btn-default btn-xs" href="[% class_sort_rule.script_name %]?op=edit_sort_rule&sort_rule=[% class_sort_rule.rule |html %]"><i class="fa fa-pencil"></i> Edit</a>
256 <a class="btn btn-default btn-xs" href="[% class_sort_rule.script_name %]?op=delete_sort_rule&sort_rule=[% class_sort_rule.rule |html %]"><i class="fa fa-trash"></i> Delete</a>
267 [% INCLUDE 'admin-menu.inc' %]
271 [% MACRO jsinclude BLOCK %]
272 [% Asset.js("js/admin-menu.js") %]
274 [% INCLUDE 'intranet-bottom.inc' %]