Bug 27526: Remove uneeded call to TransformMarcToKoha
And also clean some imports. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
b21be4f35e
commit
5c0c400e16
|
|
@ -25,17 +25,13 @@ use CGI qw ( -utf8 );
|
|||
use C4::Auth qw( get_template_and_user haspermission );
|
||||
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
|
||||
use C4::Biblio qw(
|
||||
GetAuthorisedValueDesc
|
||||
GetFrameworkCode
|
||||
GetMarcBiblio
|
||||
GetMarcFromKohaField
|
||||
GetMarcStructure
|
||||
IsMarcStructureInternal
|
||||
ModBiblio
|
||||
TransformHtmlToXml
|
||||
TransformMarcToKoha
|
||||
);
|
||||
use C4::Items qw( AddItemFromMarc ModItemFromMarc );
|
||||
use C4::Context;
|
||||
use C4::Circulation qw( LostItem );
|
||||
use C4::Koha qw( GetAuthorisedValues );
|
||||
|
|
@ -412,7 +408,6 @@ my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
|||
output_and_exit_if_error( $input, $cookie, $template,
|
||||
{ module => 'cataloguing', record => $record } );
|
||||
|
||||
my $oldrecord = TransformMarcToKoha($record);
|
||||
my $current_item;
|
||||
my $nextop="additem";
|
||||
my @errors; # store errors found while checking data BEFORE saving item.
|
||||
|
|
@ -901,9 +896,7 @@ foreach my $tag ( keys %{$tagslib} ) {
|
|||
|
||||
# what's the next op ? it's what we are not in : an add if we're editing, otherwise, and edit.
|
||||
$template->param(
|
||||
biblionumber => $biblionumber,
|
||||
title => $oldrecord->{title},
|
||||
author => $oldrecord->{author},
|
||||
biblio => $biblio,
|
||||
items => \@items,
|
||||
item_header_loop => \@header_value_loop,
|
||||
subfields => \@subfields,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
[% USE KohaDates %]
|
||||
[% USE TablesSettings %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>Items › [% title | html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber | html %]) › Cataloging › Koha</title>
|
||||
<title>Items › [% biblio.title | html %] [% IF ( 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' %]
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
<a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | uri %]">Edit <em>[% title | html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber | html %])</em></a>
|
||||
<a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblio.biblionumber | uri %]">Edit <em>[% biblio.title | html %] [% IF ( author ) %] by [% biblio.author | html %][% END %] (Record #[% biblio.biblionumber | html %])</em></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" aria-current="page">
|
||||
|
|
@ -53,14 +53,14 @@
|
|||
<div class="col-sm-12">
|
||||
<main>
|
||||
[% INCLUDE 'blocking_errors.inc' %]
|
||||
<h1>Items for [% title | html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber | html %])</h1>
|
||||
<h1>Items for [% biblio.title | html %] [% IF ( 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=[% biblionumber | uri %]&analyze=1">analytics.</a>.</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">
|
||||
|
|
@ -108,11 +108,11 @@
|
|||
</a>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="itemactions[% item.itemnumber | html %]">
|
||||
|
||||
[% IF item.biblionumber != 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=[% biblionumber | html %]&hostitemnumber=[% item.itemnumber | html %]&searchid=[% searchid | html %]">Delink</a></li>
|
||||
[% 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=[% biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]&searchid=[% searchid | uri %]#edititem">Edit</a></li>
|
||||
<li><a href="additem.pl?op=dupeitem&biblionumber=[% biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]&searchid=[% searchid | uri %]#additema">Duplicate</a></li>
|
||||
<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 %]
|
||||
|
|
@ -145,12 +145,12 @@
|
|||
<div class="col-sm-10">
|
||||
|
||||
<div id="cataloguing_additem_newitem">
|
||||
<form id="f" method="post" action="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber | html %]" name="f">
|
||||
<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="[% biblionumber | html %]" />
|
||||
<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 %]
|
||||
|
|
@ -281,7 +281,7 @@
|
|||
[% 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=[% biblionumber | uri %]">Cancel</a>
|
||||
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Cancel</a>
|
||||
[% END %]</fieldset>
|
||||
|
||||
[%# Fields for fast cataloging %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue