Bugzilla – Attachment 90145 Details for
Bug 22992
When you merge records in a list there is no way to return to the list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22992: Ability to return to the list when you merge records of a list
Bug-22992-Ability-to-return-to-the-list-when-you-m.patch (text/plain), 5.85 KB, created by
axel Amghar
on 2019-05-28 08:38:12 UTC
(
hide
)
Description:
Bug 22992: Ability to return to the list when you merge records of a list
Filename:
MIME Type:
Creator:
axel Amghar
Created:
2019-05-28 08:38:12 UTC
Size:
5.85 KB
patch
obsolete
>From eb813f685d7c10966da99531c35ccc0191affcad Mon Sep 17 00:00:00 2001 >From: Axel Amghar <axel.amghar@biblibre.com> >Date: Tue, 28 May 2019 10:20:35 +0200 >Subject: [PATCH] Bug 22992: Ability to return to the list when you merge > records of a list > >Test plan: > >Without the patch : >- Create 2 records >- Add them to the same list >- Go to the list and merge these two patrons >- In the nav bar you can't go back to the list > >Apply the patch >- Now you should have a nav bar to return to the list >like that :https://snag.gy/cnWxa2.jpg >- Test every link of the nav bar, they should work >- Make all the merge process, and test the links on the 3 pages >--- > cataloguing/merge.pl | 22 +++++++++++--- > .../prog/en/modules/cataloguing/merge.tt | 35 +++++++++++++++++++++- > .../prog/en/modules/virtualshelves/shelves.tt | 5 +++- > 3 files changed, 56 insertions(+), 6 deletions(-) > >diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl >index 146e88e..1c27c6e 100755 >--- a/cataloguing/merge.pl >+++ b/cataloguing/merge.pl >@@ -53,6 +53,15 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > #------------------------ > # Merging > #------------------------ >+ >+my %shelf; >+if ($input->param("shelfname")){ >+ %shelf = ( >+ private => $input->param("shelf_private"), >+ name => $input->param("shelfname"), >+ number => $input->param("shelfnumber") >+ ); >+} > if ($merge) { > > my $dbh = C4::Context->dbh; >@@ -182,10 +191,11 @@ if ($merge) { > > # Parameters > $template->param( >- result => 1, >- report_records => \@report_records, >- report_header => $report_header, >- ref_biblionumber => scalar $input->param('ref_biblionumber') >+ result => 1, >+ report_records => \@report_records, >+ report_header => $report_header, >+ ref_biblionumber => scalar $input->param('ref_biblionumber'), >+ shelf => \%shelf > ); > > #------------------------- >@@ -255,6 +265,10 @@ if ($merge) { > my $frameworks = Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] }); > $template->param( frameworks => $frameworks ); > } >+ $template->param( >+ biblionumbers => \@biblionumbers, >+ shelf => \%shelf >+ ); > } > > if (@errors) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt >index c21baca..2415668 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt >@@ -17,7 +17,26 @@ div#result { margin-top: 1em; } > <body id="cat_merge" class="cat"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'cataloging-search.inc' %] >-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a> › Merging records</div> >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a>› >+ >+ [% IF shelf %] >+ <a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a>› >+ [% IF shelf.private %] >+ <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=1">Your lists</a> >+ [% ELSE %] >+ <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=2">Public lists</a> >+ [% END %] >+ ›<a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.number | uri %]" > Contents of <i>[% shelf.name | uri %]</i></a> >+ › >+ [% IF result %] >+ Results >+ [% ELSE %] >+ Merging records >+ [% END %] >+ [% ELSE %] >+ <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a> › Merging records >+ [% END %] >+</div> > > <div class="main container-fluid"> > <div class="row"> >@@ -122,6 +141,13 @@ div#result { margin-top: 1em; } > [% FOREACH record IN records %] > <input type="hidden" name="biblionumber" value="[% record.biblionumber | html %]" /> > [% END %] >+ >+ [% IF shelf %] >+ <input type="hidden" value="[% shelf.private | html %]" name="shelf_private" /> >+ <input type="hidden" value="[% shelf.name | html %]" name="shelfname" /> >+ <input type="hidden" value="[% shelf.number | html %]" name="shelfnumber" /> >+ [% END %] >+ > <fieldset class="action"> > <input type="submit" value="Next" /> > </fieldset> >@@ -168,6 +194,13 @@ div#result { margin-top: 1em; } > [% END %] > <input type="hidden" name="frameworkcode" value="[% framework | html %]" /> > >+[% IF shelf %] >+ <input type="hidden" value="[% shelf.private | html %]" name="shelf_private" /> >+ <input type="hidden" value="[% shelf.name | html %]" name="shelfname" /> >+ <input type="hidden" value="[% shelf.number | html %]" name="shelfnumber" /> >+ <input type="hidden" value="1" name="result" /> >+[% END %] >+ > <fieldset class="action"> > <input type="submit" name="merge" value="Merge" /> > <label for="report_fields">Fields to display in report:</label> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index 023922a..d6f3030 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -646,7 +646,10 @@ > $(checkboxes).each(function() { > params.push('biblionumber=' + $(this).val()); > }); >- var url = '/cgi-bin/koha/cataloguing/merge.pl?' + params.join('&'); >+ var url = '/cgi-bin/koha/cataloguing/merge.pl?' + params.join('&') >+ [% IF shelf %] >+ + '&shelf_private=[% shelf.is_private | html %]&shelfname=[% shelf.shelfname | html %]&shelfnumber=[% shelf.shelfnumber | html %]' >+ [% END %]; > location.href = url; > } > return false; >-- >2.7.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 22992
:
90145
|
90175
|
90183