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

(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl (-49 / +43 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 873-919 Link Here
873
867
874
    </xsl:template>
868
    </xsl:template>
875
869
870
876
    <xsl:template name="showAuthor">
871
    <xsl:template name="showAuthor">
877
        <xsl:param name="authorfield" />
872
    <xsl:param name="authorfield"/>
878
        <xsl:param name="UseAuthoritiesForTracings" />
873
    <xsl:param name="UseAuthoritiesForTracings"/>
874
    <xsl:if test="count($authorfield)&gt;0">
875
        <h5 class="author">
879
        <xsl:for-each select="$authorfield">
876
        <xsl:for-each select="$authorfield">
880
            <xsl:choose><xsl:when test="position()!=1"><xsl:text>; </xsl:text></xsl:when></xsl:choose>
877
        <xsl:choose>
881
            <xsl:choose>
878
          <xsl:when test="position()&gt;1"/>
882
                <xsl:when test="not(@tag=111 or @tag=711)" />
879
          <xsl:when test="@tag&lt;700">Author(s): </xsl:when>
883
                <xsl:when test="marc:subfield[@code='n']">
880
          <xsl:otherwise>Additional author(s): </xsl:otherwise>
884
                    <xsl:text> </xsl:text>
881
        </xsl:choose>
885
                    <xsl:call-template name="subfieldSelect">
882
        <a>
886
                        <xsl:with-param name="codes">n</xsl:with-param>
883
        <xsl:choose>
887
                    </xsl:call-template>
884
            <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
888
                    <xsl:text> </xsl:text>
885
                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
889
                </xsl:when>
886
            </xsl:when>
890
            </xsl:choose>
887
            <xsl:otherwise>
891
            <a>
888
            <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
892
                <xsl:choose>
889
            </xsl:otherwise>
893
                    <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
890
        </xsl:choose>
894
                        <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
891
        <xsl:choose>
895
                    </xsl:when>
892
              <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCDQ"/></xsl:when>
896
                    <xsl:otherwise>
893
              <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when>
897
                        <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
894
              <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when>
898
                    </xsl:otherwise>
895
        </xsl:choose>
899
                </xsl:choose>
896
        <!-- add relator code too between brackets-->
900
                <xsl:choose>
897
        <xsl:if test="marc:subfield[@code='4' or @code='e']">
901
                    <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCDQ"/></xsl:when>
898
          <xsl:text>[</xsl:text>
902
                    <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when>
899
          <xsl:choose>
903
                    <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when>
900
            <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
904
                </xsl:choose>
901
            <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
905
                <!-- add relator code too between brackets-->
902
          </xsl:choose>
906
                <xsl:if test="marc:subfield[@code='4' or @code='e']">
903
          <xsl:text>]</xsl:text>
907
                    <xsl:text>[</xsl:text>
904
        </xsl:if>
908
                    <xsl:choose>
905
        </a>
909
                        <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
906
        <xsl:choose>
910
                        <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
907
          <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
911
                    </xsl:choose>
908
        </xsl:choose>
912
                    <xsl:text>]</xsl:text>
913
                </xsl:if>
914
            </a>
915
        </xsl:for-each>
909
        </xsl:for-each>
916
        <xsl:text>.</xsl:text>
910
        </h5>
911
        </xsl:if>
917
    </xsl:template>
912
    </xsl:template>
918
913
919
    <xsl:template name="nameABCDQ">
914
    <xsl:template name="nameABCDQ">
920
- 

Return to bug 8661