From f70df9b19479dc51ddaf76f29aaadafb7907a184 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 24 Jun 2020 13:08:25 -0300 Subject: [PATCH] Bug 15851: Display analytics links for more cases The current XSLT displays the link to linked analytics only for serials. This patch makes it show for all the relevant position 7 on the leader values. I left out a and b as recommended by expert librarians on my team, but I can revert that if required. The current implementation adds a new CSS class for each case, so libraries willing to keep the current behaviour or just have more granular control on the cases they want the link to display, just can. This patch makes sense with the follow-up one, which will display the link only if there are really related records. To test: 1. Open a non-serial record, notice there's no link to analytics 2. Apply this patch and reload => SUCCESS: There's an 'Analytics' link 3. Inspect the produced HTML => SUCCESS: A special class with analytic_* value has been added, and thus we now can control its display through CSS 4. Sign off :-D Sponsored-by: Orex Digital Signed-off-by: Hugo Agud Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../en/xslt/MARC21slim2OPACDetail.xsl | 35 +++++++++++++------ 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl index 10fcd84baa..66349e0d04 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -339,22 +339,35 @@ - - - Analytics: + + + + + + analytic_collection + analytic_subunit + analytic_ires + analytic_monograph + analytic_serial + analytic_undefined + + + + + results_summary analytics + Analytics: - - /cgi-bin/koha/opac-search.pl?q=rcn:+AND+(bib-level:a+OR+bib-level:b) - - - /cgi-bin/koha/opac-search.pl?q=Host-item: - + + /cgi-bin/koha/opac-search.pl?q=rcn:+AND+(bib-level:a+OR+bib-level:b) + + + /cgi-bin/koha/opac-search.pl?q=Host-item: + Show analytics - - + -- 2.39.5