Bugzilla – Attachment 4543 Details for
Bug 5079
Make display of shelving location and call number in XSLT results controlled by sysprefs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to add call numbers and shelving location
0002-bug-5079.patch (text/plain), 13.51 KB, created by
Elliott Davis
on 2011-06-30 21:42:13 UTC
(
hide
)
Description:
patch to add call numbers and shelving location
Filename:
MIME Type:
Creator:
Elliott Davis
Created:
2011-06-30 21:42:13 UTC
Size:
13.51 KB
patch
obsolete
>From 5eb7f73a71194387ffc3ae334ba57e08eb2f96a3 Mon Sep 17 00:00:00 2001 >From: Elliott Davis <tdavis@uttyler.edu> >Date: Thu, 30 Jun 2011 11:38:23 -0500 >Subject: [PATCH 2/2] bug 5079 > >--- > installer/data/mysql/en/mandatory/sysprefs.sql | 2 +- > .../prog/en/modules/admin/preferences/opac.pref | 2 +- > .../prog/en/xslt/MARC21slim2OPACResults.xsl | 132 ++++++++++++++++--- > 3 files changed, 113 insertions(+), 23 deletions(-) > >diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql >index 7419908..268ad0d 100755 >--- a/installer/data/mysql/en/mandatory/sysprefs.sql >+++ b/installer/data/mysql/en/mandatory/sysprefs.sql >@@ -92,7 +92,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacuserjs','','Define custom javascript for inclusion in OPAC','70|10','Textarea'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacuserlogin',1,'Enable or disable display of user login features',NULL,'YesNo'); >-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacItemLocation',1,'Show the shelving location of items in the opac',NULL,'YesNo'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacItemLocation',2,'Show the shelving location of items in the opac',NULL,'YesNo'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('patronimages',0,'Enable patron images for the Staff Client',NULL,'YesNo'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('printcirculationslips',1,'If ON, enable printing circulation receipts','','YesNo'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('RequestOnOpac',1,'If ON, globally enables patron holds on OPAC',NULL,'YesNo'); >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 88aa7ca..c14fa7a 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 >@@ -196,7 +196,7 @@ OPAC: > choices: > yes: Show > no: "Don't Show" >- - Show the shelving location of items in opac results. >+ - the shelving location of items in opac results. > - > - pref: OpacPasswordChange > choices: >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl >index 5805aea..6d35de3 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl >@@ -986,7 +986,7 @@ > <span class="available"> > <b> > <xsl:value-of select="count(key('item-by-status', 'available'))"/> >- <xsl:choose><xsl:when test="count(key('item-by-status', 'available')) = 1"><xsl:text> Copy available for loan at </xsl:text></xsl:when><xsl:otherwise><xsl:text> Copies available for loan at </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:choose><xsl:when test="count(key('item-by-status', 'available')) = 1"><xsl:text> copy available for loan at </xsl:text></xsl:when><xsl:otherwise><xsl:text> copies available for loan at </xsl:text></xsl:otherwise></xsl:choose> > </b> > <xsl:variable name="available_items" > select="key('item-by-status', 'available')"/> >@@ -995,7 +995,7 @@ > <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:when> >+ </xsl:when> > </xsl:choose> > > <xsl:choose> >@@ -1003,7 +1003,7 @@ > <span class="available"> > <b> > <xsl:value-of select="count(key('item-by-status', 'reference'))"/> >- <xsl:choose><xsl:when test="count(key('item-by-status', 'reference')) = 1"><xsl:text> Copy available for reference at </xsl:text></xsl:when><xsl:otherwise><xsl:text> Copies available for reference at </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:choose><xsl:when test="count(key('item-by-status', 'reference')) = 1"><xsl:text> copy available for reference at </xsl:text></xsl:when><xsl:otherwise><xsl:text> copies available for reference at </xsl:text></xsl:otherwise></xsl:choose> > </b> > <xsl:variable name="reference_items" > select="key('item-by-status', 'reference')"/> >@@ -1059,27 +1059,117 @@ > <xsl:text>). </xsl:text> </span> > </xsl:if> > </span> >+ >+ > <span class="results_summary" id="location"> > <span class="label">Location(s): </span> >- <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="concat(items:location,' ')"/> >- <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if> >- <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:choose><xsl:when test="count(key('item-by-status', 'available'))>0 and count(key('item-by-status', 'reference'))>0"><xsl:text> | </xsl:text></xsl:when></xsl:choose> >- <xsl:variable name="reference_items" >- select="key('item-by-status', 'reference')"/> >- <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> >- <xsl:value-of select="concat(items:location,' ')"/> >- <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if> >- <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:choose> >+ <xsl:when test="count(key('item-by-status', 'available'))>0"> >+ <span class="available"> >+ <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])]"> >+ <b><xsl:value-of select="concat(items:location,' ')"/></b> >+ <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if> >+ <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:when> >+ </xsl:choose> >+ >+ <xsl:choose> >+ <xsl:when test="count(key('item-by-status', 'reference'))>0"> >+ <span class="available"> >+ <xsl:variable name="reference_items" >+ select="key('item-by-status', 'reference')"/> >+ <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> >+ <b><xsl:value-of select="concat(items:location,' ')"/></b> >+ <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if> >+ <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:when> >+ </xsl:choose> >+ >+ <xsl:if test="count(key('item-by-status', 'Checked out'))>0"> >+ <span class="unavailable"> >+ <xsl:variable name="checkedout_items" >+ select="key('item-by-status', 'Checked out')"/> >+ <xsl:for-each select="$checkedout_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> >+ <b><xsl:value-of select="concat(items:location,' ')"/></b> >+ <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if> >+ <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:if> >+ <xsl:if test="count(key('item-by-status', 'Withdrawn'))>0"> >+ <span class="unavailable"> >+ <xsl:variable name="withdrawn_items" >+ select="key('item-by-status', 'Withdrawn')"/> >+ <xsl:for-each select="$withdrawn_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> >+ <b><xsl:value-of select="concat(items:location,' ')"/></b> >+ <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if> >+ <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:if> >+ <xsl:if test="$hidelostitems='0' and count(key('item-by-status', 'Lost'))>0"> >+ <span class="unavailable"> >+ <xsl:variable name="lost_items" >+ select="key('item-by-status', 'Lost')"/> >+ <xsl:for-each select="$lost_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> >+ <b><xsl:value-of select="concat(items:location,' ')"/></b> >+ <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if> >+ <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:if> >+ <xsl:if test="count(key('item-by-status', 'Damaged'))>0"> >+ <span class="unavailable"> >+ <xsl:variable name="damaged_items" >+ select="key('item-by-status', 'Damaged')"/> >+ <xsl:for-each select="$damaged_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> >+ <b><xsl:value-of select="concat(items:location,' ')"/></b> >+ <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if> >+ <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:if> >+ <xsl:if test="count(key('item-by-status', 'On order'))>0"> >+ <span class="unavailable"> >+ <xsl:variable name="onorder_items" >+ select="key('item-by-status', 'On order')"/> >+ <xsl:for-each select="$onorder_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> >+ <b><xsl:value-of select="concat(items:location,' ')"/></b> >+ <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if> >+ <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:if> >+ <xsl:if test="count(key('item-by-status', 'In transit'))>0"> >+ <span class="unavailable"> >+ <xsl:variable name="intransit_items" >+ select="key('item-by-status', 'In transit')"/> >+ <xsl:for-each select="$intransit_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> >+ <b><xsl:value-of select="concat(items:location,' ')"/></b> >+ <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if> >+ <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:if> >+ <xsl:if test="count(key('item-by-status', 'Waiting'))>0"> >+ <span class="unavailable"> >+ <xsl:variable name="waiting_items" >+ select="key('item-by-status', 'Waiting')"/> >+ <xsl:for-each select="$waiting_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]"> >+ <b><xsl:value-of select="concat(items:location,' ')"/></b> >+ <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if> >+ <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:if> > </span> >- >- >+ > </xsl:template> > > <xsl:template name="nameABCDQ"> >-- >1.7.2.5 >
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 5079
:
4523
|
4534
|
4543
|
4544
|
4545
|
4547
|
9296
|
9297
|
9298
|
9299
|
10912
|
10913
|
10929
|
12317
|
14355
|
14605