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

Last change on this file since 20477 was 20477, checked in by oranfry, 15 years ago

if there is only one classifier, dont display a list of classifiers

File size: 3.0 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
13 <!-- set page title -->
14 <xsl:template name="pageTitle"><gslib:serviceName/></xsl:template>
15
16 <!-- set page breadcrumbs -->
17 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/> <gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template>
18
19 <!-- the page content -->
20 <xsl:template match="/page/pageResponse">
21
22 <!-- show the classifiers if more than one (title, subject, etc.) -->
23 <xsl:if test="service/classifierList/classifier[2]">
24 <div id="classifierList" class="navList">
25 <ul>
26 <xsl:for-each select="service/classifierList/classifier">
27 <li><gslib:classifierLink/></li>
28 </xsl:for-each>
29 </ul>
30 <div class="clear"><xsl:text> </xsl:text></div>
31 </div>
32 </xsl:if>
33
34 <!-- this right sidebar -->
35 <div id="rightSidebar">
36 <!-- show the berry basket if it's turned on -->
37 <gslib:berryBasket/>
38 <xsl:text> </xsl:text>
39 </div>
40
41 <!--
42 show the clasifier results -
43 you can change the appearance of the results by editing
44 the two templates at the bottom of this file
45 -->
46 <ul id="results">
47 <xsl:apply-templates select="classifier/*"/>
48 </ul>
49 <div class="clear"><xsl:text> </xsl:text></div>
50
51 </xsl:template>
52
53
54 <!--
55 TEMPLATE FOR DOCUMENTS
56 -->
57 <xsl:template match="documentNode" priority="3">
58
59 <!-- show the document details -->
60 <li class="document">
61
62 <a>
63 <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"/></xsl:attribute>
64 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
65 </a>
66 <xsl:call-template name="documentBerryForClassifierOrSearchPage"/>
67
68 </li>
69
70 </xsl:template>
71
72
73 <!--
74 TEMPLATE FOR GROUPS OF DOCUMENTS
75 -->
76 <xsl:template match="classifierNode" priority="3">
77
78 <li class="shelf">
79
80 <a>
81 <xsl:attribute name="href">
82 <xsl:value-of select="$library_name"/>?a=b&amp;rt=r&amp;s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;cl=<xsl:value-of select='@nodeID'/><xsl:if test="classifierNode|documentNode">.pr</xsl:if></xsl:attribute>
83 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
84 </a>
85
86 <!-- show any documents or sub-groups in this group -->
87 <xsl:if test="documentNode|classifierNode">
88 <ul>
89 <xsl:apply-templates select="documentNode|classifierNode"/>
90 </ul>
91 </xsl:if>
92 </li>
93
94 </xsl:template>
95
96</xsl:stylesheet>
97
Note: See TracBrowser for help on using the repository browser.