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 866-905 Link Here
866
       </span>
866
       </span>
867
    </xsl:if>
867
    </xsl:if>
868
868
869
        <xsl:if test="marc:datafield[@tag=856]">
869
    <xsl:if test="marc:datafield[@tag=856]">
870
        <span class="results_summary online_resources"><span class="label">Online resources: </span>
870
        <span class="results_summary online_resources"><span class="label">Online resources: </span>
871
        <xsl:for-each select="marc:datafield[@tag=856]">
871
        <xsl:for-each select="marc:datafield[@tag=856]">
872
                                   <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
872
            <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
873
                                   <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
873
            <a>
874
                                    <xsl:choose>
874
                <xsl:attribute name="href">
875
                                    <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')">
875
                    <xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
876
                                        <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>
876
                        <xsl:choose>
877
                                    </xsl:when>
877
                            <xsl:when test="@ind1=7">
878
                                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
878
                                <xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
879
                                        <xsl:call-template name="subfieldSelect">
879
                            </xsl:when>
880
                                        <xsl:with-param name="codes">y3z</xsl:with-param>
880
                            <xsl:when test="@ind1=1">
881
                                        </xsl:call-template>
881
                                <xsl:text>ftp://</xsl:text>
882
                                    </xsl:when>
882
                            </xsl:when>
883
                                    <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
883
                            <xsl:otherwise>
884
                                        <xsl:choose>
884
                                <xsl:text>http://</xsl:text>
885
                                        <xsl:when test="$URLLinkText!=''">
885
                            </xsl:otherwise>
886
                                                <xsl:value-of select="$URLLinkText"/>
886
                        </xsl:choose>
887
                                        </xsl:when>
887
                    </xsl:if>
888
                                        <xsl:otherwise>
888
                    <xsl:value-of select="marc:subfield[@code='u']"/>
889
                                                <xsl:text>Click here to access online</xsl:text>
889
                </xsl:attribute>
890
                                        </xsl:otherwise>
890
                <xsl:choose>
891
                                        </xsl:choose>
891
                    <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')">
892
                                    </xsl:when>
892
                        <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>
893
                                    </xsl:choose>
893
                    </xsl:when>
894
                                    </a>
894
                    <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
895
                                    <xsl:choose>
895
                        <xsl:call-template name="subfieldSelect">
896
                                    <xsl:when test="position()=last()"><xsl:text>  </xsl:text></xsl:when>
896
                            <xsl:with-param name="codes">y3z</xsl:with-param>
897
                                    <xsl:otherwise> | </xsl:otherwise>
897
                        </xsl:call-template>
898
                                    </xsl:choose>
898
                    </xsl:when>
899
                    <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
900
                        <xsl:choose>
901
                            <xsl:when test="$URLLinkText!=''">
902
                                <xsl:value-of select="$URLLinkText"/>
903
                            </xsl:when>
904
                            <xsl:otherwise>
905
                                <xsl:text>Click here to access online</xsl:text>
906
                            </xsl:otherwise>
907
                        </xsl:choose>
908
                    </xsl:when>
909
                </xsl:choose>
910
            </a>
911
            <xsl:choose>
912
                <xsl:when test="position()=last()"><xsl:text>  </xsl:text></xsl:when>
913
                <xsl:otherwise> | </xsl:otherwise>
914
            </xsl:choose>
899
915
900
        </xsl:for-each>
916
        </xsl:for-each>
901
        </span>
917
        </span>
902
        </xsl:if>
918
    </xsl:if>
919
903
        <xsl:if test="marc:datafield[@tag=505]">
920
        <xsl:if test="marc:datafield[@tag=505]">
904
            <div class="results_summary contents">
921
            <div class="results_summary contents">
905
            <xsl:choose>
922
            <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