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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
[% 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>
$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;
}