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

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

Changing the xsl:include to an xsl:import to allow named templates to be overridden in the collection.xml 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:import 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 TEMPLATE FOR DOCUMENTS
60 -->
61
62 <xsl:template match="documentNode"><!-- priority="3"-->
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>
73 <a>
74 <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>
75 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
76 </a>
77 </td>
78 <!-- The berry (optional) -->
79 <td>
80 <xsl:call-template name="documentBerryForClassifierOrSearchPage"/>
81 </td>
82 </xsl:template>
83
84
85 <!--
86 TEMPLATE FOR GROUPS OF DOCUMENTS
87 -->
88 <xsl:template match="classifierNode"><!-- priority="3"-->
89
90 <table id="title{@nodeID}"><tbody><tr>
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>
111 </tr></tbody></table>
112
113 <!-- Show any documents or sub-groups in this group -->
114 <xsl:if test="documentNode|classifierNode">
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>
123 </div>
124 </xsl:if>
125 </xsl:template>
126</xsl:stylesheet>
127
Note: See TracBrowser for help on using the repository browser.