[19856] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <xsl:stylesheet version="1.0"
|
---|
| 3 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
| 4 | xmlns:java="http://xml.apache.org/xslt/java"
|
---|
| 5 | xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
|
---|
| 6 | xmlns:gslib="http://www.greenstone.org/skinning"
|
---|
[24997] | 7 | xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
|
---|
[19856] | 8 | extension-element-prefixes="java util"
|
---|
[24997] | 9 | exclude-result-prefixes="java util gsf">
|
---|
[19856] | 10 |
|
---|
[19988] | 11 | <!-- use the 'main' layout -->
|
---|
[24649] | 12 | <xsl:import href="layouts/main.xsl"/>
|
---|
[24997] | 13 | <xsl:import href="classifiertools.xsl"/>
|
---|
[19856] | 14 |
|
---|
[19988] | 15 | <!-- set page title -->
|
---|
| 16 | <xsl:template name="pageTitle"><gslib:serviceName/></xsl:template>
|
---|
[19856] | 17 |
|
---|
[19988] | 18 | <!-- set page breadcrumbs -->
|
---|
[24997] | 19 | <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/><gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template>
|
---|
[19988] | 20 |
|
---|
[25918] | 21 | <!-- optional cgi-params for links to document pages -->
|
---|
| 22 | <xsl:variable name="opt-doc-link-args"></xsl:variable>
|
---|
[19988] | 23 | <!-- the page content -->
|
---|
[19856] | 24 | <xsl:template match="/page/pageResponse">
|
---|
[24997] | 25 | <xsl:call-template name="classifierPre"/>
|
---|
| 26 |
|
---|
[24520] | 27 | <script type="text/javascript" src="interfaces/{$interface_name}/js/classifier_scripts.js"><xsl:text> </xsl:text></script>
|
---|
[24997] | 28 | <script type="text/javascript">$(window).load(openStoredClassifiers);</script>
|
---|
[24520] | 29 |
|
---|
| 30 | <!-- this right sidebar -->
|
---|
[25144] | 31 | <xsl:if test="$berryBasketOn or ($documentBasketOn and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor)))">
|
---|
[24520] | 32 | <div id="rightSidebar">
|
---|
| 33 | <xsl:if test="$berryBasketOn">
|
---|
| 34 | <!-- show the berry basket if it's turned on -->
|
---|
| 35 | <gslib:berryBasket/>
|
---|
| 36 | <xsl:text> </xsl:text>
|
---|
| 37 | </xsl:if>
|
---|
[24510] | 38 |
|
---|
[24520] | 39 | <xsl:if test="$documentBasketOn">
|
---|
| 40 | <gslib:documentBasket/>
|
---|
| 41 | <xsl:text> </xsl:text>
|
---|
| 42 | </xsl:if>
|
---|
| 43 | </div>
|
---|
| 44 | </xsl:if>
|
---|
[19856] | 45 |
|
---|
| 46 | <!--
|
---|
| 47 | show the clasifier results -
|
---|
| 48 | you can change the appearance of the results by editing
|
---|
| 49 | the two templates at the bottom of this file
|
---|
| 50 | -->
|
---|
[24512] | 51 | <div id="results">
|
---|
[24340] | 52 | <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
|
---|
| 53 | <xsl:variable name="serviceName"><xsl:value-of select="service/@name"/></xsl:variable>
|
---|
| 54 |
|
---|
[24997] | 55 | <xsl:call-template name="classifierResultsPre"/>
|
---|
| 56 |
|
---|
[24340] | 57 | <xsl:apply-templates select="classifier">
|
---|
| 58 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 59 | <xsl:with-param name="serviceName" select="$serviceName"/>
|
---|
| 60 | </xsl:apply-templates>
|
---|
[24512] | 61 | </div>
|
---|
[24997] | 62 |
|
---|
[19856] | 63 | <div class="clear"><xsl:text> </xsl:text></div>
|
---|
| 64 | </xsl:template>
|
---|
| 65 |
|
---|
| 66 | <!--
|
---|
| 67 | TEMPLATE FOR DOCUMENTS
|
---|
| 68 | -->
|
---|
[24340] | 69 | <xsl:template match="documentNode"><!-- priority="3"-->
|
---|
[24115] | 70 | <!-- The book icon -->
|
---|
| 71 | <td>
|
---|
| 72 | <img>
|
---|
| 73 | <xsl:attribute name="src">
|
---|
| 74 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'book_image')"/>
|
---|
| 75 | </xsl:attribute>
|
---|
| 76 | </img>
|
---|
| 77 | </td>
|
---|
| 78 | <!-- The document link -->
|
---|
| 79 | <td>
|
---|
[19856] | 80 | <a>
|
---|
[24997] | 81 | <xsl:choose>
|
---|
| 82 | <xsl:when test="@docType = 'paged'">
|
---|
| 83 | <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&d=<xsl:value-of select="@nodeID"/>&dt=<xsl:value-of select="@docType"/>&p.a=b&p.s=<xsl:value-of select="/page/pageResponse/service/@name"/></xsl:attribute>
|
---|
| 84 | </xsl:when>
|
---|
| 85 | <xsl:otherwise>
|
---|
| 86 | <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&d=<xsl:value-of select="@nodeID"/>&dt=<xsl:value-of select="@docType"/>&p.a=b&p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&ed=1</xsl:attribute>
|
---|
| 87 | </xsl:otherwise>
|
---|
| 88 | </xsl:choose>
|
---|
[19856] | 89 | <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
|
---|
| 90 | </a>
|
---|
[24115] | 91 | </td>
|
---|
| 92 | <!-- The berry (optional) -->
|
---|
| 93 | <td>
|
---|
[19856] | 94 | <xsl:call-template name="documentBerryForClassifierOrSearchPage"/>
|
---|
[24115] | 95 | </td>
|
---|
[24339] | 96 | </xsl:template>
|
---|
[19856] | 97 |
|
---|
| 98 | <!--
|
---|
| 99 | TEMPLATE FOR GROUPS OF DOCUMENTS
|
---|
| 100 | -->
|
---|
[31548] | 101 | <xsl:template match="classifierNode[@classifierStyle = 'HList']" >
|
---|
| 102 | <gsf:link type="classifier">
|
---|
| 103 | <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
|
---|
| 104 | </gsf:link>
|
---|
| 105 | </xsl:template>
|
---|
| 106 |
|
---|
[24340] | 107 | <xsl:template match="classifierNode"><!-- priority="3"-->
|
---|
[19856] | 108 |
|
---|
[31551] | 109 | <!--<table id="title{@nodeID}"><tbody><tr>-->
|
---|
[24009] | 110 | <!-- Bookshelf icon -->
|
---|
| 111 | <td>
|
---|
| 112 | <img>
|
---|
| 113 | <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'bookshelf_image')"/></xsl:attribute>
|
---|
| 114 | </img>
|
---|
| 115 | </td>
|
---|
| 116 | <!-- Link title -->
|
---|
| 117 | <td>
|
---|
| 118 | <a href="javascript:toggleSection('{@nodeID}');">
|
---|
| 119 | <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
|
---|
| 120 | </a>
|
---|
| 121 | </td>
|
---|
[31551] | 122 | <!--</tr></tbody></table>-->
|
---|
[31550] | 123 |
|
---|
[24009] | 124 | <!-- Show any documents or sub-groups in this group -->
|
---|
[31551] | 125 | <!-- <xsl:if test="documentNode|classifierNode">
|
---|
[24115] | 126 | <div id="div{@nodeID}" class="classifierContainer">
|
---|
| 127 | <table>
|
---|
| 128 | <xsl:for-each select="documentNode|classifierNode">
|
---|
| 129 | <tr>
|
---|
| 130 | <xsl:apply-templates select="."/>
|
---|
| 131 | </tr>
|
---|
| 132 | </xsl:for-each>
|
---|
| 133 | </table>
|
---|
[24009] | 134 | </div>
|
---|
[31551] | 135 | </xsl:if>-->
|
---|
[24009] | 136 | </xsl:template>
|
---|
[24997] | 137 |
|
---|
| 138 | <xsl:template name="classifierPre">
|
---|
| 139 | <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'">
|
---|
| 140 | <xsl:call-template name="mapFeaturesJSONNodes"/>
|
---|
| 141 | </xsl:if>
|
---|
[26871] | 142 |
|
---|
| 143 | <xsl:if test="/page/pageResponse/format/gsf:option[@name='panoramaViewerEnabled']/@value = 'true'">
|
---|
| 144 | <xsl:call-template name="panoramaViewerFeaturesJSONNodes"/>
|
---|
| 145 | </xsl:if>
|
---|
| 146 |
|
---|
[24997] | 147 | </xsl:template>
|
---|
| 148 |
|
---|
| 149 | <xsl:template name="classifierResultsPre">
|
---|
| 150 | <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'">
|
---|
[26871] | 151 | <xsl:call-template name="mapFeaturesMap"/>
|
---|
[24997] | 152 | </xsl:if>
|
---|
[26871] | 153 | <xsl:if test="/page/pageResponse/format/gsf:option[@name='panoramaViewerEnabled']/@value = 'true'">
|
---|
| 154 | <xsl:call-template name="panoramaViewerFeatures"/>
|
---|
| 155 | </xsl:if>
|
---|
[24997] | 156 | </xsl:template>
|
---|
| 157 |
|
---|
| 158 |
|
---|
[26871] | 159 |
|
---|
| 160 |
|
---|
[30478] | 161 | <xsl:template match="/page/xsltparams">
|
---|
| 162 | <!-- suppress xsltparam block in page -->
|
---|
| 163 | </xsl:template>
|
---|
[19856] | 164 | </xsl:stylesheet>
|
---|
| 165 |
|
---|