Changeset 20019
- Timestamp:
- 2009-07-20T13:48:55+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
greenstone3/trunk/web/interfaces/gs2/transform/library.xsl
r19947 r20019 2 2 3 3 <xsl:stylesheet version="1.0" 4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"5 xmlns:gslib="http://www.greenstone.org/XSL/Library"6 exclude-result-prefixes="xalan gslib gsf xslt gs3">4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 5 xmlns:gslib="http://www.greenstone.org/XSL/Library" 6 exclude-result-prefixes="xalan gslib gsf xslt gs3"> 7 7 8 8 9 <xsl:output method="html" 10 doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" 11 doctype-system="http://www.w3.org/TR/html4/loose.dtd" 12 /> 9 <xsl:output method="html" 10 doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" 11 doctype-system="http://www.w3.org/TR/html4/loose.dtd"/> 13 12 14 15 16 <!-- some global parameters - these are set by whoever is invoking the transformation --> 13 <!-- some global parameters - these are set by whoever is invoking the transformation --> 17 14 <xsl:param name="interface_name"/> 18 15 <xsl:param name="library_name"/> 19 16 20 <!-- every pages .............................................. .........................-->17 <!-- every pages .............................................. --> 21 18 22 23 19 <xsl:variable name="a"><xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/></xsl:variable> 20 <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/> 24 21 25 26 <xsl:param name='text'/>27 22 <xsl:template name="GS2LibDividerBar"> 23 <xsl:param name='text'/> 24 <xsl:choose> 28 25 <xsl:when test="$text"> 29 26 <div class="divbar"><xsl:value-of select="$text"/></div> 30 27 </xsl:when> 31 28 <xsl:otherwise> 32 29 <div class="divbar"><xsl:text disable-output-escaping="yes">&nbsp;</xsl:text></div> 33 30 </xsl:otherwise> 34 31 </xsl:choose> 35 32 </xsl:template> 36 33 37 34 <xsl:template match="error"> 38 35 Error: <xsl:value-of select="."/> 39 36 </xsl:template> 40 37 41 <!-- site home ....................................................................... -->38 <!-- site home .................................................... --> 42 39 43 40 44 <xsl:template name="pageTitleLanguageDependant">45 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->46 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/><xsl:text> </xsl:text>47 </xsl:template>41 <xsl:template name="pageTitleLanguageDependant"> 42 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 43 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/><xsl:text> </xsl:text> 44 </xsl:template> 48 45 49 46 50 <xsl:template name="greenstoneLogoAlternateText">51 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>52 </xsl:template>47 <xsl:template name="greenstoneLogoAlternateText"> 48 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/> 49 </xsl:template> 53 50 54 51 55 <xsl:template name="collectionLinkWithImage">56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 </xsl:template>52 <xsl:template name="collectionLinkWithImage"> 53 <xsl:choose> 54 <xsl:when test="displayItem[@name='icon']"> 55 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}"> 56 <img> 57 <xsl:attribute name="src"> 58 <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="displayItem[@name='icon']"/> 59 </xsl:attribute> 60 <xsl:attribute name="alt"> 61 <xsl:value-of select="displayItem[@name='name']"/> 62 </xsl:attribute> 63 </img> 64 </a> 65 </xsl:when> 66 <xsl:otherwise> 67 <a class="noimage" href="{$library_name}?a=p&amp;sa=about&amp;c={@name}"> 68 <xsl:value-of select="displayItem[@name='name']"/> 69 </a> 70 </xsl:otherwise> 71 </xsl:choose> 72 </xsl:template> 76 73 77 74 78 75 <xsl:template name="quickSearchForm"> 79 76 <form name="QuickSearch" method="get" action="{$library_name}"> 80 81 82 83 84 85 77 <input type="hidden" name="a" value="q"/> 78 <input type="hidden" name="rt" value="rd"/> 79 <input type="hidden" name="s" value="{/page/pageResponse/serviceList/service[@name='TextQuery']/@name}"/> 80 <input type="hidden" name="s1.collection" value="all"/> 81 <input type="text" name="s1.query" size="20"/> 82 <input type="submit" value="Quick Search"/> 86 83 </form> 87 88 89 90 84 </xsl:template> 85 86 87 <xsl:template match="serviceClusterList"> 91 88 <xsl:for-each select="serviceCluster"> 92 89 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}"><xsl:value-of select='@name'/><xsl:value-of select="displayItem[@name='name']"/></a> … … 96 93 97 94 98 99 95 <xsl:template name="poweredByGS3LanguageDependant"> 96 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/> 100 97 </xsl:template> 101 98
Note:
See TracChangeset
for help on using the changeset viewer.