[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"
|
---|
| 7 | extension-element-prefixes="java util"
|
---|
| 8 | exclude-result-prefixes="java util">
|
---|
| 9 |
|
---|
[19988] | 10 | <!-- use the 'main' layout -->
|
---|
[24649] | 11 | <xsl:import href="layouts/main.xsl"/>
|
---|
[24340] | 12 | <xsl:include href="classifiertools.xsl"/>
|
---|
[19856] | 13 |
|
---|
[19988] | 14 | <!-- set page title -->
|
---|
| 15 | <xsl:template name="pageTitle"><gslib:serviceName/></xsl:template>
|
---|
[19856] | 16 |
|
---|
[19988] | 17 | <!-- set page breadcrumbs -->
|
---|
| 18 | <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/> <gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template>
|
---|
| 19 |
|
---|
| 20 | <!-- the page content -->
|
---|
[19856] | 21 | <xsl:template match="/page/pageResponse">
|
---|
[24520] | 22 | <script type="text/javascript" src="interfaces/{$interface_name}/js/classifier_scripts.js"><xsl:text> </xsl:text></script>
|
---|
| 23 |
|
---|
| 24 | <!-- this right sidebar -->
|
---|
| 25 | <xsl:if test="$berryBasketOn or $documentBasketOn">
|
---|
| 26 | <div id="rightSidebar">
|
---|
| 27 | <xsl:if test="$berryBasketOn">
|
---|
| 28 | <!-- show the berry basket if it's turned on -->
|
---|
| 29 | <gslib:berryBasket/>
|
---|
| 30 | <xsl:text> </xsl:text>
|
---|
| 31 | </xsl:if>
|
---|
[24510] | 32 |
|
---|
[24520] | 33 | <xsl:if test="$documentBasketOn">
|
---|
| 34 | <gslib:documentBasket/>
|
---|
| 35 | <xsl:text> </xsl:text>
|
---|
| 36 | </xsl:if>
|
---|
| 37 | </div>
|
---|
| 38 | </xsl:if>
|
---|
[19856] | 39 |
|
---|
| 40 | <!--
|
---|
| 41 | show the clasifier results -
|
---|
| 42 | you can change the appearance of the results by editing
|
---|
| 43 | the two templates at the bottom of this file
|
---|
| 44 | -->
|
---|
[24512] | 45 | <div id="results">
|
---|
[24340] | 46 | <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
|
---|
| 47 | <xsl:variable name="serviceName"><xsl:value-of select="service/@name"/></xsl:variable>
|
---|
| 48 |
|
---|
| 49 | <xsl:apply-templates select="classifier">
|
---|
| 50 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 51 | <xsl:with-param name="serviceName" select="$serviceName"/>
|
---|
| 52 | </xsl:apply-templates>
|
---|
[24512] | 53 | </div>
|
---|
[24520] | 54 | <script type="text/javascript">openStoredClassifiers();</script>
|
---|
[19856] | 55 | <div class="clear"><xsl:text> </xsl:text></div>
|
---|
| 56 | </xsl:template>
|
---|
| 57 |
|
---|
| 58 | <!--
|
---|
| 59 | TEMPLATE FOR DOCUMENTS
|
---|
| 60 | -->
|
---|
[24202] | 61 |
|
---|
[24340] | 62 | <xsl:template match="documentNode"><!-- priority="3"-->
|
---|
[24115] | 63 | <!-- The book icon -->
|
---|
| 64 | <td>
|
---|
| 65 | <img>
|
---|
| 66 | <xsl:attribute name="src">
|
---|
| 67 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'book_image')"/>
|
---|
| 68 | </xsl:attribute>
|
---|
| 69 | </img>
|
---|
| 70 | </td>
|
---|
| 71 | <!-- The document link -->
|
---|
| 72 | <td>
|
---|
[19856] | 73 | <a>
|
---|
[23989] | 74 | <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>
|
---|
[19856] | 75 | <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
|
---|
| 76 | </a>
|
---|
[24115] | 77 | </td>
|
---|
| 78 | <!-- The berry (optional) -->
|
---|
| 79 | <td>
|
---|
[19856] | 80 | <xsl:call-template name="documentBerryForClassifierOrSearchPage"/>
|
---|
[24115] | 81 | </td>
|
---|
[24339] | 82 | </xsl:template>
|
---|
[19856] | 83 |
|
---|
| 84 |
|
---|
| 85 | <!--
|
---|
| 86 | TEMPLATE FOR GROUPS OF DOCUMENTS
|
---|
| 87 | -->
|
---|
[24340] | 88 | <xsl:template match="classifierNode"><!-- priority="3"-->
|
---|
[19856] | 89 |
|
---|
[24512] | 90 | <table id="title{@nodeID}"><tbody><tr>
|
---|
[24009] | 91 | <!-- Expand/collapse button -->
|
---|
| 92 | <td class="headerTD">
|
---|
| 93 | <img id="toggle{@nodeID}" onclick="toggleSection('{@nodeID}');" class="icon">
|
---|
| 94 | <xsl:attribute name="src">
|
---|
| 95 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'expand_image')"/>
|
---|
| 96 | </xsl:attribute>
|
---|
| 97 | </img>
|
---|
| 98 | </td>
|
---|
| 99 | <!-- Bookshelf icon -->
|
---|
| 100 | <td>
|
---|
| 101 | <img>
|
---|
| 102 | <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'bookshelf_image')"/></xsl:attribute>
|
---|
| 103 | </img>
|
---|
| 104 | </td>
|
---|
| 105 | <!-- Link title -->
|
---|
| 106 | <td>
|
---|
| 107 | <a href="javascript:toggleSection('{@nodeID}');">
|
---|
| 108 | <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
|
---|
| 109 | </a>
|
---|
| 110 | </td>
|
---|
[24512] | 111 | </tr></tbody></table>
|
---|
[24009] | 112 |
|
---|
| 113 | <!-- Show any documents or sub-groups in this group -->
|
---|
| 114 | <xsl:if test="documentNode|classifierNode">
|
---|
[24115] | 115 | <div id="div{@nodeID}" class="classifierContainer">
|
---|
| 116 | <table>
|
---|
| 117 | <xsl:for-each select="documentNode|classifierNode">
|
---|
| 118 | <tr>
|
---|
| 119 | <xsl:apply-templates select="."/>
|
---|
| 120 | </tr>
|
---|
| 121 | </xsl:for-each>
|
---|
| 122 | </table>
|
---|
[24009] | 123 | </div>
|
---|
| 124 | </xsl:if>
|
---|
| 125 | </xsl:template>
|
---|
[19856] | 126 | </xsl:stylesheet>
|
---|
| 127 |
|
---|