f808671295
The indicator value for 952 was hard coded in every case to " ". In order to achieve that we can simply pass undef to TransformHtmlToXml() and it will set the indicator values to " ". To test: 1) Make sure the submission of (at least some) the modified files still work, e.g. test that making a new item via cataloguing/additem.pl works. Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
305 lines
18 KiB
Text
305 lines
18 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE Koha %]
|
|
[% USE Branches %]
|
|
[% USE KohaDates %]
|
|
[% USE TablesSettings %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Items › [% biblio.title | html %] [% IF ( biblio.author ) %] by [% biblio.author | html %][% END %] (Record #[% biblio.biblionumber | html %]) › Cataloging › Koha</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% Asset.css("css/addbiblio.css") | $raw %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script>
|
|
[% IF Koha.Preference('CreateAVFromCataloguing') && CAN_user_parameters_manage_auth_values %]
|
|
var auth_values_creation = 1;
|
|
[% ELSE %]
|
|
var auth_values_creation = 0;
|
|
[% END %]
|
|
</script>
|
|
[% INCLUDE 'select2.inc' %]
|
|
[% Asset.js("js/cataloging.js") | $raw %]
|
|
[% INCLUDE 'columns_settings.inc' %]
|
|
[% Asset.js("js/browser.js") | $raw %]
|
|
[% INCLUDE 'calendar.inc' %]
|
|
[% INCLUDE 'str/cataloging_additem.inc' %]
|
|
[% Asset.js("js/cataloging_additem.js") | $raw %]
|
|
</head>
|
|
|
|
<body id="cat_additem" class="cat">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cataloging-search.inc' %]
|
|
|
|
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
|
|
<ol>
|
|
<li>
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
|
|
</li>
|
|
<li>
|
|
<a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a>
|
|
</li>
|
|
<li>
|
|
<a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblio.biblionumber | uri %]">Edit <em>[% biblio.title | html %] [% IF ( biblio.author ) %] by [% biblio.author | html %][% END %] (Record #[% biblio.biblionumber | html %])</em></a>
|
|
</li>
|
|
<li>
|
|
<a href="#" aria-current="page">
|
|
Items
|
|
</a>
|
|
</li>
|
|
</ol>
|
|
</nav>
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<main>
|
|
[% INCLUDE 'blocking_errors.inc' %]
|
|
<h1>Items for [% biblio.title | html %] [% IF ( biblio.author ) %] by [% biblio.author | html %][% END %] (Record #[% biblio.biblionumber | html %])</h1>
|
|
|
|
[% IF ( barcode_not_unique ) %]<div class="dialog alert"><strong>Error saving item</strong>: Barcode must be unique.</div>[% END %]
|
|
[% IF ( no_next_barcode ) %]<div class="dialog alert"><strong>Error saving items</strong>: Unable to automatically determine values for barcodes. No item has been inserted.</div>[% END %]
|
|
[% IF ( book_on_loan ) %]<div class="dialog alert"><strong>Cannot delete</strong>: item is checked out.</div>[% END %]
|
|
[% IF ( book_reserved ) %]<div class="dialogalert"><strong>Cannot delete</strong>: item has a waiting hold.</div>[% END %]
|
|
[% IF ( not_same_branch ) %]<div class="dialog alert"><strong>Cannot delete</strong>: The items do not belong to your library.</div>[% END %]
|
|
[% IF ( linked_analytics ) %]<div class="dialog alert"><strong>Cannot delete</strong>: item has linked <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]&analyze=1">analytics.</a>.</div>[% END %]
|
|
[% IF last_item_for_hold %]<div class="dialog alert"><strong>Cannot delete</strong>: Last item for bibliographic record with biblio-level hold on it.</div>[% END %]
|
|
|
|
<div id="cataloguing_additem_itemlist">
|
|
[% IF items %]
|
|
[% SET date_fields = [ 'dateaccessioned', 'onloan', 'datelastseen', 'datelastborrowed', 'replacementpricedate' ] %]
|
|
<div>
|
|
<table id="itemst">
|
|
<thead>
|
|
<tr>
|
|
<th class="NoSort"> </th>
|
|
[% FOREACH item_header IN item_header_loop %]
|
|
[% IF item_header.column_name %]
|
|
<th data-colname="[% item_header.column_name | html %]">
|
|
[% ELSE %]
|
|
<th>
|
|
[% END %]
|
|
[% item_header.header_value | html %]
|
|
</th>
|
|
[% END %]
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH item IN items %]
|
|
[% SET can_be_edited = ! ( Koha.Preference('IndependentBranches') && ! logged_in_user && item.homebranch != Branches.GetLoggedInBranchcode() ) %]
|
|
[% IF item.itemnumber == itemnumber%]
|
|
[% UNLESS can_be_edited %]
|
|
<tr id="row[% item.itemnumber | html %]" class="active">
|
|
[% ELSE %]
|
|
<tr id="row[% item.itemnumber | html %]" class="active editable">
|
|
[% END %]
|
|
[% ELSE %]
|
|
[% UNLESS can_be_edited %]
|
|
<tr id="row[% item.itemnumber | html %]">
|
|
[% ELSE %]
|
|
<tr id="row[% item.itemnumber | html %]" class="editable">
|
|
[% END %]
|
|
[% END %]
|
|
[% UNLESS can_be_edited %]
|
|
<td> </td>
|
|
[% ELSE %]
|
|
<td>
|
|
<div class="btn-group dropup">
|
|
<a class="btn btn-default btn-xs dropdown-toggle" id="itemactions[% item.itemnumber | html %]" role="button" data-toggle="dropdown" href="#">
|
|
Actions <b class="caret"></b>
|
|
</a>
|
|
<ul class="dropdown-menu" role="menu" aria-labelledby="itemactions[% item.itemnumber | html %]">
|
|
|
|
[% IF item.biblionumber != biblio.biblionumber %] [%# Host item %]
|
|
<li><a href="additem.pl?op=edititem&biblionumber=[% item.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]#edititem">Edit in host</a> <a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delinkitem&biblionumber=[% biblio.biblionumber | html %]&hostitemnumber=[% item.itemnumber | html %]&searchid=[% searchid | html %]">Delink</a></li>
|
|
[% ELSE %]
|
|
<li><a href="additem.pl?op=edititem&biblionumber=[% biblio.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]&searchid=[% searchid | uri %]#edititem">Edit</a></li>
|
|
<li><a href="additem.pl?op=dupeitem&biblionumber=[% biblio.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]&searchid=[% searchid | uri %]#additema">Duplicate</a></li>
|
|
<li class="print_label"><a href="/cgi-bin/koha/labels/label-edit-batch.pl?op=add&number_type=itemnumber&number_list=[% item.itemnumber | uri %]" target="_blank" >Print label</a></li>
|
|
<li><a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delitem&biblionumber=[% item.biblionumber | html %]&itemnumber=[% item.itemnumber | html %]&searchid=[% searchid | html %]" onclick="return confirm_deletion();">Delete</a></li>
|
|
[% END %]
|
|
[% IF ( OPACBaseURL ) %]
|
|
<li class="view-in-opac"><a target="_blank" href="[% Koha.Preference('OPACBaseURL') | url %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber | uri %]">OPAC view</a></li>
|
|
[% END %]
|
|
</ul>
|
|
</div>
|
|
</td>
|
|
[% END %]
|
|
[% FOREACH header IN item_header_loop %]
|
|
[% SET attribute = header.attribute %]
|
|
[% IF header.attribute AND date_fields.grep('^' _ attribute _ '$').size %]
|
|
<td data-order="[% item.$attribute | html %]">[% item.$attribute | $KohaDates %]</td>
|
|
[% ELSE %]
|
|
<td>[% item.$attribute | html %]</td>
|
|
[% END %]
|
|
[% END %]
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
[% END %]
|
|
|
|
<div class="row">
|
|
<div class="col-sm-2">
|
|
[% INCLUDE 'biblio-view-menu.inc' %]
|
|
</div>
|
|
<div class="col-sm-10">
|
|
|
|
<div id="cataloguing_additem_newitem">
|
|
<form id="f" method="post" action="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblio.biblionumber | html %]" name="f">
|
|
<input type="hidden" name="op" value="[% op | html %]" />
|
|
[% IF (popup) %]
|
|
<input type="hidden" name="popup" value="1" />
|
|
[% END %]
|
|
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]" />
|
|
[% IF op != 'saveitem' %]
|
|
<h2 id="additema">Add item [% IF (circborrowernumber) %]<em>(fast cataloging)</em>[% END %]</h2>
|
|
[% ELSE %]
|
|
<h2 id="edititem">Edit item #[% itemnumber | html %][% IF ( barcode ) %] / Barcode [% barcode | html %][% END %]</h2>
|
|
[% END %]
|
|
<fieldset class="rows">
|
|
<ol>
|
|
[% FOREACH subfield IN subfields %]
|
|
|
|
[% IF subfield.kohafield == 'items.more_subfields_xml' %]
|
|
[% SET kohafield = 'items.more_subfields_xml_' _ subfield.subfield %]
|
|
[% ELSE %]
|
|
[% SET kohafield = subfield.kohafield %]
|
|
[% END %]
|
|
|
|
<li><div class="subfield_line" style="[% subfield.visibility | html %]" id="subfield[% subfield.tag | html %][% subfield.subfield | html %][% subfield.random | html %]">
|
|
[% IF ( subfield.mandatory ) %]
|
|
<label class="required">[% subfield.subfield | html %] - [% subfield.marc_lib | $raw %]</label>
|
|
[% ELSE %]
|
|
<label>[% subfield.subfield | html %] - [% subfield.marc_lib | $raw %]</label>
|
|
[% END %]
|
|
|
|
[% 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 -%]">
|
|
[% 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%">
|
|
[% ELSE %]
|
|
<select name="[% kohafield | html %]" id="[%- mv.id | html -%]" class="input_marceditor" data-category="[% mv.category | html %]" data-width="50%">
|
|
[% END %]
|
|
[% FOREACH aval IN mv.values %]
|
|
[% IF aval == mv.default %]
|
|
<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>
|
|
[% ELSE %]
|
|
<option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
[% 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" />
|
|
[% ELSE %]
|
|
<input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" 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" />
|
|
[% ELSE %]
|
|
<input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" 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>
|
|
[% ELSE %]
|
|
<a href="#" id="buttonDot_[%- mv.id | html -%]" class="[%- mv.class | html -%]" title="Tag editor">...</a>
|
|
[% END %]
|
|
[%- mv.javascript | $raw -%]
|
|
[% 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" />
|
|
[% ELSE %]
|
|
<input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" 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>
|
|
[% ELSE %]
|
|
<textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor" rows="5" cols="64" >[% mv.value | html %]</textarea>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF subfield.kohafield == 'items.more_subfields_xml' %]
|
|
<input type="hidden" name="items.more_subfields_xml" value="[% subfield.subfield | html %]" />
|
|
[% END %]
|
|
<input type="hidden" name="tag" value="[% subfield.tag | html %]" />
|
|
<input type="hidden" name="subfield" value="[% subfield.subfield | html %]" />
|
|
<input type="hidden" name="mandatory" value="[% subfield.mandatory | html %]" />
|
|
<input type="hidden" name="important" value="[% subfield.important | html %]" />
|
|
[% IF ( subfield.repeatable ) %]
|
|
<a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode.parentNode); return false;">
|
|
<img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" />
|
|
</a>
|
|
[% END %]
|
|
[% IF ( subfield.mandatory ) %] <span class="required">Required</span>
|
|
[% ELSIF ( subfield.important ) %] <span class="important">Important</span>
|
|
[% END %]
|
|
</div></li>
|
|
[% END %]
|
|
</ol>
|
|
</fieldset>
|
|
[% IF op != 'add_item' %]
|
|
<input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
|
|
[% END %]
|
|
|
|
<fieldset class="action"> [% IF op != 'saveitem' %]
|
|
<input type="submit" name="phony_submit" value="phony_submit" id="phony_submit" style="display:none;" onclick="return false;" />
|
|
<!-- Note : We use here a false submit button because we have several submit buttons and we don't want the user to believe they validated the adding of multiple items
|
|
when pressing the enter key, while in fact it is the first submit button that is validated, in our case the "add (single) item" button.
|
|
It is a bit tricky, but necessary in the sake of UI correctness.
|
|
-->
|
|
<span id="addsingle">
|
|
<input type="submit" name="add_submit" value="Add item" onclick="return Check(this.form)" />
|
|
<input type="submit" name="add_duplicate_submit" value="Add & duplicate" onclick="return Check(this.form)" />
|
|
</span>
|
|
<span id="addmultiple">
|
|
<input type="button" name="add_multiple_copies" id="add_multiple_copies" value="Add multiple copies of this item" />
|
|
</span>
|
|
<fieldset id="add_multiple_copies_span">
|
|
<label for="number_of_copies">Number of copies of this item to add: </label>
|
|
<input type="text" id="number_of_copies" name="number_of_copies" value="" size="2" />
|
|
<input type="submit" id="add_multiple_copies_submit" name="add_multiple_copies_submit" value="Add" onclick="javascript:return Check(this.form) && CheckMultipleAdd(this.form.number_of_copies.value);" /> <a href="#" id="cancel_add_multiple" class="cancel">Cancel</a>
|
|
<div class="hint"><p>The barcode you enter will be incremented for each additional item.</p></div>
|
|
</fieldset>
|
|
|
|
[% ELSE %]
|
|
<input type="hidden" name="tag" value="[% itemtagfield | html %]" />
|
|
<input type="hidden" name="subfield" value="[% itemtagsubfield | html %]" />
|
|
[% IF op != 'add_item' %]
|
|
<input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
|
|
[% END %]
|
|
<input type="submit" value="Save changes" onclick="return Check(this.form)">
|
|
<input type="button" id="addnewitem" value="Add a new item">
|
|
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Cancel</a>
|
|
[% END %]</fieldset>
|
|
|
|
[%# Fields for fast cataloging %]
|
|
<input type="hidden" name="circborrowernumber" value="[% circborrowernumber | html %]" />
|
|
<input type="hidden" name="stickyduedate" value="[% stickyduedate | html %]" />
|
|
<input type="hidden" name="barcode" value="[% barcode | html %]" />
|
|
<input type="hidden" name="duedatespec" value="[% duedatespec | html %]" />
|
|
[%# End fields for fast cataloging %]
|
|
|
|
|
|
</form>
|
|
|
|
[% INCLUDE 'modals/cataloguing_create_av.inc' %]
|
|
|
|
</div> <!-- /#cataloguing_additem_newitem -->
|
|
</div> <!-- /.col-sm-10 -->
|
|
</div> <!-- /.row -->
|
|
</div> <!-- /#cataloguing_additem_itemlist -->
|
|
</main>
|
|
</div> <!-- /.col-sm-12 -->
|
|
</div> <!-- /.row -->
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|