]> git.koha-community.org Git - koha.git/commit
Bug 17530: Use can_article_request to control sidebar link
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 1 Mar 2018 14:38:48 +0000 (15:38 +0100)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 7 Sep 2018 13:16:07 +0000 (13:16 +0000)
commitb6813142ddedebf96bb6dfa50d5544d42c30e5e1
tree87e2072437ccf16f54af87701e34c4a4b08b8123
parent2b0e73b9e1b7f19a55510521a990fa00411157c5
Bug 17530: Use can_article_request to control sidebar link

Before this patch, the 'Request article' link is displayed whenever the
pref is enabled. In many cases this might be useless. Instead of a guess
as in opac-search, we now call can_article_request to know for sure.
Note: at least this is the case when a user has logged in.

Update sidebar template with template variable artreqpossible.
Add code in opac-detail, MARCdetail and ISBDdetail to fill it.

Test plan:
[1] Look for two biblios with items: one that should allow article requests
    and one that should not (respecting branch, patron, item type).
[2] Verify on detail, ISBD and MARC that the link is displayed for
    the first biblio and hidden for the second biblio.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc
opac/opac-ISBDdetail.pl
opac/opac-MARCdetail.pl
opac/opac-detail.pl