Bugzilla – Attachment 60366 Details for
Bug 18127
Add ability to add batch modified records to an existing list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18127: Add batch modified records to an existing list
Bug-18127-Add-batch-modified-records-to-an-existin.patch (text/plain), 6.67 KB, created by
Aleisha Amohia
on 2017-02-16 21:04:46 UTC
(
hide
)
Description:
Bug 18127: Add batch modified records to an existing list
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2017-02-16 21:04:46 UTC
Size:
6.67 KB
patch
obsolete
>From 584c4d7eb5e3124258939e907726dd2f18c2a2a2 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Thu, 16 Feb 2017 02:14:56 +0000 >Subject: [PATCH] Bug 18127: Add batch modified records to an existing list > >This patch is based off a suggestion from bug 12759 to allow a user to >add records to a list after they have been batch modified. > >To test: >1) Apply 12759 >2) Pick a list to modify, go through batch modification process >3) Once the modification is done and successful, there should now be a >'Next' box with options in it >4) Confirm the 'New batch record modification' button takes you back to >the start of the process. >5) Repeat step 2 >6) Select a list from the dropdown to add your records to >7) Confirm that the correct records show in the pop up window >8) Once saved, go to your lists and confirm unique records were saved to >the list >9) Go back to batch record modifications >10) Select Authorities as the record type. Enter an authority id in the >record number list. Click Continue >11) Click modify selected records >12) Confirm that there is no dropdown to add to lists (since you can't >add authorities to lists) and the link to New batch record modification >works as expected. > >Sponsored-by: Catalyst IT >--- > .../en/modules/tools/batch_record_modification.tt | 47 +++++++++++++++++++--- > tools/batch_record_modification.pl | 8 ++-- > 2 files changed, 46 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt >index 6620e34..eeff87f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt >@@ -8,6 +8,10 @@ > <script type="text/javascript" src="[% interface %]/[% theme %]/js/background-job-progressbar.js"></script> > <script type="text/javascript"> > //<![CDATA[ >+function Dopop(link) { >+ newin=window.open(link,'popup','width=500,height=500,toolbar=false,scrollbars=yes,resizeable=yes'); >+} >+ > $(document).ready(function() { > $("input[type='radio']").click(function(){ > if ($(this).attr('id') == 'authority_type') { >@@ -16,6 +20,27 @@ $(document).ready(function() { > $("#shelves").show(); > } > }); >+ $("#add_bibs_to_list").change(function(){ >+ if($("#add_bibs_to_list").find("option:selected").attr("class") == "shelf"){ >+ var shelfnumber = $("#add_bibs_to_list").find("option:selected").attr("value"); >+ var bibs = new Array(); >+ [% FOREACH message IN messages %] >+ [% IF message.code == 'biblio_modified' %] >+ bibs.push("biblionumber="+[% message.biblionumber %]); >+ [% END %] >+ [% END %] >+ var bibstring = bibs.join("&"); >+ Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&'+bibstring); >+ return false; >+ } >+ }); >+ [% IF ( recordtype == 'biblio' ) %] >+ $("#auth_next_steps").hide(); >+ $("#bib_next_steps").show(); >+ [% ELSE %] >+ $("#auth_next_steps").show(); >+ $("#bib_next_steps").hide(); >+ [% END %] > $("#selectall").click(function(e){ > e.preventDefault(); > $(".records").checkCheckboxes(); >@@ -298,14 +323,24 @@ $(document).ready(function() { > [% END %] > [% ELSIF view == 'report' %] > [% IF report.total_records == report.total_success %] >- <div class="dialog message"> >- All records have successfully been modified! <a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a> >- </div> >+ <div class="dialog message">All records have successfully been modified! <span id="auth_next_steps"><a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a></span></div> > [% ELSE %] >- <div class="dialog message"> >- [% report.total_success %] / [% report.total_records %] records have successfully been modified. Some errors occurred. <a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a> >- </div> >+ <div class="dialog message">[% report.total_success %] / [% report.total_records %] records have successfully been modified. Some errors occurred. <span id="auth_next_steps"><a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification">New batch record modification</a></span></div> > [% END %] >+ <fieldset class="rows" id="bib_next_steps"><legend>Next</legend> >+ <ol> >+ <li><a href="/cgi-bin/koha/tools/batch_record_modification.pl" title="New batch record modification" class="btn btn-default btn-sm">New batch record modification</a> -- OR --</li> >+ <li> >+ <label for="add_bibs_to_list">Add modified records to the following list: </label> >+ <select name="add_bibs_to_list" id="add_bibs_to_list"> >+ <option value="">Select a list</option> >+ [% FOREACH list IN lists %] >+ <option class="shelf" value="[% list.shelfnumber %]">[% list.shelfname %]</option> >+ [% END %] >+ </select> >+ </li> >+ </ol> >+ </fieldset> > [% ELSIF view == 'errors' %] > [% FOR error IN errors %] > [% IF error == 'no_template_defined' %] >diff --git a/tools/batch_record_modification.pl b/tools/batch_record_modification.pl >index bce71f8..05667a6 100755 >--- a/tools/batch_record_modification.pl >+++ b/tools/batch_record_modification.pl >@@ -51,6 +51,8 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ > > my $sessionID = $input->cookie("CGISESSID"); > >+my @lists = Koha::Virtualshelves->search({}); >+ > my $runinbackground = $input->param('runinbackground'); > my $completedJobID = $input->param('completedJobID'); > if ( $completedJobID ) { >@@ -58,18 +60,17 @@ if ( $completedJobID ) { > my $report = $job->get('report'); > my $messages = $job->get('messages'); > $template->param( >+ recordtype => $recordtype, > report => $report, > messages => $messages, > view => 'report', >+ lists => \@lists, > ); > output_html_with_http_headers $input, $cookie, $template->output; > $job->clear(); > exit; > } > >-my @lists = Koha::Virtualshelves->search({}); >-$template->param( lists => \@lists ); >- > my @templates = GetModificationTemplates( $mmtid ); > unless ( @templates ) { > $op = 'error'; >@@ -266,6 +267,7 @@ if ( $op eq 'form' ) { > } > > $template->param( >+ lists => \@lists, > messages => \@messages, > recordtype => $recordtype, > MarcModificationTemplatesLoop => \@templates, >-- >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 18127
:
60299
|
60366
|
98422
|
98971
|
100449
|
100450