source: main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl@ 24520

Last change on this file since 24520 was 24520, checked in by sjm84, 13 years ago

The expanding classifers will now remain open if you press back to revisit the page, also adding xsltParams to the gs variable, also changed Document Maker to Document Basket in the pref.xsl file

File size: 4.2 KB
Line 
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
10 <!-- use the 'main' layout -->
11 <xsl:include href="layouts/main.xsl"/>
12 <xsl:include href="classifiertools.xsl"/>
13
14 <!-- set page title -->
15 <xsl:template name="pageTitle"><gslib:serviceName/></xsl:template>
16
17 <!-- set page breadcrumbs -->
18 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/> <gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template>
19
20 <!-- the page content -->
21 <xsl:template match="/page/pageResponse">
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>
32
33 <xsl:if test="$documentBasketOn">
34 <gslib:documentBasket/>
35 <xsl:text> </xsl:text>
36 </xsl:if>
37 </div>
38 </xsl:if>
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 -->
45 <div id="results">
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>
53 </div>
54 <script type="text/javascript">openStoredClassifiers();</script>
55 <div class="clear"><xsl:text> </xsl:text></div>
56 </xsl:template>
57
58
59 <!--
60 TEMPLATE FOR DOCUMENTS
61 -->
62
63 <xsl:template match="documentNode"><!-- priority="3"-->
64 <!-- The book icon -->
65 <td>
66 <img>
67 <xsl:attribute name="src">
68 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'book_image')"/>
69 </xsl:attribute>
70 </img>
71 </td>
72 <!-- The document link -->
73 <td>
74 <a>
75 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>&amp;p.a=b&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;ed=1</xsl:attribute>
76 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
77 </a>
78 </td>
79 <!-- The berry (optional) -->
80 <td>
81 <xsl:call-template name="documentBerryForClassifierOrSearchPage"/>
82 </td>
83 </xsl:template>
84
85
86 <!--
87 TEMPLATE FOR GROUPS OF DOCUMENTS
88 -->
89 <xsl:template match="classifierNode"><!-- priority="3"-->
90
91 <table id="title{@nodeID}"><tbody><tr>
92 <!-- Expand/collapse button -->
93 <td class="headerTD">
94 <img id="toggle{@nodeID}" onclick="toggleSection('{@nodeID}');" class="icon">
95 <xsl:attribute name="src">
96 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'expand_image')"/>
97 </xsl:attribute>
98 </img>
99 </td>
100 <!-- Bookshelf icon -->
101 <td>
102 <img>
103 <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'bookshelf_image')"/></xsl:attribute>
104 </img>
105 </td>
106 <!-- Link title -->
107 <td>
108 <a href="javascript:toggleSection('{@nodeID}');">
109 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
110 </a>
111 </td>
112 </tr></tbody></table>
113
114 <!-- Show any documents or sub-groups in this group -->
115 <xsl:if test="documentNode|classifierNode">
116 <div id="div{@nodeID}" class="classifierContainer">
117 <table>
118 <xsl:for-each select="documentNode|classifierNode">
119 <tr>
120 <xsl:apply-templates select="."/>
121 </tr>
122 </xsl:for-each>
123 </table>
124 </div>
125 </xsl:if>
126 </xsl:template>
127</xsl:stylesheet>
128
Note: See TracBrowser for help on using the repository browser.