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_item_types %]
51 [% FOREACH itemtype IN itemtypes %]
52 [% IF itemtype.itemtype == selected_itemtype %]
53 <option value="[% itemtype.itemtype | html %]" selected="selected">
55 <option value="[% itemtype.itemtype | html %]">
57 [% itemtype.translated_description | html %]
62 [% BLOCK subfields_for_item %]
64 [% FOREACH subfield IN subfields %]
65 [% IF subfield.kohafield == 'items.more_subfields_xml' %]
66 [% SET kohafield = 'items.more_subfields_xml_' _ subfield.subfield %]
68 [% SET kohafield = subfield.kohafield %]
72 <div class="subfield_line" style="[% subfield.visibility | html %]" id="subfield[% subfield.tag | html %][% subfield.subfield | html %][% subfield.random | html %]">
73 [% IF ( subfield.mandatory ) %]
74 <label class="required">[% subfield.subfield | html %] - [% subfield.marc_lib | $raw %]</label>
76 <label>[% subfield.subfield | html %] - [% subfield.marc_lib | $raw %]</label>
79 [% SET mv = subfield.marc_value %]
80 [% IF ( mv.type == 'hidden' ) %]
81 <input type="hidden" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]">
82 [% ELSIF ( mv.type == 'select' ) %]
83 [% IF ( mv.readonly || subfield.IS_RETURN_CLAIM ) %]
84 <select name="[% kohafield | html %]" id="[%- mv.id | html -%]" class="input_marceditor" readonly="readonly" disabled="disabled" data-width="50%">
86 <select name="[% kohafield | html %]" id="[%- mv.id | html -%]" class="input_marceditor select2" data-category="[% mv.category | html %]" data-width="50%">
89 [% FOREACH aval IN mv.values %]
90 [% IF aval == mv.default %]
91 <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
93 [% IF subfield.IS_LOST_AV && Koha.Preference("ClaimReturnedLostValue") && aval == Koha.Preference("ClaimReturnedLostValue") %]
94 <option disabled="disabled" value="[%- aval | html -%]" title="Return claims must be processed from the patron details page">[%- mv.labels.$aval | html -%]</option>
96 <option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option>
101 [% ELSIF ( mv.type == 'text_auth' ) %]
103 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
105 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
106 [% SET dopop = "Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=\"${mv.authtypecode}\"&index=${mv.id}','${mv.id}')" %]
107 <a href="#" class="buttonDot" onclick="[%- dopop | html -%]; return false;" title="Tag editor">...</a>
109 [% ELSIF ( mv.type == 'text_plugin' ) %]
111 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
113 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
114 [% IF ( mv.nopopup ) %]
115 <a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="No popup">...</a>
117 <a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="Tag editor">...</a>
119 [% 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 %]
120 [%- mv.javascript | $raw -%]
123 [% ELSIF ( mv.type == 'text' ) %]
125 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
127 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
129 [% ELSIF ( mv.type == 'textarea' ) %]
131 <textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" rows="5" cols="64" readonly="readonly" >[% mv.value | html %]</textarea>
133 <textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" rows="5" cols="64" >[% mv.value | html %]</textarea>
137 [% IF subfield.kohafield == 'items.more_subfields_xml' %]
138 <input type="hidden" name="items.more_subfields_xml" value="[% subfield.subfield | html %]" />
140 <input type="hidden" name="tag" value="[% subfield.tag | html %]" />
141 <input type="hidden" name="subfield" value="[% subfield.subfield | html %]" />
142 <input type="hidden" name="mandatory" value="[% subfield.mandatory | html %]" />
143 <input type="hidden" name="important" value="[% subfield.important | html %]" />
146 <span name="regex_fields" style="display: none;">
147 s/<input type="text" name="[% kohafield | html %]_regex_search" class="regex_search" placeholder="regex pattern" />/
148 <input type="text" name="[% kohafield | html %]_regex_replace" class="regex_replace" placeholder="regex replacement" />/
149 <input type="text" name="[% kohafield | html %]_regex_modifiers" class="regex_modifiers" placeholder="ig" size="3" />
153 [% IF add_delete_checkbox %]
154 [% UNLESS ( subfield.mandatory ) %]
155 <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="[% subfield.subfield | html %]" />
157 <span class="required">Required</span>
160 [% IF ( subfield.mandatory ) %] <span class="required">Required</span>
161 [% ELSIF ( subfield.important ) %] <span class="important">Important</span>
166 [% IF (mv.type == 'text' || mv.type == 'text2' || mv.type == 'textarea' ) %]
167 <a href="#" name="[% kohafield | html %]_field_regex" class="field_regex" id="[% subfield.id | html %]" >RegEx</a>
171 [% IF ( subfield.repeatable ) %]
172 <a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode.parentNode); return false;">
173 <img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" />
177 <span class="hint" id="hint[% subfield.tag | html %][% subfield.subfield | html %][% subfield.random | html %]"></span>
185 [% BLOCK items_table_batchmod %]
187 [% IF display_columns_selection %][%# Needs js/pages/batchMod.js %]
188 [% IF checkboxes_edit OR checkboxes_delete %]
190 <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>
194 <div id="cataloguing_additem_itemlist">
197 <strong>Show/hide columns:</strong>
198 <span class="selected">
199 <input type="checkbox" checked="checked" id="showall" />
200 <label for="showall">Show all columns</label>
203 <input type="checkbox" id="hideall" />
204 <label for="hideall">Hide all columns</label>
207 [% FOREACH header IN item_header_loop %]
208 <span class="selected">
209 <input id="checkheader[% loop.count | html %]" type="checkbox" checked="checked" />
210 <label for="checkheader[% loop.count | html %]">[% header.header_value | html %]</label>
213 </p> <!-- /#selections -->
216 [% SET date_fields = [ 'dateaccessioned', 'onloan', 'datelastseen', 'datelastborrowed', 'replacementpricedate' ] %]
220 [% IF checkboxes_edit OR checkboxes_delete %]
223 <th class="anti-the">Title</th>
224 <th class="holds_count" title="Item holds / Total holds">Holds</th>
225 [% FOREACH item_header IN headers %]
226 [% IF item_header.column_name %]
227 <th data-colname="[% item_header.column_name | html %]">
231 [% item_header.header_value | html %]
237 [% FOREACH item IN items %]
238 [% SET can_be_edited = ! ( Koha.Preference('IndependentBranches') && ! logged_in_user && item.homebranch != Branches.GetLoggedInBranchcode() ) %]
241 [% IF checkboxes_edit %]
242 [% UNLESS can_be_edited%]
243 <td class="error">Cannot edit</td>
246 <input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" checked="checked" data-is-onloan="[% item.is_checked_out | html %]" />
249 [% ELSIF checkboxes_delete %]
250 [% UNLESS can_be_edited %]
251 <td class="error">Cannot delete</td>
253 [% IF item.safe_to_delete == 1 %]
254 <td><input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" checked="checked" /></td>
256 [% SWITCH item.safe_to_delete%]
257 [% CASE "book_on_loan" %][% SET cannot_delete_reason = t("Item is checked out") %]
258 [% CASE "not_same_branch" %][% SET cannot_delete_reason = t("Item does not belong to your library") %]
259 [% CASE "book_reserved" %][% SET cannot_delete_reason = t("Item has a waiting hold") %]
260 [% CASE "linked_analytics" %][% SET cannot_delete_reason = t("Item has linked analytics") %]
261 [% CASE "last_item_for_hold" %][% SET cannot_delete_reason = t("Last item for bibliographic record with biblio-level hold on it") %]
262 [% CASE %][% SET cannot_delete_reason = t("Unknown reason") _ '(' _ item.safe_to_delete _ ')' %]
265 <td><input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" disabled="disabled" title="[% cannot_delete_reason | html %]"/></td>
271 <label for="row[% item.itemnumber | html %]">
272 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber | uri %]">
273 [% item.biblio.title | html %]
275 [% IF ( item.biblio.author ) %], by [% item.biblio.author | html %][% END %]
278 <td class="holds_count">
280 [% IF item.item_holds %]
281 <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 -%]" >
283 <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 -%]" >
287 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item.biblionumber | uri %]" title="Holds on this record: [% item.holds | html -%]" >
289 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item.biblionumber | uri %]" title="No holds on this record" >
291 [% END # /IF item.holds %]
293 [% item.item_holds | html %]/[% item.holds | html %]
295 [% item.holds | html %]
299 [% FOREACH header IN headers %]
300 [% SET attribute = header.attribute %]
301 [% IF header.attribute AND date_fields.grep('^' _ attribute _ '$').size %]
302 <td data-order="[% item.$attribute | html %]">[% item.$attribute | $KohaDates %]</td>
304 <td>[% item.$attribute | html %]</td>
309 [% END # /FOREACH items %]
311 </table> <!-- /#itemst -->