Bugzilla – Attachment 108096 Details for
Bug 5428
Back to results after deleting a record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5428: (QA follow-up) Add searchid for deleting items in a batch and editing in batch
Bug-5428-QA-follow-up-Add-searchid-for-deleting-it.patch (text/plain), 7.35 KB, created by
Nick Clemens (kidclamp)
on 2020-08-12 11:18:17 UTC
(
hide
)
Description:
Bug 5428: (QA follow-up) Add searchid for deleting items in a batch and editing in batch
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-08-12 11:18:17 UTC
Size:
7.35 KB
patch
obsolete
>From c7e2d855bfa98e119f9a7fe100e3e93513e7d7e3 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 7 Aug 2020 00:43:29 +0000 >Subject: [PATCH] Bug 5428: (QA follow-up) Add searchid for deleting items in a > batch and editing in batch > >To test: >0 - Perform a search in the staff client >1 - Click a title to go to the details page for a record >2 - Click the 'Edit' button and select 'Edit items in a batch' >3 - Note the searchid is in the url >4 - Make a change and hit 'Save' >5 - Note the 'Return the the record' link at the top, and the button on the bottom include searchid in URL >6 - Click one and note the brwoser is stil there >7 - Click 'Edit' and select 'Delete items in a batch' >8 - Delete one item >9 - Click return to record >10 - Browser is there >11 - Click 'Delete items in a batch again >12 - Select all and check 'Delete records if no items remain' >13 - Delete them >14 - Note you have a link to 'Go back to the results' > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/modules/tools/batchMod-del.tt | 16 +++++++++++++++- > .../intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt | 13 +++++++++++-- > tools/batchMod.pl | 3 ++- > 3 files changed, 28 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt >index eb5ddd82c6..acdf6bcd02 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt >@@ -76,6 +76,7 @@ > <form name="f" action="batchMod.pl" method="post"> > <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber | html %]" /> > <input type="hidden" name="op" value="[% op | html %]" /> >+ <input type="hidden" name="searchid" value="[% searchid | html %]" /> > <input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" /> > <input type="hidden" name="completedJobID" id="completedJobID" value="" /> > <input type="hidden" name="src" id="src" value="[% src | html %]" /> >@@ -221,9 +222,16 @@ > [% IF delete_records %] <p>[% deleted_records | html %] record(s) deleted.</p> [% END %] > [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Delete items in a batch%] > [% IF biblio_deleted %] >+ [% IF searchid %] >+ <div id="previous_search_link"></div> >+ [% END %] > <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Return to the cataloging module</a> > [% ELSE %] >- <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">Return to the record</a> >+ [% IF searchid %] >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&searchid=[% searchid | uri %]">Return to the record</a> >+ [% ELSE %] >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">Return to the record</a> >+ [% END %] > [% END %] > [% ELSIF src %] > <a href="[% src | url %]">Return to where you were</a> >@@ -289,6 +297,7 @@ > [% INCLUDE 'datatables.inc' %] > [% Asset.js("js/pages/batchMod.js") | $raw %] > [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] >+ [% Asset.js("js/browser.js") | $raw %] > <script type="text/javascript"> > // Prepare array of all column headers, incrementing each index by > // two to accommodate control and title columns >@@ -301,6 +310,11 @@ > return submitBackgroundJob(this.form); > }); > }); >+ >+ [% IF searchid %] >+ browser = KOHA.browser('[% searchid | html %]'); >+ browser.show_back_link(); >+ [% END %] > </script> > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >index 283ef381ef..3730e316bb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >@@ -98,7 +98,11 @@ $(document).ready(function(){ > [% END %] > <fieldset class="action"> > [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Edit items in a batch%] >- <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">Return to the record</a> >+ [% IF searchid %] >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&searchid=[% searchid | uri %]">Return to the record</a> >+ [% ELSE %] >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">Return to the record</a> >+ [% END %] > [% ELSIF src %] > <a href="[% src | url %]">Return to where you were</a> > [% ELSE %] >@@ -150,6 +154,7 @@ $(document).ready(function(){ > > <form name="f" action="batchMod.pl" method="post"> > <input type="hidden" name="op" value="[% op | html %]" /> >+ <input type="hidden" name="searchid" value="[% searchid | html %]" /> > <input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" /> > <input type="hidden" name="runinbackground" id="runinbackground" value="" /> > <input type="hidden" name="completedJobID" id="completedJobID" value="" /> >@@ -350,7 +355,11 @@ $(document).ready(function(){ > [% ELSE %] <!-- // show --> > <fieldset class="action"> > [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Edit items in a batch%] >- <a class="btn btn-default" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | html %]"><i class="fa fa-check-square-o"></i> Return to the record</a> >+ [% IF searchid %] >+ <a class="btn btn-default" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&searchid=[% searchid | uri %]"><i class="fa fa-check-square-o"></i> Return to the record</a> >+ [% ELSE %] >+ <a class="btn btn-default" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]"><i class="fa fa-check-square-o"></i> Return to the record</a> >+ [% END %] > [% ELSIF src %] > <a class="btn btn-default" href="[% src | url %]"><i class="fa fa-check-square-o"></i> Return to where you were</a> > [% ELSE %] >diff --git a/tools/batchMod.pl b/tools/batchMod.pl >index fe40f84c7e..975f7997c5 100755 >--- a/tools/batchMod.pl >+++ b/tools/batchMod.pl >@@ -69,7 +69,6 @@ if (!defined $op) { > $template_flag = ($del) ? { tools => 'items_batchdel' } : { tools => 'items_batchmod' }; > } > >- > my ($template, $loggedinuser, $cookie) > = get_template_and_user({template_name => $template_name, > query => $input, >@@ -78,6 +77,8 @@ my ($template, $loggedinuser, $cookie) > flagsrequired => $template_flag, > }); > >+$template->param( searchid => scalar $input->param('searchid'), ); >+ > # Does the user have a restricted item edition permission? > my $uid = $loggedinuser ? Koha::Patrons->find( $loggedinuser )->userid : undef; > my $restrictededition = $uid ? haspermission($uid, {'tools' => 'items_batchmod_restricted'}) : undef; >-- >2.11.0
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 5428
:
107753
|
107866
|
107868
|
107933
|
107934
| 108096 |
108099