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

(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl (-49 / +42 lines)
Lines 137-152 Link Here
137
                </xsl:call-template>
137
                </xsl:call-template>
138
            </h5>
138
            </h5>
139
        </xsl:if>
139
        </xsl:if>
140
        <xsl:choose>
140
141
            <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]">
141
    <!-- Author Statement -->
142
                <h5 class="author">by
142
    <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template>
143
                    <xsl:call-template name="showAuthor">
143
    <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=700 or @tag=710 or @tag=711]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template>
144
                        <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111 or @tag=700 or @tag=710 or @tag=711]"/>
145
                        <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
146
                    </xsl:call-template>
147
                </h5>
148
            </xsl:when>
149
        </xsl:choose>
150
144
151
   <xsl:if test="$DisplayOPACiconsXSLT!='0'">
145
   <xsl:if test="$DisplayOPACiconsXSLT!='0'">
152
        <xsl:if test="$materialTypeCode!=''">
146
        <xsl:if test="$materialTypeCode!=''">
Lines 880-931 Link Here
880
    </xsl:template>
874
    </xsl:template>
881
875
882
    <xsl:template name="showAuthor">
876
    <xsl:template name="showAuthor">
883
        <xsl:param name="authorfield" />
877
    <xsl:param name="authorfield"/>
884
        <xsl:param name="UseAuthoritiesForTracings" />
878
    <xsl:param name="UseAuthoritiesForTracings"/>
879
    <xsl:if test="count($authorfield)&gt;0">
880
        <h5 class="author">
885
        <xsl:for-each select="$authorfield">
881
        <xsl:for-each select="$authorfield">
886
            <xsl:choose><xsl:when test="position()!=1"><xsl:text>; </xsl:text></xsl:when></xsl:choose>
882
        <xsl:choose>
887
            <xsl:choose>
883
          <xsl:when test="position()&gt;1"/>
888
                <xsl:when test="not(@tag=111 or @tag=711)" />
884
          <xsl:when test="@tag&lt;700">Author(s): </xsl:when>
889
                <xsl:when test="marc:subfield[@code='n']">
885
          <xsl:otherwise>Additional author(s): </xsl:otherwise>
890
                    <xsl:text> </xsl:text>
886
        </xsl:choose>
891
                    <xsl:call-template name="subfieldSelect">
887
        <a>
892
                        <xsl:with-param name="codes">n</xsl:with-param>
888
        <xsl:choose>
893
                    </xsl:call-template>
889
            <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
894
                    <xsl:text> </xsl:text>
890
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
895
                </xsl:when>
891
            </xsl:when>
896
            </xsl:choose>
892
            <xsl:otherwise>
897
            <a>
893
            <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
898
                <xsl:choose>
894
            </xsl:otherwise>
899
                    <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
895
        </xsl:choose>
900
                        <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
896
        <xsl:choose>
901
                    </xsl:when>
897
              <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCDQ"/></xsl:when>
902
                    <xsl:otherwise>
898
              <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when>
903
                        <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
899
              <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when>
904
                    </xsl:otherwise>
900
        </xsl:choose>
905
                </xsl:choose>
901
        <!-- add relator code too between brackets-->
906
                <xsl:choose>
902
        <xsl:if test="marc:subfield[@code='4' or @code='e']">
907
                    <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCDQ"/></xsl:when>
903
          <xsl:text>[</xsl:text>
908
                    <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when>
904
          <xsl:choose>
909
                    <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when>
905
            <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
910
                </xsl:choose>
906
            <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
911
                <!-- add relator code too between brackets-->
907
          </xsl:choose>
912
                <xsl:if test="marc:subfield[@code='4' or @code='e']">
908
          <xsl:text>]</xsl:text>
913
                    <xsl:text>[</xsl:text>
909
        </xsl:if>
914
                    <xsl:choose>
910
        </a>
915
                        <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
916
                        <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
917
                    </xsl:choose>
918
                    <xsl:text>]</xsl:text>
919
                </xsl:if>
920
            </a>
921
            <xsl:if test="marc:subfield[@code=9]">
911
            <xsl:if test="marc:subfield[@code=9]">
922
                <a class='authlink'>
912
                <a class='authlink'>
923
                    <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
913
                    <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
924
                    <img style="vertical-align:middle" height="15" width="15" src="/opac-tmpl/prog/images/filefind.png"/>
914
                    <img style="vertical-align:middle" height="15" width="15" src="/opac-tmpl/prog/images/filefind.png"/>
925
                </a>
915
                </a>
926
            </xsl:if>
916
            </xsl:if>
917
        <xsl:choose>
918
          <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
919
        </xsl:choose>
927
        </xsl:for-each>
920
        </xsl:for-each>
928
        <xsl:text>.</xsl:text>
921
        </h5>
922
        </xsl:if>
929
    </xsl:template>
923
    </xsl:template>
930
924
931
    <xsl:template name="nameABCDQ">
925
    <xsl:template name="nameABCDQ">
932
- 

Return to bug 8661