Merge branch 'bug_7253' into 3.12-master
This commit is contained in:
commit
b60a8397c1
|
|
@ -39,6 +39,7 @@ use C4::Charset;
|
|||
use Date::Calc qw(Today);
|
||||
use MARC::File::USMARC;
|
||||
use MARC::File::XML;
|
||||
use URI::Escape;
|
||||
|
||||
if ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) {
|
||||
MARC::File::XML->default_record_format('UNIMARC');
|
||||
|
|
@ -725,8 +726,13 @@ my $redirect = $input->param('redirect');
|
|||
my $dbh = C4::Context->dbh;
|
||||
my $hostbiblionumber = $input->param('hostbiblionumber');
|
||||
my $hostitemnumber = $input->param('hostitemnumber');
|
||||
# fast cataloguing datas in transit
|
||||
my $fa_circborrowernumber = $input->param('circborrowernumber');
|
||||
my $fa_barcode = $input->param('barcode');
|
||||
my $fa_branch = $input->param('branch');
|
||||
my $fa_stickyduedate = $input->param('stickyduedate');
|
||||
my $fa_duedatespec = $input->param('duedatespec');
|
||||
|
||||
|
||||
my $userflags = 'edit_catalogue';
|
||||
if ($frameworkcode eq 'FA'){
|
||||
$userflags = 'fast_cataloging';
|
||||
|
|
@ -748,11 +754,13 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
|||
|
||||
if ($frameworkcode eq 'FA'){
|
||||
# We need to grab and set some variables in the template for use on the additems screen
|
||||
$template->{VARS}->{'circborrowernumber'} = $input->param('borrowernumber');
|
||||
$template->{VARS}->{'barcode'} = $input->param('barcode');
|
||||
$template->{VARS}->{'branch'} = $input->param('branch');
|
||||
$template->{VARS}->{'stickyduedate'} = $input->param('stickyduedate');
|
||||
$template->{VARS}->{'duedatespec'} = $input->param('duedatespec');
|
||||
$template->param(
|
||||
'circborrowernumber' => $fa_circborrowernumber,
|
||||
'barcode' => $fa_barcode,
|
||||
'branch' => $fa_branch,
|
||||
'stickyduedate' => $fa_stickyduedate,
|
||||
'duedatespec' => $fa_duedatespec,
|
||||
);
|
||||
}
|
||||
|
||||
# Getting the list of all frameworks
|
||||
|
|
@ -865,13 +873,15 @@ if ( $op eq "addbiblio" ) {
|
|||
}
|
||||
if ($redirect eq "items" || ($mode ne "popup" && !$is_a_modif && $redirect ne "view")){
|
||||
if ($frameworkcode eq 'FA'){
|
||||
my $borrowernumber = $input->param('circborrowernumber');
|
||||
my $barcode = $input->param('barcode');
|
||||
my $branch = $input->param('branch');
|
||||
my $stickyduedate = $input->param('stickyduedate');
|
||||
my $duedatespec = $input->param('duedatespec');
|
||||
print $input->redirect(
|
||||
"/cgi-bin/koha/cataloguing/additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode&borrowernumber=$borrowernumber&branch=$branch&barcode=$barcode&stickyduedate=$stickyduedate&duedatespec=$duedatespec"
|
||||
'/cgi-bin/koha/cataloguing/additem.pl?'
|
||||
.'biblionumber='.$biblionumber
|
||||
.'&frameworkcode='.$frameworkcode
|
||||
.'&circborrowernumber='.$fa_circborrowernumber
|
||||
.'&branch='.$fa_branch
|
||||
.'&barcode='.uri_escape($fa_barcode)
|
||||
.'&stickyduedate='.$fa_stickyduedate
|
||||
.'&duedatespec='.$fa_duedatespec
|
||||
);
|
||||
exit;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -314,6 +314,12 @@ my $itemnumber = $input->param('itemnumber');
|
|||
my $op = $input->param('op');
|
||||
my $hostitemnumber = $input->param('hostitemnumber');
|
||||
my $marcflavour = C4::Context->preference("marcflavour");
|
||||
# fast cataloguing datas
|
||||
my $fa_circborrowernumber = $input->param('circborrowernumber');
|
||||
my $fa_barcode = $input->param('barcode');
|
||||
my $fa_branch = $input->param('branch');
|
||||
my $fa_stickyduedate = $input->param('stickyduedate');
|
||||
my $fa_duedatespec = $input->param('duedatespec');
|
||||
|
||||
my $frameworkcode = &GetFrameworkCode($biblionumber);
|
||||
|
||||
|
|
@ -507,13 +513,15 @@ if ($op eq "additem") {
|
|||
undef($itemrecord);
|
||||
}
|
||||
}
|
||||
if ($frameworkcode eq 'FA' && $input->param('borrowernumber')){
|
||||
my $redirect_string = 'borrowernumber=' . uri_escape($input->param('borrowernumber')) .
|
||||
'&barcode=' . uri_escape($input->param('barcode'));
|
||||
$redirect_string .= '&duedatespec=' . uri_escape($input->param('duedatespec')) .
|
||||
'&stickyduedate=1';
|
||||
print $input->redirect("/cgi-bin/koha/circ/circulation.pl?" . $redirect_string);
|
||||
exit;
|
||||
if ($frameworkcode eq 'FA' && $fa_circborrowernumber){
|
||||
print $input->redirect(
|
||||
'/cgi-bin/koha/circ/circulation.pl?'
|
||||
.'borrowernumber='.$fa_circborrowernumber
|
||||
.'&barcode='.uri_escape($fa_barcode)
|
||||
.'&duedatespec='.$fa_duedatespec
|
||||
.'&stickyduedate=1'
|
||||
);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -815,11 +823,15 @@ $template->param(
|
|||
);
|
||||
|
||||
if ($frameworkcode eq 'FA'){
|
||||
$template->{VARS}->{'borrowernumber'}=$input->param('borrowernumber');
|
||||
$template->{VARS}->{'barcode'}=$input->param('barcode');
|
||||
$template->{VARS}->{'stickyduedate'}=$input->param('stickduedate');
|
||||
$template->{VARS}->{'duedatespec'}=$input->param('duedatespec');
|
||||
}
|
||||
# fast cataloguing datas
|
||||
$template->param(
|
||||
'circborrowernumber' => $fa_circborrowernumber,
|
||||
'barcode' => $fa_barcode,
|
||||
'branch' => $fa_branch,
|
||||
'stickyduedate' => $fa_stickyduedate,
|
||||
'duedatespec' => $fa_duedatespec,
|
||||
);
|
||||
}
|
||||
|
||||
foreach my $error (@errors) {
|
||||
$template->param($error => 1);
|
||||
|
|
|
|||
|
|
@ -276,7 +276,12 @@ function Changefwk(FwkList) {
|
|||
<div id="yui-main">
|
||||
<div class="yui-g">
|
||||
|
||||
<h1>[% IF ( biblionumber ) %]Editing <em>[% title |html %]</em> (Record number [% biblionumber %])</h1>[% ELSE %]Add MARC record</h1>[% END %]
|
||||
<h1>
|
||||
[% IF ( biblionumber ) %]Editing <em>[% title |html %]</em> (Record number [% biblionumber %])
|
||||
[% ELSE %]Add MARC record [% IF (circborrowernumber) %]<em>(fast cataloging)</em>[% END %]
|
||||
[% END %]
|
||||
</h1>
|
||||
|
||||
[% IF marcflavour != 'NORMARC' %]
|
||||
<div><input type="checkbox" name="marcDocsSelect" id="marcDocsSelect" checked="true" /> Show MARC tag documentation links<br/></div>
|
||||
[% END %]
|
||||
|
|
@ -354,6 +359,15 @@ function Changefwk(FwkList) {
|
|||
|
||||
function yuiToolbar() {
|
||||
[% IF ( CAN_user_editcatalogue_edit_items ) %]
|
||||
[% IF (circborrowernumber) %][%# fast cataloging must lead to items %]
|
||||
new YAHOO.widget.Button({
|
||||
id: "addbiblio",
|
||||
type: "button",
|
||||
label: _("Save"),
|
||||
container: "savebutton",
|
||||
onclick: {fn:function(){redirect("items");}}
|
||||
});
|
||||
[% ELSE %]
|
||||
var savesplitmenu = new YAHOO.widget.Button({
|
||||
type: "split",
|
||||
label: _("Save"),
|
||||
|
|
@ -362,8 +376,8 @@ function Changefwk(FwkList) {
|
|||
menu: savemenu,
|
||||
container: "savebutton"
|
||||
});
|
||||
|
||||
savesplitmenu.on("click", onOption);
|
||||
savesplitmenu.on("click", onOption);
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
new YAHOO.widget.Button({
|
||||
id: "addbiblio",
|
||||
|
|
@ -387,6 +401,7 @@ function Changefwk(FwkList) {
|
|||
|
||||
<ul class="toolbar">
|
||||
<li id="savebutton"><input id="addbiblio" type="submit" value="Save" /></li>
|
||||
[% UNLESS (circborrowernumber) %][%# Hide in fast cataloging %]
|
||||
<li id="z3950searchc"><input type="button" id="z3950search" value="Z39.50 Search" onclick="PopupZ3950(); return false;" /></li>
|
||||
<li id="changeframework"><label for="Frameworks">Change framework: </label>
|
||||
<select name="frameworkcode" id="Frameworks" onchange="Changefwk(this);">
|
||||
|
|
@ -401,13 +416,15 @@ function Changefwk(FwkList) {
|
|||
</option>
|
||||
[% END %]
|
||||
</select>
|
||||
<input type="hidden" name="op" value="addbiblio" /></li>
|
||||
</li>
|
||||
[% END %]
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
[% IF ( popup ) %]
|
||||
<input type="hidden" name="mode" value="popup" />
|
||||
[% END %]
|
||||
<input type="hidden" name="op" value="addbiblio" />
|
||||
<input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
|
||||
<input type="hidden" name="biblionumber" value="[% biblionumber %]" />
|
||||
<input type="hidden" name="breedingid" value="[% breedingid %]" />
|
||||
|
|
@ -571,13 +588,13 @@ function Changefwk(FwkList) {
|
|||
|
||||
</div><!-- tabs -->
|
||||
|
||||
<!-- Fields for fast add cataloguing -->
|
||||
[%# Fields for fast cataloging %]
|
||||
<input type="hidden" name="barcode" value="[% barcode %]" />
|
||||
<input type="hidden" name="branch" value="[% branch %]" />
|
||||
<input type="hidden" name="circborrowernumber" value="[% circborrowernumber %]" />
|
||||
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
|
||||
<input type="hidden" name="duedatespec" value="[% duedatespec %]" />
|
||||
<!-- /End of fast add fields -->
|
||||
[%# End of fields for fast cataloging %]
|
||||
|
||||
</form>
|
||||
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ $(document).ready(function() {
|
|||
[% END %]
|
||||
<input type="hidden" name="biblionumber" value="[% biblionumber %]" />
|
||||
[% IF ( opisadd ) %]
|
||||
<h2 id="additema">Add item</h2>
|
||||
<h2 id="additema">Add item [% IF (circborrowernumber) %]<em>(fast cataloging)</em>[% END %]</h2>
|
||||
[% ELSE %]
|
||||
<h2 id="edititem">Edit Item #[% itemnumber %][% IF ( barcode ) %] / Barcode [% barcode %][% END %]</h2>
|
||||
[% END %]
|
||||
|
|
@ -215,10 +215,12 @@ $(document).ready(function() {
|
|||
<input type="submit" value="Save changes" onclick="return Check(this.form)" />
|
||||
[% END %]</fieldset>
|
||||
|
||||
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
|
||||
[%# Fields for fast cataloging %]
|
||||
<input type="hidden" name="circborrowernumber" value="[% circborrowernumber %]" />
|
||||
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
|
||||
<input type="hidden" name="barcode" value="[% barcode %]" />
|
||||
<input type="hidden" name="duedatespec" value="[% duedatespec %]" />
|
||||
[%# End fields for fast cataloging %]
|
||||
|
||||
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -391,7 +391,7 @@ function validate1(date) {
|
|||
</p>
|
||||
[% END %]
|
||||
|
||||
<input type="hidden" name="barcode" value="[% barcode %]" />
|
||||
<input type="hidden" name="barcode" value="[% barcode |html %]" />
|
||||
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
|
||||
<input type="hidden" name="issueconfirmed" value="1" />
|
||||
[% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
|
||||
|
|
@ -445,10 +445,10 @@ function validate1(date) {
|
|||
[% END %]
|
||||
|
||||
[% IF ( UNKNOWN_BARCODE ) %]
|
||||
<li>The barcode was not found [% barcode %]</li>
|
||||
<li>The barcode was not found [% barcode |html %]</li>
|
||||
[% IF ( fast_cataloging ) %]
|
||||
[% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
|
||||
<a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&barcode=[% barcode %]&borrowernumber=[% borrowernumber %]&branch=[% branch %]&duedatespec=[% duedatespec %]&stickyduedate=[% stickyduedate %]">Fast cataloging</a>
|
||||
<a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&barcode=[% barcode |uri %]&circborrowernumber=[% borrowernumber %]&branch=[% branch %]&duedatespec=[% duedatespec %]&stickyduedate=[% stickyduedate %]">Fast cataloging</a>
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue