Bugzilla – Attachment 11501 Details for
Bug 6886
Single branch mode should disable showing the branch name in front of all callnumbers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 6886 - OPAC XSLT respecting single branch mode
0001-Bug-6886-OPAC-XSLT-respecting-single-branch-mode.patch (text/plain), 5.83 KB, created by
Julian Maurice
on 2012-08-09 14:30:41 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 6886 - OPAC XSLT respecting single branch mode
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2012-08-09 14:30:41 UTC
Size:
5.83 KB
patch
obsolete
>From 23e1b0279aeeed7b2a450002172d1148680f9137 Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Tue, 20 Sep 2011 15:27:08 +1200 >Subject: [PATCH 1/3] Bug 6886 - OPAC XSLT respecting single branch mode > >This is only for the MARC21 XSLT at this stage, follow up patch for >UNIMARC will come > >Conflicts: > > C4/XSLT.pm > koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref > >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > C4/XSLT.pm | 1 + > .../prog/en/modules/admin/preferences/opac.pref | 2 +- > .../prog/en/xslt/MARC21slim2OPACResults.xsl | 33 ++++++++++++++------ > 3 files changed, 26 insertions(+), 10 deletions(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index ac97e65..36a3bfc 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -188,6 +188,7 @@ sub XSLTParse4Display { > UseAuthoritiesForTracings TraceSubjectSubdivisions > Display856uAsImage OPACDisplay856uAsImage > UseControlNumber IntranetBiblioDefaultView BiblioDefaultView >+ singleBranchMode > AlternateHoldingsField AlternateHoldingsSeparator / ) > { > my $sp = C4::Context->preference( $syspref ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index 0fe79d4..4ed639e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -359,7 +359,7 @@ OPAC: > choices: > yes: "Don't allow" > no: Allow >- - patrons to select their library on the OPAC. >+ - patrons to select their branch on the OPAC or show branch names with callnumbers. > - > - pref: SearchMyLibraryFirst > choices: >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl >index 2b5aacc..3662c34 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl >@@ -27,6 +27,7 @@ > <xsl:variable name="AlternateHoldingsField" select="substring(marc:sysprefs/marc:syspref[@name='AlternateHoldingsField'], 1, 3)"/> > <xsl:variable name="AlternateHoldingsSubfields" select="substring(marc:sysprefs/marc:syspref[@name='AlternateHoldingsField'], 4)"/> > <xsl:variable name="AlternateHoldingsSeparator" select="marc:sysprefs/marc:syspref[@name='AlternateHoldingsSeparator']"/> >+ <xsl:variable name="singleBranchMode" select="marc:sysprefs/marc:syspref[@name='singleBranchMode']"/> > <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)"/> >@@ -1025,15 +1026,29 @@ > <b><xsl:text>Copies available for loan: </xsl:text></b> > <xsl:variable name="available_items" > select="key('item-by-status', 'available')"/> >- <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> >- <xsl:value-of select="items:homebranch"/> >- <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> >- <xsl:text> (</xsl:text> >- <xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/> >- <xsl:text>)</xsl:text> >-<xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> >- </xsl:for-each> >- </span> >+ <xsl:choose> >+ <xsl:when test="$singleBranchMode=1"> >+ <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> >+ <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> >+ <xsl:text> (</xsl:text> >+ <xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/> >+ <xsl:text>)</xsl:text> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> >+ </xsl:for-each> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> >+ <xsl:value-of select="items:homebranch"/> >+ <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if> >+ <xsl:text> (</xsl:text> >+ <xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/> >+ <xsl:text>)</xsl:text> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose> >+ </xsl:for-each> >+ </xsl:otherwise> >+ </xsl:choose> >+ </span> >+ > </xsl:when> > </xsl:choose> > >-- >1.7.10.4 >
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 6886
:
11367
|
11369
|
11370
|
11501
|
11502
|
11504
|
14434
|
15065
|
16028
|
16385
|
16391
|
17289
|
23304
|
23745
|
23746