@@ -, +, @@ next items on the shelf browser - New unit tests in t/db_dependent/ShelfBrowser.t pass. - System preference OPACShelfBrowser still works as expected. - Closing and opening the shelf browser works as expected. - Next and Previous links show new and nicer behaviour. - Logs are clean. --- .../opac-tmpl/prog/en/includes/shelfbrowser.inc | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 15 +++++++++++++-- opac/opac-detail.pl | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) --- a/koha-tmpl/opac-tmpl/prog/en/includes/shelfbrowser.inc +++ a/koha-tmpl/opac-tmpl/prog/en/includes/shelfbrowser.inc @@ -87,7 +87,7 @@ $(document).ready(function(){ $(".close_shelf").click(function(e){ e.preventDefault(); - $("#shelfbrowser").hide(); + $("#shelfbrowser").toggle(); }); [% IF shelfbrowser_prev_item.itemnumber %] $("#browser_previous a").click(function(e){ --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -1540,12 +1540,23 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% ITEM_RESULT.location_description %] [% IF ( itemdata_ccode ) %][% ITEM_RESULT.ccode %][% END %] - [% IF ( ITEM_RESULT.itemcallnumber ) %] [% ITEM_RESULT.itemcallnumber %][% IF ( OPACShelfBrowser ) %] (Browse shelf)[% END %][% END %] + + [% IF ( ITEM_RESULT.itemcallnumber ) %] + [% ITEM_RESULT.itemcallnumber %] + [% IF ( OPACShelfBrowser ) %] + [% IF ( ITEM_RESULT.itemnumber == starting_itemnumber ) %] + (Browse shelf) + [% ELSE %] + (Browse shelf) + [% END %] + [% END %] + [% END %] + [% IF ( itemdata_enumchron ) %][% ITEM_RESULT.enumchron %][% END %] [% IF ( itemdata_uri ) %] [% IF ITEM_RESULT.uri %] [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] - Link to resource + Link to resource [% ELSE %] [% ITEM_RESULT.uri %] [% END %] --- a/opac/opac-detail.pl +++ a/opac/opac-detail.pl @@ -931,6 +931,7 @@ if (C4::Context->preference("OPACShelfBrowser")) { my $nearby = GetNearbyItems($starting_itemnumber); $template->param( + starting_itemnumber => $starting_itemnumber, starting_homebranch => $nearby->{starting_homebranch}->{description}, starting_location => $nearby->{starting_location}->{description}, starting_ccode => $nearby->{starting_ccode}->{description}, --