View | Details | Raw Unified | Return to bug 9995
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl (-33 / +14 lines)
Lines 1106-1146 Link Here
1106
                   </xsl:if>
1106
                   </xsl:if>
1107
               </span>
1107
               </span>
1108
1108
1109
    <xsl:choose>
1109
        <xsl:if test="(count(key('item-by-status', 'available'))>0 or count(key('item-by-status', 'reference'))>0)">
1110
        <xsl:when test="($OPACItemLocation='location' or $OPACItemLocation='ccode') and (count(key('item-by-status', 'available'))!=0 or count(key('item-by-status', 'reference'))!=0)">
1111
            <span class="results_summary" id="location">
1110
            <span class="results_summary" id="location">
1112
                <span class="label">Location(s): </span>
1111
                <span class="label">Location(s): </span>
1113
                <xsl:choose>
1112
                <xsl:for-each select="items:items">
1114
                <xsl:when test="count(key('item-by-status', 'available'))>0">
1113
                    <xsl:for-each select="items:item[items:status='available' or items:status='reference']">
1115
                    <span class="available">
1114
                        <xsl:if test="$singleBranchMode=0"><xsl:value-of select="items:homebranch"/><xsl:text>:</xsl:text></xsl:if>
1116
                        <xsl:variable name="available_items" select="key('item-by-status', 'available')"/>
1115
                        <xsl:choose>
1117
                        <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
1116
                                <xsl:when test="$OPACItemLocation='location'"><b><xsl:value-of select="items:location"/></b><xsl:text> </xsl:text></xsl:when>
1118
                            <xsl:choose>
1117
                                <xsl:when test="$OPACItemLocation='ccode'"><b><xsl:value-of select="items:ccode"/></b><xsl:text> </xsl:text></xsl:when>
1119
                                <xsl:when test="$OPACItemLocation='location'"><b><xsl:value-of select="concat(items:location,' ')"/></b></xsl:when>
1118
                        </xsl:choose>
1120
                                <xsl:when test="$OPACItemLocation='ccode'"><b><xsl:value-of select="concat(items:ccode,' ')"/></b></xsl:when>
1119
                        <xsl:value-of select="items:itemcallnumber"/>
1121
                            </xsl:choose>
1120
                        <xsl:if test="position()!=last()"><xsl:text>, </xsl:text></xsl:if>
1122
                            <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if>
1121
                    </xsl:for-each>
1123
                            <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1122
                </xsl:for-each>
1124
                        </xsl:for-each>
1125
                    </span>
1126
                </xsl:when>
1127
                <xsl:when test="count(key('item-by-status', 'reference'))>0">
1128
                    <span class="available">
1129
                        <xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/>
1130
                        <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
1131
                            <xsl:choose>
1132
                                <xsl:when test="$OPACItemLocation='location'"><b><xsl:value-of select="concat(items:location,' ')"/></b></xsl:when>
1133
                                <xsl:when test="$OPACItemLocation='ccode'"><b><xsl:value-of select="concat(items:ccode,' ')"/></b></xsl:when>
1134
                            </xsl:choose>
1135
                            <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if>
1136
                            <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1137
                        </xsl:for-each>
1138
                    </span>
1139
                </xsl:when>
1140
                </xsl:choose>
1141
            </span>
1123
            </span>
1142
        </xsl:when>
1124
        </xsl:if>
1143
       </xsl:choose>
1125
1144
    </xsl:template>
1126
    </xsl:template>
1145
1127
1146
    <xsl:template name="nameABCDQ">
1128
    <xsl:template name="nameABCDQ">
1147
- 

Return to bug 9995