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

(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl (-29 / +46 lines)
Lines 822-861 Link Here
822
       </span>
822
       </span>
823
    </xsl:if>
823
    </xsl:if>
824
824
825
        <xsl:if test="marc:datafield[@tag=856]">
825
    <xsl:if test="marc:datafield[@tag=856]">
826
        <span class="results_summary online_resources"><span class="label">Online resources: </span>
826
        <span class="results_summary online_resources"><span class="label">Online resources: </span>
827
        <xsl:for-each select="marc:datafield[@tag=856]">
827
        <xsl:for-each select="marc:datafield[@tag=856]">
828
                                   <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
828
            <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
829
                                   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
829
            <a>
830
                                    <xsl:choose>
830
                <xsl:attribute name="href">
831
                                    <xsl:when test="($Show856uAsImage='Details' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
831
                    <xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
832
                                        <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
832
                        <xsl:choose>
833
                                    </xsl:when>
833
                            <xsl:when test="@ind1=7">
834
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
834
                                <xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
835
                                        <xsl:call-template name="subfieldSelect">
835
                            </xsl:when>
836
                                        <xsl:with-param name="codes">y3z</xsl:with-param>
836
                            <xsl:when test="@ind1=1">
837
                                        </xsl:call-template>
837
                                <xsl:text>ftp://</xsl:text>
838
                                    </xsl:when>
838
                            </xsl:when>
839
                                    <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
839
                            <xsl:otherwise>
840
                                        <xsl:choose>
840
                                <xsl:text>http://</xsl:text>
841
                                        <xsl:when test="$URLLinkText!=''">
841
                            </xsl:otherwise>
842
                                                <xsl:value-of select="$URLLinkText"/>
842
                        </xsl:choose>
843
                                        </xsl:when>
843
                    </xsl:if>
844
                                        <xsl:otherwise>
844
                    <xsl:value-of select="marc:subfield[@code='u']"/>
845
                                                <xsl:text>Click here to access online</xsl:text>
845
                </xsl:attribute>
846
                                        </xsl:otherwise>
846
                <xsl:choose>
847
                                        </xsl:choose>
847
                    <xsl:when test="($Show856uAsImage='Details' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
848
                                    </xsl:when>
848
                        <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
849
                                    </xsl:choose>
849
                    </xsl:when>
850
                                    </a>
850
                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
851
                                    <xsl:choose>
851
                        <xsl:call-template name="subfieldSelect">
852
                                    <xsl:when test="position()=last()"><xsl:text>  </xsl:text></xsl:when>
852
                            <xsl:with-param name="codes">y3z</xsl:with-param>
853
                                    <xsl:otherwise> | </xsl:otherwise>
853
                        </xsl:call-template>
854
                                    </xsl:choose>
854
                    </xsl:when>
855
                    <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
856
                        <xsl:choose>
857
                            <xsl:when test="$URLLinkText!=''">
858
                                <xsl:value-of select="$URLLinkText"/>
859
                            </xsl:when>
860
                            <xsl:otherwise>
861
                                <xsl:text>Click here to access online</xsl:text>
862
                            </xsl:otherwise>
863
                        </xsl:choose>
864
                    </xsl:when>
865
                </xsl:choose>
866
            </a>
867
            <xsl:choose>
868
                <xsl:when test="position()=last()"><xsl:text>  </xsl:text></xsl:when>
869
                <xsl:otherwise> | </xsl:otherwise>
870
            </xsl:choose>
855
871
856
        </xsl:for-each>
872
        </xsl:for-each>
857
        </span>
873
        </span>
858
        </xsl:if>
874
    </xsl:if>
875
859
        <xsl:if test="marc:datafield[@tag=505]">
876
        <xsl:if test="marc:datafield[@tag=505]">
860
            <div class="results_summary contents">
877
            <div class="results_summary contents">
861
            <xsl:choose>
878
            <xsl:choose>
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl (-34 / +49 lines)
Lines 944-983 Link Here
944
	</span>
944
	</span>
945
    </xsl:if>
945
    </xsl:if>
946
    <xsl:if test="marc:datafield[@tag=856]">
946
    <xsl:if test="marc:datafield[@tag=856]">
947
         <span class="results_summary online_access">
947
        <span class="results_summary online_access">
948
			   <span class="label">Online access: </span>
948
            <span class="label">Online access: </span>
949
                            <xsl:for-each select="marc:datafield[@tag=856]">
949
            <xsl:for-each select="marc:datafield[@tag=856]">
950
                            <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
950
                <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
951
				   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
951
                <a>
952
                                    <xsl:choose>
952
                    <xsl:attribute name="href">
953
                                     <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
953
                        <xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
954
                                        <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
954
                            <xsl:choose>
955
                                    </xsl:when>
955
                                <xsl:when test="@ind1=7">
956
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
956
                                    <xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
957
                                        <xsl:call-template name="subfieldSelect">
957
                                </xsl:when>
958
                                        <xsl:with-param name="codes">y3z</xsl:with-param>
958
                                <xsl:when test="@ind1=1">
959
                                        </xsl:call-template>
959
                                    <xsl:text>ftp://</xsl:text>
960
                                    </xsl:when>
960
                                </xsl:when>
961
                                    <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
961
                                <xsl:otherwise>
962
					<xsl:choose>
962
                                    <xsl:text>http://</xsl:text>
963
					<xsl:when test="$URLLinkText!=''">
963
                                </xsl:otherwise>
964
						<xsl:value-of select="$URLLinkText"/>
964
                            </xsl:choose>
965
					</xsl:when>
966
					<xsl:otherwise>
967
						<xsl:text>Click here to access online</xsl:text>
968
					</xsl:otherwise>
969
					</xsl:choose>
970
                                    </xsl:when>
971
                                    </xsl:choose>
972
                                    </a>
973
                                    <xsl:choose>
974
                                    <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
975
                                    <xsl:otherwise> | </xsl:otherwise>
976
                                    </xsl:choose>
977
                            </xsl:for-each>
978
                            </span>
979
                        </xsl:if>
965
                        </xsl:if>
980
    </xsl:template>
966
                        <xsl:value-of select="marc:subfield[@code='u']"/>
967
                    </xsl:attribute>
968
                    <xsl:choose>
969
                        <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
970
                            <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
971
                        </xsl:when>
972
                        <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
973
                            <xsl:call-template name="subfieldSelect">
974
                                <xsl:with-param name="codes">y3z</xsl:with-param>
975
                            </xsl:call-template>
976
                        </xsl:when>
977
                        <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
978
                            <xsl:choose>
979
                                <xsl:when test="$URLLinkText!=''">
980
                                    <xsl:value-of select="$URLLinkText"/>
981
                                </xsl:when>
982
                                <xsl:otherwise>
983
                                    <xsl:text>Click here to access online</xsl:text>
984
                                </xsl:otherwise>
985
                            </xsl:choose>
986
                        </xsl:when>
987
                    </xsl:choose>
988
                </a>
989
                <xsl:choose>
990
                    <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
991
                    <xsl:otherwise> | </xsl:otherwise>
992
                </xsl:choose>
993
            </xsl:for-each>
994
        </span>
995
    </xsl:if>
996
</xsl:template>
981
997
982
    <xsl:template name="nameABCQ">
998
    <xsl:template name="nameABCQ">
983
            <xsl:call-template name="chopPunctuation">
999
            <xsl:call-template name="chopPunctuation">
984
- 

Return to bug 21887