1 [% BLOCK options_for_libraries %]
2 [% FOREACH l IN libraries %]
4 <option value="[% prefix | html %][% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
6 <option value="[% prefix | html %][% l.branchcode | html %]">[% l.branchname | html %]</option>
11 [% BLOCK options_for_desks %]
12 <option id="nodesk" value="">---</option>
13 [% FOREACH d IN desks %]
14 [% IF d.branchcode == branch %]
15 [% IF selected == d.desk_id %]
16 <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" selected="selected">[% d.desk_name | html %]</option>
18 <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" >[% d.desk_name | html %]</option>
21 <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" disabled hidden>[% d.desk_name | html %]</option>
26 [% BLOCK options_for_registers %]
27 [% FOREACH r IN registers %]
28 [% IF r.branch == Branches.GetLoggedInBranchcode %]
30 <option class="[%- r.branch | html -%][%- IF r.branch_default -%] default[%- END -%]" value="[% r.id | html %]" selected="selected">[% r.name | html %]</option>
32 <option class="[%- r.branch | html -%][%- IF r.branch_default -%] default[%- END -%]" value="[% r.id | html %]">[% r.name | html %]</option>
35 <option class="[%- r.branch | html -%][%- IF r.branch_default -%] default[%- END -%]" value="[% r.id | html %]" disabled style="display: none">[% r.name | html %]</option>
40 [% BLOCK options_for_authorised_value_categories %]
41 [% FOREACH avc IN authorised_value_categories %]
43 <option value="[% avc.category | html %]" selected="selected">[% avc.category | html %]</option>
45 <option value="[% avc.category | html %]">[% avc.category | html %]</option>
50 [% BLOCK options_for_authorised_values %]
51 [% FOREACH av IN authorised_values %]
52 [% IF av.authorised_value == selected_av %]
53 <option value="[% av.authorised_value | html %]" selected="selected">[% av.lib | html %]</option>
55 <option value="[% av.authorised_value | html %]">[% av.lib | html %]</option>
60 [% BLOCK options_for_item_types %]
61 [% FOREACH itemtype IN itemtypes %]
62 [% IF itemtype.itemtype == selected_itemtype %]
63 <option value="[% itemtype.itemtype | html %]" selected="selected">
65 <option value="[% itemtype.itemtype | html %]">
67 [% itemtype.translated_description | html %]
72 [% BLOCK biblio_a_href -%]
73 [%- IF Koha.Preference('IntranetBiblioDefaultView') == 'marc' && Koha.Preference('viewMARC') -%]
74 [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=" -%]
75 [%- ELSIF Koha.Preference('IntranetBiblioDefaultView') == 'labeled_marc' && Koha.Preference('viewLabeledMARC') -%]
76 [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=" -%]
77 [%- ELSIF Koha.Preference('IntranetBiblioDefaultView') == 'isbd' && Koha.Preference('viewISBD') -%]
78 [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=" -%]
80 [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/detail.pl?biblionumber=" -%]
82 [%- this_biblio_href | url %][% biblionumber | url -%]
85 [% BLOCK subfields_for_item %]
87 [% FOREACH subfield IN subfields %]
88 [% IF subfield.kohafield == 'items.more_subfields_xml' %]
89 [% SET kohafield = 'items.more_subfields_xml_' _ subfield.subfield %]
91 [% SET kohafield = subfield.kohafield %]
95 <div class="subfield_line" style="[% subfield.visibility | html %]" id="subfield[% subfield.tag | html %][% subfield.subfield | html %][% subfield.random | html %]">
96 [% IF ( subfield.mandatory ) %]
97 <label class="required">[% subfield.subfield | html %] - [% subfield.marc_lib | $raw %]</label>
99 <label>[% subfield.subfield | html %] - [% subfield.marc_lib | $raw %]</label>
102 [% SET mv = subfield.marc_value %]
103 [% IF ( mv.type == 'hidden' ) %]
104 <input type="hidden" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]">
105 [% ELSIF ( mv.type == 'select' ) %]
106 [% IF ( mv.readonly || subfield.IS_RETURN_CLAIM ) %]
107 <select name="[% kohafield | html %]" id="[%- mv.id | html -%]" class="input_marceditor" readonly="readonly" disabled="disabled" data-width="50%">
109 <select name="[% kohafield | html %]" id="[%- mv.id | html -%]" class="input_marceditor select2" data-category="[% mv.category | html %]" data-width="50%">
112 [% FOREACH aval IN mv.values %]
113 [% IF aval == mv.default %]
114 <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
116 [% IF subfield.IS_LOST_AV && Koha.Preference("ClaimReturnedLostValue") && aval == Koha.Preference("ClaimReturnedLostValue") %]
117 <option disabled="disabled" value="[%- aval | html -%]" title="Return claims must be processed from the patron details page">[%- mv.labels.$aval | html -%]</option>
119 <option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option>
124 [% ELSIF ( mv.type == 'text_auth' ) %]
126 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
128 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
129 [% SET dopop = "Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=\"${mv.authtypecode}\"&index=${mv.id}','${mv.id}')" %]
130 <a href="#" class="buttonDot" onclick="[%- dopop | html -%]; return false;" title="Tag editor">...</a>
132 [% ELSIF ( mv.type == 'text_plugin' ) %]
134 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
136 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
137 [% IF ( mv.nopopup ) %]
138 <a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="No popup">...</a>
140 <a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="Tag editor">...</a>
142 [% UNLESS no_plugin %][%# FIXME - from batchMod-edit, jQuery is included at the end of the template and cataloguing plugins are not working in this situation %]
143 [%- mv.javascript | $raw -%]
146 [% ELSIF ( mv.type == 'text' ) %]
148 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
150 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
152 [% ELSIF ( mv.type == 'textarea' ) %]
154 <textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" rows="5" cols="64" readonly="readonly" >[% mv.value | html %]</textarea>
156 <textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" rows="5" cols="64" >[% mv.value | html %]</textarea>
160 [% IF subfield.kohafield == 'items.more_subfields_xml' %]
161 <input type="hidden" name="items.more_subfields_xml" value="[% subfield.subfield | html %]" />
163 <input type="hidden" name="tag" value="[% subfield.tag | html %]" />
164 <input type="hidden" name="kohafield" value="[% subfield.kohafield | html %]" /> [%# We should not need that but all item forms are not rewritten yet %]
165 <input type="hidden" name="subfield" value="[% subfield.subfield | html %]" />
166 <input type="hidden" name="mandatory" value="[% subfield.mandatory | html %]" />
167 <input type="hidden" name="important" value="[% subfield.important | html %]" />
170 <span name="regex_fields" style="display: none;">
171 s/<input type="text" name="[% kohafield | html %]_regex_search" class="regex_search" placeholder="regex pattern" />/
172 <input type="text" name="[% kohafield | html %]_regex_replace" class="regex_replace" placeholder="regex replacement" />/
173 <input type="text" name="[% kohafield | html %]_regex_modifiers" class="regex_modifiers" placeholder="ig" size="3" />
177 [% IF add_delete_checkbox %]
178 [% UNLESS ( subfield.mandatory ) %]
179 <input type="checkbox" id="row[% subfield.tag | html %][% subfield.subfield | html %][% subfield.random | html %]" title="Check to delete subfield [% subfield.subfield | html %]" name="disable_input" value="[% kohafield | html %]" />
181 <span class="required">Required</span>
184 [% IF ( subfield.mandatory ) %] <span class="required">Required</span>
185 [% ELSIF ( subfield.important ) %] <span class="important">Important</span>
190 [% IF (mv.type == 'text' || mv.type == 'text2' || mv.type == 'textarea' ) %]
191 <a href="#" name="[% kohafield | html %]_field_regex" class="field_regex" id="[% subfield.id | html %]" >RegEx</a>
195 [% IF ( subfield.repeatable ) %]
196 <a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode.parentNode); return false;">
197 <img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" />
201 <span class="hint" id="hint[% subfield.tag | html %][% subfield.subfield | html %][% subfield.random | html %]"></span>
209 [% BLOCK items_table_batchmod %]
211 [% IF display_columns_selection %][%# Needs js/pages/batchMod.js %]
212 [% IF checkboxes_edit OR checkboxes_delete %]
214 <a id="selectallbutton" href="#"><i class="fa fa-check"></i> Select all</a> | <a id="clearallbutton" href="#"><i class="fa fa-remove"></i> Clear all</a> | <a id="clearonloanbutton" href="#">Clear on loan</a>
218 <div id="cataloguing_additem_itemlist">
221 <strong>Show/hide columns:</strong>
222 <span class="selected">
223 <input type="checkbox" checked="checked" id="showall" />
224 <label for="showall">Show all columns</label>
227 <input type="checkbox" id="hideall" />
228 <label for="hideall">Hide all columns</label>
231 [% FOREACH header IN item_header_loop %]
232 <span class="selected">
233 <input id="checkheader[% loop.count | html %]" type="checkbox" checked="checked" />
234 <label for="checkheader[% loop.count | html %]">[% header.header_value | html %]</label>
237 </p> <!-- /#selections -->
240 [% SET date_fields = [ 'dateaccessioned', 'onloan', 'datelastseen', 'datelastborrowed', 'replacementpricedate' ] %]
244 [% IF checkboxes_edit OR checkboxes_delete %]
247 <th class="anti-the">Title</th>
248 <th class="holds_count" title="Item holds / Total holds">Holds</th>
249 [% FOREACH item_header IN headers %]
250 [% IF item_header.column_name %]
251 <th data-colname="[% item_header.column_name | html %]">
255 [% item_header.header_value | html %]
261 [% FOREACH item IN items %]
262 [% SET can_be_edited = ! ( Koha.Preference('IndependentBranches') && ! logged_in_user.is_superlibrarian && item.homebranch != Branches.GetLoggedInBranchname() ) %]
265 [% IF checkboxes_edit %]
266 [% UNLESS can_be_edited%]
267 <td class="error">Cannot edit</td>
270 <input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" checked="checked" data-is-onloan="[% item.is_checked_out | html %]" />
273 [% ELSIF checkboxes_delete %]
274 [% UNLESS can_be_edited %]
275 <td class="error">Cannot delete</td>
277 [% IF item.safe_to_delete %]
278 <td><input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" checked="checked" /></td>
280 [% SET messages = item.safe_to_delete.messages %]
281 [% FOR m IN messages %]
282 [% SWITCH m.message %]
283 [% CASE "book_on_loan" %][% SET cannot_delete_reason = t("Item is checked out") %]
284 [% CASE "not_same_branch" %][% SET cannot_delete_reason = t("Item does not belong to your library") %]
285 [% CASE "book_reserved" %][% SET cannot_delete_reason = t("Item has a waiting hold") %]
286 [% CASE "linked_analytics" %][% SET cannot_delete_reason = t("Item has linked analytics") %]
287 [% CASE "last_item_for_hold" %][% SET cannot_delete_reason = t("Last item for bibliographic record with biblio-level hold on it") %]
288 [% CASE %][% SET cannot_delete_reason = t("Unknown reason") _ '(' _ m.message _ ')' %]
292 <td><input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" disabled="disabled" title="[% cannot_delete_reason | html %]"/></td>
298 <label for="row[% item.itemnumber | html %]">
299 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber | uri %]">
300 [% item.biblio.title | html %]
302 [% IF ( item.biblio.author ) %], by [% item.biblio.author | html %][% END %]
305 <td class="holds_count">
307 [% IF item.item_holds %]
308 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item.biblionumber | uri %]" title="Holds on this item: [% item.item_holds | html %] / Total holds on this record: [% item.holds | html -%]" >
310 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item.biblionumber | uri %]" title="No holds on this item / Total holds on this record: [% item.holds | html -%]" >
314 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item.biblionumber | uri %]" title="Holds on this record: [% item.holds | html -%]" >
316 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item.biblionumber | uri %]" title="No holds on this record" >
318 [% END # /IF item.holds %]
320 [% item.item_holds | html %]/[% item.holds | html %]
322 [% item.holds | html %]
326 [% FOREACH header IN headers %]
327 [% SET attribute = header.attribute %]
328 [% IF header.attribute AND date_fields.grep('^' _ attribute _ '$').size %]
329 <td data-order="[% item.$attribute | html %]">[% item.$attribute | $KohaDates %]</td>
331 <td>[% item.$attribute | html %]</td>
336 [% END # /FOREACH items %]
338 </table> <!-- /#itemst -->