Bugzilla – Attachment 144513 Details for
Bug 32434
Records in lists not showing what other lists they belong to
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32434: Show "Lists" line on lists results
Bug-32434-Show-Lists-line-on-lists-results.patch (text/plain), 3.58 KB, created by
Marcel de Rooy
on 2022-12-09 07:15:45 UTC
(
hide
)
Description:
Bug 32434: Show "Lists" line on lists results
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-12-09 07:15:45 UTC
Size:
3.58 KB
patch
obsolete
>From c228d7b8e36fe05ee997a25bbdec5ed8f627bf0b Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Fri, 9 Dec 2022 03:28:12 +0000 >Subject: [PATCH] Bug 32434: Show "Lists" line on lists results >Content-Type: text/plain; charset=utf-8 > >This patch adds a "Lists:" line on the lists results so that the >output matches the search result output. > >This allows users to know which records belong to which lists. > >Test plan: >0. Apply patch and koha-plack --restart kohadev >1. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test >2. Add all 3 results to a new list called "Test" >3. Note that "Lists:" appears in the search results >4. Click on "Test" in the "Lists:" line >5. Note that it takes you to the list "Test" and that "Lists:" >still appears in the results > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../bootstrap/en/modules/opac-shelves.tt | 15 +++++++++++++++ > opac/opac-shelves.pl | 7 +++++++ > 2 files changed, 22 insertions(+) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >index 93a35b7225..058ea4a180 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -486,6 +486,21 @@ > > [% itemsloo.XSLTBloc | $raw %] > >+ >+ [% IF itemsloo.shelves.count %] >+ <div class="results_summary shelves"> >+ <span class="label">Lists:</span> >+ <ul> >+ [% FOREACH item_shelf IN itemsloo.shelves %] >+ <li> >+ <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% item_shelf.shelfnumber | uri %]">[% item_shelf.shelfname | html %]</a> >+ [%~ UNLESS loop.last %], [% ELSE %].[% END ~%] >+ </li> >+ [% END %] >+ </ul> >+ </div> >+ [% END %] >+ > [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %] > <div class="results_summary tags"> > <span class="label">Tags:</span> >diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl >index e228b3dfb0..a7be90ba58 100755 >--- a/opac/opac-shelves.pl >+++ b/opac/opac-shelves.pl >@@ -426,6 +426,13 @@ if ( $op eq 'view' ) { > > $this_item->{biblio_object} = $biblio; > $this_item->{biblionumber} = $biblionumber; >+ $this_item->{shelves} = >+ Koha::Virtualshelves->get_shelves_containing_record( >+ { >+ biblionumber => $biblionumber, >+ borrowernumber => $loggedinuser, >+ } >+ ); > push @items_info, $this_item; > } > >-- >2.30.2
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 32434
:
144512
|
144513
|
145534