Bug 26314: Only display volumes link when required
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 9 Aug 2021 10:39:56 +0000 (11:39 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 17 Oct 2023 17:45:11 +0000 (14:45 -0300)
commitcd0a374b939754ef545f8255dda384a398f898db
tree8af15bc2b5685fbae89a21d044581bd8119ee503
parentf27ed123be8ac1f0ecd76cd54ed9c2a8e591aefe
Bug 26314: Only display volumes link when required

This patch makes C4::XSLT query for volumes the same way it would do
with the generated link (i.e. based on UseControlNumber) and passes
a flag to the XSLT so it displays (or not) the 'Show volumes' link.

To test:
1. Apply the first patch
2. Have a known record without volumes
3. Open the record in the OPAC
=> FAIL: It shows the 'Show volumes' link
4. Have a record known to have volumes
5. Open the record in the OPAC
=> SUCCESS: It shows the 'Show volumes' link
6. Apply this patch and restart_all
7. Reload the above records
=> SUCCESS: It shows the link where it has to, and hides it where it
   shouldn't be displayed.
8. Repeat for Intranet
9. Sign off :-D

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/XSLT.pm
Koha/Biblio.pm
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl
t/db_dependent/Koha/Biblio.t