[% END %]
[% END %]
+[% BLOCK biblio_a_href -%]
+ [%- IF Koha.Preference('IntranetBiblioDefaultView') == 'marc' && Koha.Preference('viewMARC') -%]
+ [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=" -%]
+ [%- ELSIF Koha.Preference('IntranetBiblioDefaultView') == 'labeled_marc' && Koha.Preference('viewLabeledMARC') -%]
+ [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=" -%]
+ [%- ELSIF Koha.Preference('IntranetBiblioDefaultView') == 'isbd' && Koha.Preference('viewISBD') -%]
+ [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=" -%]
+ [%- ELSE -%]
+ [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/detail.pl?biblionumber=" -%]
+ [%- END -%]
+ [%- this_biblio_href | url %][% biblionumber | url -%]
+[%- END %]
+
[% BLOCK subfields_for_item %]
<ol>
[% FOREACH subfield IN subfields %]
[% SET mv = subfield.marc_value %]
[% IF ( mv.type == 'hidden' ) %]
- <input type="hidden" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]">
+ <input type="hidden" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]">
[% ELSIF ( mv.type == 'select' ) %]
[% IF ( mv.readonly || subfield.IS_RETURN_CLAIM ) %]
- <select name="[% kohafield | html %]" id="[%- mv.id | html -%]" class="input_marceditor" readonly="readonly" disabled="disabled" data-width="50%">
+ <select name="[% kohafield | html %]" id="[%- mv.id | html -%]" class="input_marceditor [% kohafield | html %]" readonly="readonly" disabled="disabled" data-width="50%">
[% ELSE %]
- <select name="[% kohafield | html %]" id="[%- mv.id | html -%]" class="input_marceditor select2" data-category="[% mv.category | html %]" data-width="50%">
+ <select name="[% kohafield | html %]" id="[%- mv.id | html -%]" class="input_marceditor select2 [% kohafield | html %]" data-category="[% mv.category | html %]" data-width="50%">
[% END %]
+ [% SET matched = 0 %]
[% FOREACH aval IN mv.values %]
[% IF aval == mv.default %]
+ [% SET matched = 1 %]
<option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
[% ELSE %]
[% IF subfield.IS_LOST_AV && Koha.Preference("ClaimReturnedLostValue") && aval == Koha.Preference("ClaimReturnedLostValue") %]
<option disabled="disabled" value="[%- aval | html -%]" title="Return claims must be processed from the patron details page">[%- mv.labels.$aval | html -%]</option>
+ [% ELSIF subfield.IS_LOST_AV && Koha.Preference("BundleLostValue") && aval == Koha.Preference("BundleLostValue") %]
+ <option disabled="disabled" value="[%- aval | html -%]" title="Bundle losses are set at checkin automatically">[%- mv.labels.$aval | html -%]</option>
[% ELSE %]
<option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option>
[% END %]
[% END %]
[% END %]
- </select>
+ [% UNLESS matched || ( ( kohafield == 'items.damaged' || kohafield == 'items.itemlost' || kohafield == 'items.withdrawn' || kohafield == 'items.notforloan' ) && mv.default == '0' ) %]
+ [%# If the current value is not in the authorised list and is not a field where 0 means unset #%]
+ <option value="[%- mv.default | html -%]" selected="selected">[%- mv.default | html -%] (Not an authorised value)</option>
+ </select>
+ <span style="float:right;" title="The current value [% mv.default | html %] is not configured for the authorised value category controlling this subfield"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i></span>
+ [% ELSE %]
+ </select>
+ [% END %]
[% ELSIF ( mv.type == 'text_auth' ) %]
[% IF mv.readonly %]
- <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
+ <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
[% ELSE %]
- <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
+ <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
[% SET dopop = "Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=\"${mv.authtypecode}\"&index=${mv.id}','${mv.id}')" %]
<a href="#" class="buttonDot" onclick="[%- dopop | html -%]; return false;" title="Tag editor">...</a>
[% END %]
[% ELSIF ( mv.type == 'text_plugin' ) %]
[% IF mv.readonly %]
- <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
+ <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
[% ELSE %]
- <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
+ <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
[% IF ( mv.nopopup ) %]
- <a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="No popup">...</a>
+ <a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="No popup">...</a>
[% ELSE %]
<a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="Tag editor">...</a>
[% END %]
[% END %]
[% ELSIF ( mv.type == 'text' ) %]
[% IF mv.readonly %]
- <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
+ <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
[% ELSE %]
- <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
+ <input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
[% END %]
[% ELSIF ( mv.type == 'textarea' ) %]
[% IF mv.readonly %]
- <textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" rows="5" cols="64" readonly="readonly" >[% mv.value | html %]</textarea>
+ <textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" rows="5" cols="64" readonly="readonly" >[% mv.value | html %]</textarea>
[% ELSE %]
- <textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" rows="5" cols="64" >[% mv.value | html %]</textarea>
+ <textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" rows="5" cols="64" >[% mv.value | html %]</textarea>
[% END %]
[% END %]
[% END %]
[% IF add_regex %]
- [% IF (mv.type == 'text' || mv.type == 'text2' || mv.type == 'textarea' ) %]
+ [% IF (mv.type == 'text' || mv.type == 'text_plugin' || mv.type == 'textarea' ) %]
<a href="#" name="[% kohafield | html %]_field_regex" class="field_regex" id="[% subfield.id | html %]" >RegEx</a>
[% END %]
[% END %]
[% END %]
[% BLOCK items_table_batchmod %]
-
+<div class="page-section">
[% IF display_columns_selection %][%# Needs js/pages/batchMod.js %]
[% IF checkboxes_edit OR checkboxes_delete %]
- <div id="toolbar">
+ <div class="btn-toolbar selections-toolbar">
<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>
</div>
[% END %]
<table id="itemst">
<thead>
<tr>
+ <th></th>
[% IF checkboxes_edit OR checkboxes_delete %]
<th></th>
[% END %]
</thead>
<tbody>
[% FOREACH item IN items %]
- [% SET can_be_edited = ! ( Koha.Preference('IndependentBranches') && ! logged_in_user && item.homebranch != Branches.GetLoggedInBranchcode() ) %]
+ [% SET can_be_edited = !item.nomod && !( Koha.Preference('IndependentBranches') && ! logged_in_user && item.homebranch != Branches.GetLoggedInBranchname() ) %]
<tr>
+ <td>[% item.index + 1 | html %]</td>
[% IF checkboxes_edit %]
[% UNLESS can_be_edited%]
- <td class="error">Cannot edit</td>
+ <td class="error">
+ <i class="fa fa-times fa-lg" title="Cannot edit"></i>
+ </td>
[% ELSE %]
<td>
<input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" checked="checked" data-is-onloan="[% item.is_checked_out | html %]" />
[% END %]
[% ELSIF checkboxes_delete %]
[% UNLESS can_be_edited %]
- <td class="error">Cannot delete</td>
+ <td class="error">
+ <i class="fa fa-times fa-lg" title="Cannot delete"></i>
+ </td>
[% ELSE %]
[% IF item.safe_to_delete %]
<td><input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" checked="checked" /></td>
[% END %]
[% END %]
- <td><input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" disabled="disabled" title="[% cannot_delete_reason | html %]"/></td>
+ <td class="error">
+ <i class="fa fa-times fa-lg" title="[% cannot_delete_reason | html %]"></i>
+ </td>
[% END %]
[% END %]
<td>[% item.$attribute | html %]</td>
[% END %]
[% END %]
-
</tr>
[% END # /FOREACH items %]
</tbody>
</table> <!-- /#itemst -->
+</div>
+[% END %]
+[%# BOOTSTRAP TAB WRAPPER USAGE
+ [ WRAPPER tabs id= "tabs_container_id" ]
+ [ WRAPPER tabs_nav ]
+ [ WRAPPER tab_item tabname= "tab_name_1" bt_active= 1 ] Tab text 1 [ END ]
+ [ WRAPPER tab_item tabname= "tab_name_2" ] Tab text 2 [ END ]
+ ...
+ [ END ]
+ [ WRAPPER tab_panels ]
+ [ WRAPPER tab_panel tabname="tab_name_1" bt_active= 1 ] Panel contents 1 [ END ]
+ [ WRAPPER tab_panel tabname="tab_name_2" ] Panel contents 2 [ END ]
+ ...
+ [ END ]
+ [ END ]
+ %]
+
+[% BLOCK tabs %]
+ [% IF ( id ) %]
+ <div id="[% id | html %]" class="toptabs">
+ [% ELSE %]
+ <div class="toptabs">
+ [% END %]
+ [% content | $raw %]
+ </div>
+[% END %]
+
+[% BLOCK tabs_nav %]
+ <ul class="nav nav-tabs" role="tablist">
+ [% content | $raw %]
+ </ul>
+[% END %]
+
+[% BLOCK tab_item %]
+ [% IF ( bt_active ) %]
+ <li role="presentation" class="active">
+ [% ELSE %]
+ <li role="presentation">
+ [% END %]
+ <a href="#[% tabname | uri %]_panel" aria-controls="[% tabname | uri %]_panel" role="tab" data-toggle="tab">
+ [% content | $raw %]
+ </a>
+ </li>
+[% END %]
+
+[% BLOCK tab_panels %]
+ <div class="tab-content">
+ [% content | $raw %]
+ </div>
+[% END %]
+
+[% BLOCK tab_panel %]
+ [% IF ( bt_active ) %]
+ <div role="tabpanel" class="tab-pane active" id="[% tabname | html %]_panel">
+ [% ELSE %]
+ <div role="tabpanel" class="tab-pane" id="[% tabname | html %]_panel">
+ [% END %]
+ [% content| $raw %]
+ </div>
+[% END %]
+
+[%# BOOTSTRAP BREADCRUMBS WRAPPER USAGE
+ [ WRAPPER breadcrumbs ]
+ [ Home breadcrumb automatically included ]
+ [ WRAPPER breadcrumb_item ]
+ <a href="/cgi-bin/koha/module/module-home.pl"> Module </a>
+ [ END ]
+
+ [ IF op == 'add_form' ]
+ [ WRAPPER breadcrumb_item ]
+ <a href="/cgi-bin/koha/module/page.pl"> Module page </a>
+ [ END ]
+ [ WRAPPER breadcrumb_item bc_active = 1 ]
+ Add form
+ [ END ]
+
+ [ ELSIF op == 'delete_confirm' ]
+ [ WRAPPER breadcrumb_item ]
+ <a href="/cgi-bin/koha/module/page.pl"> Module page </a>
+ [ END ]
+ [ WRAPPER breadcrumb_item bc_active = 1 ]
+ Confirm deletion
+ [ END ]
+
+ [ ELSE ]
+ [ WRAPPER breadcrumb_item bc_active = 1 ]
+ Module page
+ [ END ]
+ [ END #/IF op = add_form ]
+
+ [ END #/ WRAPPER breadcrumbs ]
+ %]
+
+[%# Used to build breadcrumb navigation nav %]
+[% BLOCK breadcrumbs %]
+ <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ [%# Include the Home link every time %]
+ [% WRAPPER breadcrumb_item %]
+ <a href="/cgi-bin/koha/mainpage.pl" title="Home">Home</a>
+ [% END %]
+ [% content | $raw %]
+ </ol>
+ </nav>
+[% END %]
+
+[%# Used to build individual breadcrumb items in the breadcrumb nav %]
+[% BLOCK breadcrumb_item %]
+ [% IF ( bc_active ) %]
+ <li>
+ <a href="#" aria-current="page">
+ [% content | $raw %]
+ </a>
+ </li>
+ [% ELSE %]
+ <li>
+ [% content | $raw %]
+ </li>
+ [% END %]
[% END %]