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

(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl (-50 / +45 lines)
Lines 120-174 Link Here
120
            </h5>
120
            </h5>
121
        </xsl:if>
121
        </xsl:if>
122
122
123
        <xsl:choose>
123
        <!-- Author Statement -->
124
        <xsl:when test="marc:datafield[@tag=100] or marc:datafield[@tag=110] or marc:datafield[@tag=111] or marc:datafield[@tag=700] or marc:datafield[@tag=710] or marc:datafield[@tag=711]">
124
        <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/></xsl:call-template>
125
        <h5 class="author">by
125
        <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=700 or @tag=710 or @tag=711]"/></xsl:call-template>
126
        <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
127
        <a>
128
        <xsl:choose>
129
            <xsl:when test="marc:subfield[@code=9]">
130
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
131
            </xsl:when>
132
            <xsl:otherwise>
133
            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
134
            </xsl:otherwise>
135
        </xsl:choose>
136
        <xsl:call-template name="nameABCDQ"/></a>
137
        <xsl:choose>
138
        <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
139
        </xsl:for-each>
140
141
        <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
142
        <a>
143
        <xsl:choose>
144
            <xsl:when test="marc:subfield[@code=9]">
145
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
146
            </xsl:when>
147
            <xsl:otherwise>
148
            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>      
149
            </xsl:otherwise>
150
        </xsl:choose>
151
        <xsl:call-template name="nameABCDN"/></a>
152
        <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
153
        </xsl:for-each>
154
155
        <xsl:for-each select="marc:datafield[@tag=111 or @tag=711]">
156
        <a>
157
        <xsl:choose>
158
            <xsl:when test="marc:subfield[@code=9]">
159
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
160
            </xsl:when>
161
            <xsl:otherwise>
162
            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
163
            </xsl:otherwise>
164
        </xsl:choose>
165
        <xsl:call-template name="nameACDEQ"/></a>
166
        <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
167
168
        </xsl:for-each>
169
        </h5>
170
        </xsl:when>
171
        </xsl:choose>
172
126
173
   <xsl:if test="$materialTypeCode!=''">
127
   <xsl:if test="$materialTypeCode!=''">
174
        <span class="results_summary"><span class="label">Type: </span>
128
        <span class="results_summary"><span class="label">Type: </span>
Lines 835-838 Link Here
835
        <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
789
        <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
836
    </xsl:template>
790
    </xsl:template>
837
791
792
    <xsl:template name="showAuthor">
793
	<xsl:param name="authorfield"/>
794
	<xsl:if test="count($authorfield)&gt;0">
795
        <h5 class="author">
796
        <xsl:for-each select="$authorfield">
797
        <xsl:choose>
798
          <xsl:when test="position()&gt;1"/>
799
          <xsl:when test="@tag&lt;700">Author(s): </xsl:when>
800
          <xsl:otherwise>Additional author(s): </xsl:otherwise>
801
        </xsl:choose>
802
        <a>
803
        <xsl:choose>
804
            <xsl:when test="marc:subfield[@code=9]">
805
                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
806
            </xsl:when>
807
            <xsl:otherwise>
808
            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
809
            </xsl:otherwise>
810
        </xsl:choose>
811
	<xsl:choose>
812
          <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCDQ"/></xsl:when>
813
          <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when>
814
          <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when>
815
	</xsl:choose>
816
	<!-- add relator code too between brackets-->
817
	<xsl:if test="marc:subfield[@code='4' or @code='e']">
818
	  <xsl:text>[</xsl:text>
819
	  <xsl:choose>
820
	    <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
821
	    <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
822
	  </xsl:choose>
823
	  <xsl:text>]</xsl:text>
824
	</xsl:if>
825
	</a>
826
        <xsl:choose>
827
          <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
828
        </xsl:choose>
829
        </xsl:for-each>
830
        </h5>
831
        </xsl:if>
832
    </xsl:template>
833
838
</xsl:stylesheet>
834
</xsl:stylesheet>
839
- 

Return to bug 5701