Bugzilla – Attachment 78725 Details for
Bug 21333
Add ability to add to basket from a file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21333: Add ability to add to basket from a new file
Bug-21333-Add-ability-to-add-to-basket-from-a-new-.patch (text/plain), 5.64 KB, created by
Nick Clemens (kidclamp)
on 2018-09-14 20:06:22 UTC
(
hide
)
Description:
Bug 21333: Add ability to add to basket from a new file
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2018-09-14 20:06:22 UTC
Size:
5.64 KB
patch
obsolete
>From 46070d04cf5e739180e8832b354955244df89868 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 11 Sep 2018 16:26:04 +0000 >Subject: [PATCH] Bug 21333: Add ability to add to basket from a new file > >This patch adds a workflow for adding to a basket from a file. It >removes the need to stage the file before going to the basket and allows >you to stage the file and return to the basket > >To test: >1 - Have basket in acquissitions >2 - Click add to basket >3 - Note new option to 'Add from new file' >4 - Click it >5 - You will be sent to the record import tool >6 - Stage your file >7 - There is a link after staging 'Add records to basket' >8 - Click it >9 - Your items should be added >--- > .../prog/en/includes/acquisitions-add-to-basket.inc | 1 + > .../intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt | 7 +++++++ > tools/stage-marc-import.pl | 12 ++++++++++-- > 3 files changed, 18 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-add-to-basket.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-add-to-basket.inc >index 3588005..64234df 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-add-to-basket.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-add-to-basket.inc >@@ -16,6 +16,7 @@ > <li><a href="/cgi-bin/koha/acqui/newordersubscription.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">From a subscription</a></li> > <li><a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">From a new (empty) record</a></li> > <li><a href="/cgi-bin/koha/acqui/z3950_search.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">From an external source</a></li> >+ <li><a href="/cgi-bin/koha/tools/stage-marc-import.pl?basketno=[% basketno | html %]&booksellerid=[% booksellerid | html %]"> From a new file</a></li> > <li><a href="/cgi-bin/koha/acqui/addorderiso2709.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]"> From a staged file</a></li> > [% IF ( CAN_user_circulate ) %]<li><a href="/cgi-bin/koha/circ/reserveratios.pl?booksellerid=[% booksellerid | html %]&basketno=[% basketno | html %]">From titles with highest hold ratios</a></li>[% END %] > </ul> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt >index 58d114d..fdf87b8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt >@@ -41,6 +41,9 @@ > <li>[% total | html %] records in file</li> > <li>[% import_errors | html %] records not staged because of MARC error</li> > <li>[% staged | html %] records staged</li> >+[% IF basketno && booksellerid %] >+ <li><a href="/cgi-bin/koha/acqui/addorderiso2709.pl?import_batch_id=[% import_batch_id | html %]&basketno=[% basketno | html %]&booksellerid=[% booksellerid | html %]">Add staged files to basket</a></li> >+[% END %] > [% IF ( checked_matches ) %] > <li>[% matched | html %] records with at least one match in catalog per matching rule > "[% matcher_code | html %]"</li> >@@ -90,6 +93,10 @@ > </form> > > <form method="post" id="processfile" action="[% SCRIPT_NAME | html %]" enctype="multipart/form-data"> >+[% IF basketno && booksellerid %] >+ <input type="hidden" name="basketno" id="basketno" value="[% basketno | html %]" /> >+ <input type="hidden" name="booksellerid" id="booksellerid" value="[% booksellerid | html %]" /> >+[% END %] > <fieldset class="rows"> > <input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" /> > <input type="hidden" name="runinbackground" id="runinbackground" value="" /> >diff --git a/tools/stage-marc-import.pl b/tools/stage-marc-import.pl >index f2acc58..d76c35a 100755 >--- a/tools/stage-marc-import.pl >+++ b/tools/stage-marc-import.pl >@@ -58,6 +58,8 @@ my $record_type = $input->param('record_type'); > my $encoding = $input->param('encoding') || 'UTF-8'; > my $format = $input->param('format') || 'ISO2709'; > my $marc_modification_template = $input->param('marc_modification_template_id'); >+my $basketno = $input->param('basketno'); >+my $booksellerid = $input->param('booksellerid'); > > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { >@@ -74,6 +76,8 @@ $template->param( > SCRIPT_NAME => '/cgi-bin/koha/tools/stage-marc-import.pl', > uploadmarc => $fileID, > record_type => $record_type, >+ basketno => $basketno, >+ booksellerid => $booksellerid, > ); > > my %cookies = parse CGI::Cookie($cookie); >@@ -181,7 +185,9 @@ if ($completedJobID) { > checked_matches => $checked_matches, > matcher_failed => $matcher_failed, > matcher_code => $matcher_code, >- import_batch_id => $batch_id >+ import_batch_id => $batch_id, >+ booksellerid => $booksellerid, >+ basketno => $basketno > }; > if ($runinbackground) { > $job->finish($results); >@@ -195,7 +201,9 @@ if ($completedJobID) { > checked_matches => $checked_matches, > matcher_failed => $matcher_failed, > matcher_code => $matcher_code, >- import_batch_id => $batch_id >+ import_batch_id => $batch_id, >+ booksellerid => $booksellerid, >+ basketno => $basketno > ); > } > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21333
:
78562
|
78725
|
78854
|
78939
|
78952
|
79259
|
79260