Bugzilla – Attachment 66593 Details for
Bug 15851
Only display "Analytics: Show analytics" when records have linked analytics
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15851: Only display 'show analytics' link if there are
Bug-15851-Only-display-show-analytics-link-if-ther.patch (text/plain), 3.42 KB, created by
Jonathan Druart
on 2017-08-29 16:36:51 UTC
(
hide
)
Description:
Bug 15851: Only display 'show analytics' link if there are
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-08-29 16:36:51 UTC
Size:
3.42 KB
patch
obsolete
>From 8c5584dadc445df0b2379ea0c8e71160c90622dc Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 29 Aug 2017 13:36:24 -0300 >Subject: [PATCH] Bug 15851: Only display 'show analytics' link if there are > >--- > catalogue/detail.pl | 30 +++++++++++----------- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 3 +++ > 2 files changed, 18 insertions(+), 15 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 1e18a1d667..61e734a738 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -88,21 +88,6 @@ my $fw = GetFrameworkCode($biblionumber); > my $showallitems = $query->param('showallitems'); > my $marcflavour = C4::Context->preference("marcflavour"); > >-# XSLT processing of some stuff >-my $xslfile = C4::Context->preference('XSLTDetailsDisplay'); >-my $lang = $xslfile ? C4::Languages::getlanguage() : undef; >-my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; >- >-if ( $xslfile ) { >- $template->param( >- XSLTDetailsDisplay => '1', >- XSLTBloc => XSLTParse4Display( >- $biblionumber, $record, "XSLTDetailsDisplay", >- 1, undef, $sysxml, $xslfile, $lang >- ) >- ); >-} >- > $template->param( 'SpineLabelShowPrintOnBibDetails' => C4::Context->preference("SpineLabelShowPrintOnBibDetails") ); > $template->param( ocoins => GetCOinSBiblio($record) ); > >@@ -344,6 +329,21 @@ if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) { > } > } > >+# XSLT processing of some stuff >+my $xslfile = C4::Context->preference('XSLTDetailsDisplay'); >+if ( $xslfile ) { >+ my $lang = C4::Languages::getlanguage(); >+ my $sysxml = C4::XSLT::get_xslt_sysprefs(); >+ $sysxml .= qq|<variables><variable name="analytics_flag">$analytics_flag</variable></variables>|; >+ $template->param( >+ XSLTDetailsDisplay => '1', >+ XSLTBloc => XSLTParse4Display( >+ $biblionumber, $record, "XSLTDetailsDisplay", >+ 1, undef, $sysxml, $xslfile, $lang >+ ) >+ ); >+} >+ > $template->param( norequests => $norequests ); > $template->param( > MARCNOTES => $marcnotesarray, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index b699341bc4..71e3d00cc1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -40,6 +40,7 @@ > <xsl:otherwise>"</xsl:otherwise> > </xsl:choose> > </xsl:variable> >+ <xsl:variable name="analytics_flag" select="marc:variables/marc:variable[@name='analytics_flag']"/> > <xsl:variable name="leader" select="marc:leader"/> > <xsl:variable name="leader6" select="substring($leader,7,1)"/> > <xsl:variable name="leader7" select="substring($leader,8,1)"/> >@@ -254,6 +255,7 @@ > > <!-- Analytics --> > <xsl:if test="$leader7='s'"> >+ <xsl:if test="$analytics_flag = 1"> > <span class="results_summary analytics"><span class="label">Analytics: </span> > <a> > <xsl:choose> >@@ -268,6 +270,7 @@ > </a> > </span> > </xsl:if> >+ </xsl:if> > > <!-- Volumes of sets and traced series --> > <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'"> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15851
:
66593
|
106260
|
106261
|
106821
|
106822
|
106988
|
106989
|
106990
|
108049
|
108050
|
108051
|
109267
|
109268
|
109269
|
109459
|
109460
|
109461
|
109462