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

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

Weaving in of Favourites; small width adjustment for classifer CL4 display within iframe

  • Property svn:mime-type set to application/xml
File size: 7.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 xmlns:gsvar="http://www.greenstone.org/skinning-var"
8 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
9 extension-element-prefixes="java util"
10 exclude-result-prefixes="java util gsf">
11
12 <!-- set page title -->
13 <xsl:template name="pageTitle">
14 <gslib:collectionNameLinked/><gslib:rightArrow/><gslib:serviceName/>
15 </xsl:template>
16
17
18
19 <xsl:template name="displayBaskets">
20<!--
21 <div id="float-anchor" style="width: 31%; min-width:180px; float:right; margin: 0 0 10px 20px;">
22-->
23<!-- **** -->
24 <div id="float-anchor" style="position: absolute; width: 29%; min-width:180px; top: 105px; right:20px; margin: 0 0 10px 20px;">
25 <xsl:comment>Filler needed for div</xsl:comment>
26 <xsl:call-template name="viewOptions"/>
27
28 <xsl:if test="$berryBasketOn or $favouritesBasketOn 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)))">
29 <div id="rightSidebar" style="margin: 0 0 5px 5px; width: 100%">
30<!--
31The following had been added to default interface version of query.xsl at this point
32Not clear if having the following lines in the 'default' version is desirable or not
33for general look of interface, outside of Heritage-NZ interface.
34Probably not, as surely it would need some of the other changes to let the view
35options make sense.
36
37 <xsl:comment>Filler needed for div</xsl:comment>
38 <xsl:call-template name="viewOptions"/>
39-->
40 <xsl:if test="$berryBasketOn">
41 <!-- show the berry basket if it's turned on -->
42 <div class="tableOfContentsContainer" style="position:relative; z-index: 2;"> <!-- **** -->
43 <gslib:berryBasket/>
44 <xsl:text> </xsl:text>
45 </div>
46 </xsl:if>
47
48 <xsl:if test="$favouritesBasketOn">
49 <!-- show the favourites 'basket' if it's turned on -->
50 <div class="tableOfContentsContainer" style="position:relative; z-index: 2;"> <!-- **** -->
51 <gslib:gotoFavourites/>
52 <xsl:text> </xsl:text>
53 </div>
54 </xsl:if>
55
56 <xsl:if test="$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))">
57 <gslib:documentBasket/>
58 <xsl:text> </xsl:text>
59 </xsl:if>
60 </div>
61 </xsl:if>
62 </div>
63 </xsl:template>
64
65
66
67 <xsl:template name="viewOptions">
68
69 <div id="viewAndZoomOptions" class="ui-state-default ui-corner-all">
70 <ul id="viewOptions">
71
72
73 <!-- Floating TOC on/off button -->
74 <xsl:if test="$berryBasketOn">
75 <li id="floatingTOCOptions">
76<!--
77 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.floatingTooltip')"/></xsl:attribute>
78-->
79 <xsl:attribute name="title">Fix the berry basket to the right side of the screen</xsl:attribute>
80 <img id="floatTOCToggleImage">
81 <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'float_berrybasket_image')"/></xsl:attribute>
82 </img>
83
84 <input id="floatTOCToggle" type="checkbox"/>
85 <script type="text/javascript">
86 <xsl:text disable-output-escaping="yes">
87 $("#floatTOCToggle").prop("checked", false);
88 $("#floatTOCToggle").click(function()
89 {
90 floatMenu($("#floatTOCToggle").prop("checked"));
91 });
92
93 $("#floatTOCToggleImage").click(function()
94 {
95 $("#floatTOCToggle").prop("checked", !$("#floatTOCToggle").prop("checked"))
96 floatMenu($("#floatTOCToggle").prop("checked"));
97 });
98 </xsl:text>
99 </script>
100 </li>
101 <xsl:if test="/page/pageRequest/paramList/param[@name='ftoc']/@value = '1'">
102 <script type="text/javascript">
103 <xsl:text disable-output-escaping="yes">
104 $(window).load(function()
105 {
106 $("#floatTOCToggle").prop("checked", true);
107 floatMenu(true);
108 });
109 </xsl:text>
110 </script>
111 </xsl:if>
112 </xsl:if>
113 </ul>
114 <div style="clear:both;"><xsl:text> </xsl:text></div>
115 </div>
116 </xsl:template>
117
118
119
120 <xsl:template name="displayFacets">
121 <script type="text/javascript" src="interfaces/{$interface_name}/js/utility_scripts.js"><xsl:text> </xsl:text></script>
122 <script type="text/javascript" src="interfaces/{$interface_name}/js/facet-scripts.js">
123 <xsl:text> </xsl:text>
124 </script>
125<!--
126 <div id="facetSelector" style="position: absolute; right: 20px; top: 300px;">
127-->
128<!-- **** -->
129 <div id="facetSelector" style="position: relative; float: right; top: 100px;">
130 <xsl:for-each select="/page/pageResponse/facetList/facet">
131 <xsl:if test="count(count) > 0">
132 <ul class="facetTable ui-widget-content" indexName="{@name}">
133 <xsl:variable name="serviceName">
134 <xsl:value-of select="/page/pageRequest/paramList/param[@name = 's']/@value"/>
135 </xsl:variable>
136 <xsl:variable name="indexShortName">
137 <xsl:value-of select="@name"/>
138 </xsl:variable>
139 <xsl:variable name="countSize">
140 <xsl:choose>
141 <xsl:when test="/page/pageResponse/format[@type='search']/gsf:option[@name='facetTableRows']">
142 <xsl:value-of select="/page/pageResponse/format[@type='search']/gsf:option[@name='facetTableRows']/@value"/>
143 </xsl:when>
144 <xsl:otherwise>8</xsl:otherwise>
145 </xsl:choose>
146 </xsl:variable>
147
148 <li class="ui-widget-header" style="text-transform:capitalize; text-align:center;">
149 <xsl:value-of select="displayItem[@name='name']"/>
150 </li>
151 <xsl:for-each select="count">
152 <li>
153 <xsl:attribute name="style">
154 <xsl:if test="position() > $countSize">display:none;<xsl:value-of select="$indexShortName"/>
155 </xsl:if>
156 </xsl:attribute>
157 <input type="checkbox" onclick="performRefinedSearch();"/>
158 <span>
159 <xsl:value-of select="@name"/>
160 </span>(<xsl:value-of select="."/>)
161 </li>
162 </xsl:for-each>
163 <xsl:if test="count(count) > $countSize">
164 <li class="expandFacetList{$indexShortName}">
165 <a class="expandFacetListLink{$indexShortName}" href="javascript:expandFacetList('{$indexShortName}', {$countSize});"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.facet.more')"/></a>
166 </li>
167 <li class="collapseFacetList{$indexShortName}" style="display: none;">
168 <a class="collapseFacetListLink{$indexShortName}" href="javascript:collapseFacetList('{$indexShortName}', {$countSize});"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.facet.less')"/></a>
169 </li>
170 </xsl:if>
171 </ul>
172 </xsl:if>
173 </xsl:for-each>
174 </div>
175
176 </xsl:template>
177
178
179
180</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.