close Warning: Can't use blame annotator:
svn blame failed on main/trunk/model-interfaces-dev/heritage-nz/transform/pages/classifier.xsl: 195004 - Cannot calculate blame information for binary file 'file:///var/www/svn/greenstone/main/trunk/model-interfaces-dev/heritage-nz/transform/pages/classifier.xsl'

source: main/trunk/model-interfaces-dev/heritage-nz/transform/pages/classifier.xsl@ 33074

Last change on this file since 33074 was 33074, checked in by davidb, 5 years ago

Changes to provided customized layout requested by Heritage NZ, including searching and browsing on About page in text, and berry baskets

  • Property svn:mime-type set to application/xml
File size: 7.7 KB
RevLine 
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 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
8 extension-element-prefixes="java util"
9 exclude-result-prefixes="java util gsf">
10
11
12 <!-- set page title -->
13 <xsl:template name="pageTitle"><gslib:collectionNameLinked/><gslib:rightArrow/><gslib:serviceName/></xsl:template>
14
15
16 <!-- the page content -->
17 <xsl:template match="/page/pageResponse">
18 <xsl:call-template name="classifierPre"/>
19
20 <script type="text/javascript" src="interfaces/{$interface_name}/js/classifier_scripts.js"><xsl:text> </xsl:text></script>
21 <script type="text/javascript">$(window).load(openStoredClassifiers);</script>
22
23 <!-- **** Customized **** -->
24 <xsl:variable name="clName"><xsl:value-of select="classifier/@name"/></xsl:variable>
25 <xsl:variable name="floatRightWidth">
26 <xsl:choose>
27 <xsl:when test="$clName = 'CL4'">20</xsl:when>
28 <xsl:otherwise>20</xsl:otherwise> <!-- used to be 30 -->
29 </xsl:choose>
30 </xsl:variable>
31 <xsl:variable name="floatLeftWidth">
32 <xsl:choose>
33 <xsl:when test="$clName = 'CL4'">58</xsl:when>
34 <xsl:otherwise>77</xsl:otherwise> <!-- used to be 67 -->
35 </xsl:choose>
36 </xsl:variable>
37
38 <!-- **** Customized **** -->
39 <div id="float-anchor" style="width: {$floatRightWidth}%; min-width:180px; float:right; margin: 0 0 10px 20px;">
40
41 <!-- this right sidebar -->
42 <div id="rightSidebar">
43 <xsl:comment>Filler needed for div</xsl:comment>
44 <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)))">
45 <xsl:if test="$berryBasketOn">
46 <xsl:call-template name="viewOptions"/>
47 <!-- show the berry basket if it's turned on -->
48 <div class="tableOfContentsContainer" style="position:relative; z-index: 2;"> <!-- **** -->
49 <gslib:berryBasket/>
50 <xsl:text> </xsl:text>
51 </div>
52 </xsl:if>
53
54 <xsl:if test="$documentBasketOn">
55 <gslib:documentBasket/>
56 <xsl:text> </xsl:text>
57 </xsl:if>
58 </xsl:if>
59 </div>
60 </div>
61
62 <!--
63 show the clasifier results -
64 you can change the appearance of the results by editing
65 the two templates at the bottom of this file
66 -->
67 <!-- **** Customized **** -->
68 <div id="results" style="width: {$floatLeftWidth}%">
69 <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
70 <xsl:variable name="serviceName"><xsl:value-of select="service/@name"/></xsl:variable>
71
72 <xsl:call-template name="classifierResultsPre"/>
73
74 <xsl:apply-templates select="classifier">
75 <xsl:with-param name="collName" select="$collName"/>
76 <xsl:with-param name="serviceName" select="$serviceName"/>
77 </xsl:apply-templates>
78 </div>
79
80 <div class="clear"><xsl:text> </xsl:text></div>
81 </xsl:template>
82
83
84
85 <xsl:template name="viewOptions">
86
87 <div id="viewAndZoomOptions" class="ui-state-default ui-corner-all">
88 <ul id="viewOptions">
89
90 <!-- Zoom on/off button -->
91
92 <xsl:if test="not(/page/pageResponse/format[@type='display']/gsf:option[@name='disableZoom']) or /page/pageResponse/format[@type='display']/gsf:option[@name='disableZoom']/@value='false'">
93
94 <!-- **** Customized **** -->
95 <xsl:variable name="clName"><xsl:value-of select="classifier/@name"/></xsl:variable>
96 <xsl:if test="$clName = 'CL4'">
97 <li id="zoomOptions" style="display:none;">
98<!--
99 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.zoomTooltip')"/></xsl:attribute>
100-->
101 <xsl:attribute name="title">Enable/disable Zoom feature over map</xsl:attribute>
102 <img id="zoomToggleImage">
103 <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'zoom_image')"/></xsl:attribute>
104 </img>
105
106 <input id="zoomToggle" type="checkbox" checked="checked"/>
107 <script type="text/javascript">
108 <xsl:text disable-output-escaping="yes">
109 $("#zoomToggle").change(function()
110 {
111 //console.log("**** zoomToggle.change()");
112 _imageZoomEnabled = $("#zoomToggle").prop("checked");
113 //console.log("**** imageZoomEnable now = " + _imageZoomEnabled);
114 });
115
116 $("#zoomToggleImage").click(function()
117 {
118 //console.log("**** zoomToggle.click()");
119 $("#zoomToggle").prop("checked", !$("#zoomToggle").prop("checked"));
120 _imageZoomEnabled = $("#zoomToggle").prop("checked");
121 //console.log("**** imageZoomEnable now = " + _imageZoomEnabled);
122 });
123 </xsl:text>
124 </script>
125 </li>
126 </xsl:if>
127 </xsl:if>
128
129
130 <!-- Floating TOC on/off button -->
131 <li id="floatingTOCOptions">
132<!--
133 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.floatingTooltip')"/></xsl:attribute>
134-->
135 <xsl:attribute name="title">Fix the berry basket to the right side of the screen</xsl:attribute>
136 <img id="floatTOCToggleImage">
137 <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'float_toc_image')"/></xsl:attribute>
138 </img>
139
140 <input id="floatTOCToggle" type="checkbox"/>
141 <script type="text/javascript">
142 <xsl:text disable-output-escaping="yes">
143 $("#floatTOCToggle").prop("checked", false);
144 $("#floatTOCToggle").click(function()
145 {
146 floatMenu($("#floatTOCToggle").prop("checked"));
147 });
148
149 $("#floatTOCToggleImage").click(function()
150 {
151 $("#floatTOCToggle").prop("checked", !$("#floatTOCToggle").prop("checked"))
152 floatMenu($("#floatTOCToggle").prop("checked"));
153 });
154 </xsl:text>
155 </script>
156 </li>
157 <xsl:if test="/page/pageRequest/paramList/param[@name='ftoc']/@value = '1'">
158 <script type="text/javascript">
159 <xsl:text disable-output-escaping="yes">
160 $(window).load(function()
161 {
162 $("#floatTOCToggle").prop("checked", true);
163 floatMenu(true);
164 });
165 </xsl:text>
166 </script>
167 </xsl:if>
168 </ul>
169 <div style="clear:both;"><xsl:text> </xsl:text></div>
170 </div>
171 </xsl:template>
172
173
174
175
176 <xsl:template match="classifier">
177 <xsl:param name="collName"/>
178 <xsl:param name="serviceName"/>
179 <div id="classifiers">
180 <!-- **** Customized **** -->
181 <xsl:variable name="clName"><xsl:value-of select="@name"/></xsl:variable>
182 <xsl:choose>
183 <xsl:when test="@childType = 'HList'">
184 <xsl:call-template name="HList">
185 <xsl:with-param name='collName' select='$collName'/>
186 <xsl:with-param name='serviceName' select='$serviceName'/>
187 </xsl:call-template>
188 </xsl:when>
189 <xsl:otherwise>
190 <!-- **** Customized **** -->
191 <div style="position: relative">
192 <xsl:if test="$clName = 'CL4'">
193 <!--
194 width="1380.2666"
195 height="1746.2094"
196 -->
197 <iframe src="interfaces/{$interface_name}/iframe/nz-territories.svg"
198 style="float:right; width: 345px; height: 436px; border: none; ">
199 <gsf:comment>filler</gsf:comment>
200 </iframe>
201 </xsl:if>
202
203 <table id="classifiernodelist">
204 <xsl:text> </xsl:text>
205 <xsl:call-template name="processNodeChildren">
206 <xsl:with-param name='collName' select='$collName'/>
207 <xsl:with-param name='serviceName' select='$serviceName'/>
208 </xsl:call-template>
209 </table>
210 </div>
211 </xsl:otherwise>
212 </xsl:choose>
213 </div>
214 </xsl:template>
215
216
217</xsl:stylesheet>
218
Note: See TracBrowser for help on using the repository browser.