Modifies opac-detail.tmpl to swap the item type and location columns; the 
system sorts the display based on the first column in line, so moving the 
location to first makes it sort on library/branch name.

Also added a space in the XSLT display between holding library and call number 
(to fix problem of display looking like Public Library[MYS DAHEIM].
---
 .../opac-tmpl/prog/en/modules/opac-detail.tmpl     |    5 +++--
 .../prog/en/xslt/MARC21slim2OPACResults.xsl        |    4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
index ea5f188..4ec4fa1 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
@@ -328,8 +328,8 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
 <!-- TMPL_IF name="count" -->
     <table id="holdingst">
         <thead><tr>
-            <!-- TMPL_IF NAME="item-level_itypes" --><th>Item type</th><!-- 
/TMPL_IF -->
             <th>Location</th>
+            <!-- TMPL_IF NAME="item-level_itypes" --><th>Item type</th><!-- 
/TMPL_IF -->
         <!-- TMPL_IF NAME="itemdata_ccode" --><th>Collection</th><!-- /TMPL_IF 
-->
         <th>Call Number</th>
         <!-- TMPL_IF NAME="itemdata_enumchron" --><th>Vol Info</th><!-- 
/TMPL_IF -->
@@ -343,8 +343,9 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
             <th>Date Due</th>
         </tr></thead>
         <tbody><!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
-        <tr><!-- TMPL_IF NAME="item-level_itypes" --><td><!-- TMPL_IF 
NAME="imageurl" --><img src="<!-- TMPL_VAR NAME="imageurl" -->" title="<!-- 
TMPL_VAR NAME="description" -->" alt="<!-- TMPL_VAR NAME="description" -->" 
/><!-- /TMPL_IF --> <!-- TMPL_VAR NAME="description" --></td><!-- /TMPL_IF -->
+       <tr>
             <td><!-- TMPL_UNLESS NAME="singleBranchMode" --><!-- TMPL_VAR 
NAME="branchname" --><!-- /TMPL_UNLESS --> <!-- TMPL_VAR 
NAME="location_description" --> </td>
+        <!-- TMPL_IF NAME="item-level_itypes" --><td><!-- TMPL_IF 
NAME="imageurl" --><img src="<!-- TMPL_VAR NAME="imageurl" -->" title="<!-- 
TMPL_VAR NAME="description" -->" alt="<!-- TMPL_VAR NAME="description" -->" 
/><!-- /TMPL_IF --> <!-- TMPL_VAR NAME="description" --></td><!-- /TMPL_IF -->
             <!-- TMPL_IF NAME="itemdata_ccode" --><td><!-- TMPL_VAR 
NAME="ccode" --></td><!-- /TMPL_IF -->
             <td><!-- TMPL_IF NAME="itemcallnumber" --> <!-- TMPL_VAR 
NAME="itemcallnumber" --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="OPACShelfBrowser" 
-->(<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR 
NAME="biblionumber" -->&amp;shelfbrowse_itemnumber=<!-- TMPL_VAR 
NAME="itemnumber" -->#shelfbrowser">Browse Shelf</a>)<!-- /TMPL_IF --></td>
             <!-- TMPL_IF NAME="itemdata_enumchron" --><td><!-- TMPL_VAR 
NAME="enumchron" --></td><!-- /TMPL_IF -->
diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl 
b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
index cd9d9f2..45a39d4 100644
--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
@@ -944,7 +944,7 @@
                            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:if 
test="items:itemcallnumber != '' and items:itemcallnumber"><xsl:text> 
</xsl:text>[<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>
@@ -962,7 +962,7 @@
                            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="items:homebranch"/>
-                                                  <xsl:if 
test="items:itemcallnumber != '' and items:itemcallnumber">[<xsl:value-of 
select="items:itemcallnumber"/>]</xsl:if>
+                                                  <xsl:if 
test="items:itemcallnumber != '' and items:itemcallnumber"><xsl:text> 
</xsl:text>[<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>
-- 
1.5.6.5

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to