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 subfields_for_item %]
74 [% FOREACH subfield IN subfields %]
75 [% IF subfield.kohafield == 'items.more_subfields_xml' %]
76 [% SET kohafield = 'items.more_subfields_xml_' _ subfield.subfield %]
78 [% SET kohafield = subfield.kohafield %]
82 <div class="subfield_line" style="[% subfield.visibility | html %]" id="subfield[% subfield.tag | html %][% subfield.subfield | html %][% subfield.random | html %]">
83 [% IF ( subfield.mandatory ) %]
84 <label class="required">[% subfield.subfield | html %] - [% subfield.marc_lib | $raw %]</label>
86 <label>[% subfield.subfield | html %] - [% subfield.marc_lib | $raw %]</label>
89 [% SET mv = subfield.marc_value %]
90 [% IF ( mv.type == 'hidden' ) %]
91 <input type="hidden" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]">
92 [% ELSIF ( mv.type == 'select' ) %]
93 [% IF ( mv.readonly || subfield.IS_RETURN_CLAIM ) %]
94 <select name="[% kohafield | html %]" id="[%- mv.id | html -%]" class="input_marceditor" readonly="readonly" disabled="disabled" data-width="50%">
96 <select name="[% kohafield | html %]" id="[%- mv.id | html -%]" class="input_marceditor select2" data-category="[% mv.category | html %]" data-width="50%">
99 [% FOREACH aval IN mv.values %]
100 [% IF aval == mv.default %]
101 <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
103 [% IF subfield.IS_LOST_AV && Koha.Preference("ClaimReturnedLostValue") && aval == Koha.Preference("ClaimReturnedLostValue") %]
104 <option disabled="disabled" value="[%- aval | html -%]" title="Return claims must be processed from the patron details page">[%- mv.labels.$aval | html -%]</option>
106 <option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option>
111 [% ELSIF ( mv.type == 'text_auth' ) %]
113 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
115 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
116 [% SET dopop = "Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=\"${mv.authtypecode}\"&index=${mv.id}','${mv.id}')" %]
117 <a href="#" class="buttonDot" onclick="[%- dopop | html -%]; return false;" title="Tag editor">...</a>
119 [% ELSIF ( mv.type == 'text_plugin' ) %]
121 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
123 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
124 [% IF ( mv.nopopup ) %]
125 <a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="No popup">...</a>
127 <a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="Tag editor">...</a>
129 [% 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 %]
130 [%- mv.javascript | $raw -%]
133 [% ELSIF ( mv.type == 'text' ) %]
135 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
137 <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
139 [% ELSIF ( mv.type == 'textarea' ) %]
141 <textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" rows="5" cols="64" readonly="readonly" >[% mv.value | html %]</textarea>
143 <textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" rows="5" cols="64" >[% mv.value | html %]</textarea>
147 [% IF subfield.kohafield == 'items.more_subfields_xml' %]
148 <input type="hidden" name="items.more_subfields_xml" value="[% subfield.subfield | html %]" />
150 <input type="hidden" name="tag" value="[% subfield.tag | html %]" />
151 <input type="hidden" name="subfield" value="[% subfield.subfield | html %]" />
152 <input type="hidden" name="mandatory" value="[% subfield.mandatory | html %]" />
153 <input type="hidden" name="important" value="[% subfield.important | html %]" />
156 <span name="regex_fields" style="display: none;">
157 s/<input type="text" name="[% kohafield | html %]_regex_search" class="regex_search" placeholder="regex pattern" />/
158 <input type="text" name="[% kohafield | html %]_regex_replace" class="regex_replace" placeholder="regex replacement" />/
159 <input type="text" name="[% kohafield | html %]_regex_modifiers" class="regex_modifiers" placeholder="ig" size="3" />
163 [% IF add_delete_checkbox %]
164 [% UNLESS ( subfield.mandatory ) %]
165 <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 %]" />
167 <span class="required">Required</span>
170 [% IF ( subfield.mandatory ) %] <span class="required">Required</span>
171 [% ELSIF ( subfield.important ) %] <span class="important">Important</span>
176 [% IF (mv.type == 'text' || mv.type == 'text2' || mv.type == 'textarea' ) %]
177 <a href="#" name="[% kohafield | html %]_field_regex" class="field_regex" id="[% subfield.id | html %]" >RegEx</a>
181 [% IF ( subfield.repeatable ) %]
182 <a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode.parentNode); return false;">
183 <img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" />
187 <span class="hint" id="hint[% subfield.tag | html %][% subfield.subfield | html %][% subfield.random | html %]"></span>
195 [% BLOCK items_table_batchmod %]
197 [% IF display_columns_selection %][%# Needs js/pages/batchMod.js %]
198 [% IF checkboxes_edit OR checkboxes_delete %]
200 <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>
204 <div id="cataloguing_additem_itemlist">
207 <strong>Show/hide columns:</strong>
208 <span class="selected">
209 <input type="checkbox" checked="checked" id="showall" />
210 <label for="showall">Show all columns</label>
213 <input type="checkbox" id="hideall" />
214 <label for="hideall">Hide all columns</label>
217 [% FOREACH header IN item_header_loop %]
218 <span class="selected">
219 <input id="checkheader[% loop.count | html %]" type="checkbox" checked="checked" />
220 <label for="checkheader[% loop.count | html %]">[% header.header_value | html %]</label>
223 </p> <!-- /#selections -->
226 [% SET date_fields = [ 'dateaccessioned', 'onloan', 'datelastseen', 'datelastborrowed', 'replacementpricedate' ] %]
230 [% IF checkboxes_edit OR checkboxes_delete %]
233 <th class="anti-the">Title</th>
234 <th class="holds_count" title="Item holds / Total holds">Holds</th>
235 [% FOREACH item_header IN headers %]
236 [% IF item_header.column_name %]
237 <th data-colname="[% item_header.column_name | html %]">
241 [% item_header.header_value | html %]
247 [% FOREACH item IN items %]
248 [% SET can_be_edited = ! ( Koha.Preference('IndependentBranches') && ! logged_in_user && item.homebranch != Branches.GetLoggedInBranchcode() ) %]
251 [% IF checkboxes_edit %]
252 [% UNLESS can_be_edited%]
253 <td class="error">Cannot edit</td>
256 <input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" checked="checked" data-is-onloan="[% item.is_checked_out | html %]" />
259 [% ELSIF checkboxes_delete %]
260 [% UNLESS can_be_edited %]
261 <td class="error">Cannot delete</td>
263 [% IF item.safe_to_delete == 1 %]
264 <td><input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" checked="checked" /></td>
266 [% SWITCH item.safe_to_delete%]
267 [% CASE "book_on_loan" %][% SET cannot_delete_reason = t("Item is checked out") %]
268 [% CASE "not_same_branch" %][% SET cannot_delete_reason = t("Item does not belong to your library") %]
269 [% CASE "book_reserved" %][% SET cannot_delete_reason = t("Item has a waiting hold") %]
270 [% CASE "linked_analytics" %][% SET cannot_delete_reason = t("Item has linked analytics") %]
271 [% CASE "last_item_for_hold" %][% SET cannot_delete_reason = t("Last item for bibliographic record with biblio-level hold on it") %]
272 [% CASE %][% SET cannot_delete_reason = t("Unknown reason") _ '(' _ item.safe_to_delete _ ')' %]
275 <td><input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" disabled="disabled" title="[% cannot_delete_reason | html %]"/></td>
281 <label for="row[% item.itemnumber | html %]">
282 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber | uri %]">
283 [% item.biblio.title | html %]
285 [% IF ( item.biblio.author ) %], by [% item.biblio.author | html %][% END %]
288 <td class="holds_count">
290 [% IF item.item_holds %]
291 <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 -%]" >
293 <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 -%]" >
297 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item.biblionumber | uri %]" title="Holds on this record: [% item.holds | html -%]" >
299 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item.biblionumber | uri %]" title="No holds on this record" >
301 [% END # /IF item.holds %]
303 [% item.item_holds | html %]/[% item.holds | html %]
305 [% item.holds | html %]
309 [% FOREACH header IN headers %]
310 [% SET attribute = header.attribute %]
311 [% IF header.attribute AND date_fields.grep('^' _ attribute _ '$').size %]
312 <td data-order="[% item.$attribute | html %]">[% item.$attribute | $KohaDates %]</td>
314 <td>[% item.$attribute | html %]</td>
319 [% END # /FOREACH items %]
321 </table> <!-- /#itemst -->