1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
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 | <xsl:include href="../shared-templates.xsl"/>
|
---|
12 | <xsl:include href="../javascript-global-setup.xsl"/>
|
---|
13 |
|
---|
14 | <xsl:param name="cookie_consent"/>
|
---|
15 |
|
---|
16 | <!-- If the c parameter is empty then use the p.c parameter for the collection name-->
|
---|
17 | <xsl:variable name="collNameChecked">
|
---|
18 | <xsl:choose>
|
---|
19 | <xsl:when test="$collName = '' and /page/pageRequest/paramList/param[@name='p.c']/@value">
|
---|
20 | <xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/>
|
---|
21 | </xsl:when>
|
---|
22 | <xsl:otherwise>
|
---|
23 | <xsl:value-of select="$collName"/>
|
---|
24 | </xsl:otherwise>
|
---|
25 | </xsl:choose>
|
---|
26 | </xsl:variable>
|
---|
27 |
|
---|
28 | <!-- does this collection have editing allowed? it's turned on by default, can turn off in config file-->
|
---|
29 | <xsl:variable name="isEditingAllowed">
|
---|
30 | <xsl:if test="not(/page/pageResponse/format[@type='display']/gsf:option[@name='allowDocumentEditing']) or /page/pageResponse/format[@type='display']/gsf:option[@name='allowDocumentEditing']/@value='true'">1</xsl:if>
|
---|
31 | </xsl:variable>
|
---|
32 | <!-- is editing available for the collection? eg is there an archives folder? -->
|
---|
33 | <xsl:variable name="isEditingAvailable">
|
---|
34 | <xsl:choose><xsl:when test="/page/pageResponse/collection/@no_archives">0</xsl:when><xsl:otherwise>1</xsl:otherwise></xsl:choose>
|
---|
35 | </xsl:variable>
|
---|
36 | <xsl:variable name="isMapGPSEditingAllowed">
|
---|
37 | <xsl:choose><xsl:when test="not(/page/pageResponse/format[@type='display']/gsf:option[@name='allowMapGPSEditing']) or /page/pageResponse/format[@type='display']/gsf:option[@name='allowMapGPSEditing']/@value='true'">1</xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose>
|
---|
38 | </xsl:variable>
|
---|
39 |
|
---|
40 | <!-- is a user logged in, and do they have editing rights for this collection? -->
|
---|
41 | <xsl:variable name="userHasEditPermission">
|
---|
42 | <xsl:if test="/page/pageRequest/userInformation and (util:csvContains(/page/pageRequest/userInformation/@groups, 'administrator') or util:csvContains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:csvContains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor))">1</xsl:if>
|
---|
43 | </xsl:variable>
|
---|
44 | <xsl:variable name="siteAdmin">
|
---|
45 | <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name = 'siteAdmin']"/>
|
---|
46 | </xsl:variable>
|
---|
47 | <!-- Creates a header for the html page -->
|
---|
48 | <xsl:template name="create-html-header">
|
---|
49 | <base>
|
---|
50 | <xsl:attribute name="href">
|
---|
51 | <xsl:choose>
|
---|
52 | <xsl:when test="$servlet_url_prefix">
|
---|
53 | <xsl:value-of select="$servlet_url_prefix"/>
|
---|
54 | </xsl:when>
|
---|
55 | <!-- don't need this one anymore, keep for backwards compat-->
|
---|
56 | <xsl:when test="/page/pageResponse/metadataList/metadata[@name = 'siteURL']">
|
---|
57 | <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name = 'siteURL']"/>
|
---|
58 | </xsl:when>
|
---|
59 | <xsl:when test="/page/pageRequest/@baseURL">
|
---|
60 | <xsl:value-of select="/page/pageRequest/@baseURL"/>
|
---|
61 | </xsl:when>
|
---|
62 | </xsl:choose>
|
---|
63 | </xsl:attribute>
|
---|
64 | </base>
|
---|
65 | <xsl:comment>[if lte IE 6]></base><![endif]</xsl:comment>
|
---|
66 |
|
---|
67 | <xsl:variable name="page"><xsl:call-template name="pageTitle"/></xsl:variable>
|
---|
68 | <xsl:variable name="collection"><xsl:call-template name="collectionName"/></xsl:variable>
|
---|
69 | <xsl:variable name="site"><xsl:call-template name="siteName"/></xsl:variable>
|
---|
70 |
|
---|
71 | <title><xsl:value-of select="$page"/><xsl:if test="$collection != '' and $page != $collection"> :: <xsl:value-of select="$collection"/></xsl:if><xsl:if test="$page != $site"> :: <xsl:value-of select="$site"/></xsl:if></title>
|
---|
72 |
|
---|
73 | <xsl:if test="/page/pageRequest/@action ='d'">
|
---|
74 |
|
---|
75 | <xsl:variable name="myMetadataHeader" select="/page/pageResponse/format/gsf:headMetaTags/gsf:metadata"/>
|
---|
76 | <xsl:for-each select="$myMetadataHeader">
|
---|
77 | <xsl:variable name="metaname" select="@name"/>
|
---|
78 |
|
---|
79 | <xsl:variable name="metavals"
|
---|
80 | select="/page/pageResponse/document/metadataList/metadata[@name = $metaname]|/page/pageResponse/document/documentNode/metadataList/metadata[@name = $metaname]"/>
|
---|
81 | <xsl:for-each select="$metavals">
|
---|
82 | <META NAME="{$metaname}" CONTENT="{.}"/>
|
---|
83 | </xsl:for-each>
|
---|
84 | </xsl:for-each>
|
---|
85 |
|
---|
86 | </xsl:if>
|
---|
87 |
|
---|
88 | <!-- <xsl:call-template name="addGoogleTracking"/>-->
|
---|
89 |
|
---|
90 | <script>
|
---|
91 | <xsl:text disable-output-escaping="yes">
|
---|
92 | // Too soon to use gsf:variable, as 'gs' not yet defined, so roll-our-own JS variable
|
---|
93 | var googlesignin_client_id = '</xsl:text><xsl:value-of select="$googlesignin_client_id"/><xsl:text disable-output-escaping="yes">';
|
---|
94 | </xsl:text>
|
---|
95 | </script>
|
---|
96 |
|
---|
97 | <xsl:if test="$googlesignin_client_id != ''">
|
---|
98 | <xsl:call-template name="addGoogleSignOn"/>
|
---|
99 | </xsl:if>
|
---|
100 |
|
---|
101 | <script>
|
---|
102 | <xsl:text disable-output-escaping="yes">
|
---|
103 | function gslogout(logout_action_url) {
|
---|
104 | if (googlesignin_client_id != '') {
|
---|
105 | googleLogout();
|
---|
106 | }
|
---|
107 | window.location = logout_action_url;
|
---|
108 | }
|
---|
109 | </xsl:text>
|
---|
110 | </script>
|
---|
111 |
|
---|
112 | <link rel="stylesheet" href="interfaces/{$interface_name}/style/themes/main/jquery-ui.theme.css" type="text/css"/>
|
---|
113 | <link rel="stylesheet" href="interfaces/{$interface_name}/style/themes/main/jquery-ui.structure.min.css" type="text/css"/>
|
---|
114 | <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/>
|
---|
115 | <!-- Get the theme from the interfaceConfig.xml file -->
|
---|
116 | <xsl:choose>
|
---|
117 | <xsl:when test="/page/pageResponse/interfaceOptions/option[@name = 'cssTheme']/@value">
|
---|
118 | <link rel="stylesheet" href="{/page/pageResponse/interfaceOptions/option[@name = 'cssTheme']/@value}" type="text/css"/>
|
---|
119 | </xsl:when>
|
---|
120 | </xsl:choose>
|
---|
121 | <xsl:call-template name="favicon"/>
|
---|
122 |
|
---|
123 | <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery-3.6.0.min.js"><xsl:text> </xsl:text></script>
|
---|
124 | <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery-ui-1.13.0.custom/jquery-ui.min.js"><xsl:text> </xsl:text></script>
|
---|
125 | <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.blockUI.js"><xsl:text> </xsl:text></script>
|
---|
126 | <script type="text/javascript" src="interfaces/{$interface_name}/js/ace/ace.js"><xsl:text> </xsl:text></script>
|
---|
127 |
|
---|
128 | <!-- Cookie Consent Manager -->
|
---|
129 | <xsl:choose>
|
---|
130 | <xsl:when test="$cookie_consent">
|
---|
131 | <link rel="stylesheet" href="interfaces/{$interface_name}/style/cookieconsent.css" type="text/css"/>
|
---|
132 | <gslib:langfrag name="ccm" />
|
---|
133 | <script defer="true" type="text/javascript" src="interfaces/{$interface_name}/js/cookieconsent.js"><xsl:text> </xsl:text></script>
|
---|
134 | <script defer="true" type="text/javascript" src="interfaces/{$interface_name}/js/cookieconsent-init.js"><xsl:text> </xsl:text></script>
|
---|
135 | </xsl:when>
|
---|
136 | </xsl:choose>
|
---|
137 |
|
---|
138 | <script type="text/javascript" src="interfaces/{$interface_name}/js/zoomer.js"><xsl:text> </xsl:text></script>
|
---|
139 |
|
---|
140 | <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'">
|
---|
141 | <xsl:call-template name="map-scripts"/>
|
---|
142 | </xsl:if>
|
---|
143 |
|
---|
144 | <xsl:if test="/page/pageResponse/format/gsf:option[@name='mapEnabledOpenLayers']/@value = 'true'">
|
---|
145 | <xsl:call-template name="openlayers-map-scripts"/>
|
---|
146 | </xsl:if>
|
---|
147 |
|
---|
148 |
|
---|
149 | <xsl:if test="/page/pageResponse/format/gsf:option[@name='panoramaViewerEnabled']/@value = 'true'">
|
---|
150 | <xsl:call-template name="panoramaViewer-scripts"/>
|
---|
151 | </xsl:if>
|
---|
152 |
|
---|
153 | <xsl:if test="/page/pageRequest/userInformation and /page/pageRequest/userInformation/@editEnabled = 'true' 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))">
|
---|
154 | <xsl:if test="/page/pageRequest/paramList/param[(@name='docEdit') and (@value='on' or @value='true' or @value='1')]">
|
---|
155 |
|
---|
156 |
|
---|
157 | <script type="text/javascript" src="interfaces/{$interface_name}/js/ckeditor/ckeditor.js" defer="true"><xsl:text> </xsl:text></script>
|
---|
158 | <!-- <xsl:call-template name="init-direct-edit"/> -->
|
---|
159 |
|
---|
160 | <xsl:variable name="mapEnabled"><xsl:value-of select="/page/pageResponse/format[@type='display']/gsf:option[@name='mapEnabled']/@value"/></xsl:variable>
|
---|
161 | <xsl:if test="$mapEnabled = 'false' or $mapEnabled = ''">
|
---|
162 | <xsl:call-template name="map-scripts"/>
|
---|
163 | </xsl:if>
|
---|
164 |
|
---|
165 | </xsl:if>
|
---|
166 | <script type="text/javascript" src="interfaces/{$interface_name}/js/debug_scripts.js"><xsl:text> </xsl:text></script>
|
---|
167 | <script type="text/javascript" src="interfaces/{$interface_name}/js/visual-xml-editor.js"><xsl:text> </xsl:text></script>
|
---|
168 | </xsl:if>
|
---|
169 |
|
---|
170 | <xsl:call-template name="setup-gs-variable"/>
|
---|
171 | <xsl:if test="/page/pageRequest/@action ='p' and /page/pageRequest/@subaction='pref'">
|
---|
172 | <gslib:langfrag name="pref" />
|
---|
173 | <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.themeswitcher.min.js"><xsl:text> </xsl:text></script>
|
---|
174 | </xsl:if>
|
---|
175 | <xsl:call-template name="define-js-macro-variables"/>
|
---|
176 |
|
---|
177 | <xsl:call-template name="additionalHeaderContent"/>
|
---|
178 | </xsl:template>
|
---|
179 |
|
---|
180 | <xsl:template name="addGoogleTracking">
|
---|
181 | <xsl:variable name="trackid">UA-xxx-1</xsl:variable> <!-- TODO: this no longer seems to be used, now google_tracking_id passed in, and so can be deleted -->
|
---|
182 | <!-- Global site tag (gtag.js) - Google Analytics -->
|
---|
183 | <script async="async" src="https://www.googletagmanager.com/gtag/js?id={$google_tracking_id}"><xsl:text> </xsl:text></script>
|
---|
184 | <script>
|
---|
185 | <xsl:text disable-output-escaping="yes">
|
---|
186 | window.dataLayer = window.dataLayer || [];
|
---|
187 | function gtag(){dataLayer.push(arguments);}
|
---|
188 | gtag('js', new Date());
|
---|
189 |
|
---|
190 | gtag('config', '</xsl:text><xsl:value-of select="$google_tracking_id"/><xsl:text disable-output-escaping="yes">');</xsl:text>
|
---|
191 | </script>
|
---|
192 | </xsl:template>
|
---|
193 |
|
---|
194 | <xsl:template name="addGoogleSignOn">
|
---|
195 | <meta name="google-signin-client_id" content="{$googlesignin_client_id}" />
|
---|
196 |
|
---|
197 | <script>
|
---|
198 | <xsl:text disable-output-escaping="yes">
|
---|
199 |
|
---|
200 | function googleSigninInit() {
|
---|
201 | gapi.load('auth2', function() {
|
---|
202 | var auth2 = gapi.auth2.init({
|
---|
203 | client_id: googlesignin_client_id,
|
---|
204 | //scope: 'email' // don't need to top up 'profile' with 'email' as not used client side (email is retrieved via GS3 Servlet)
|
---|
205 | })
|
---|
206 | .then(function() {
|
---|
207 | if (typeof optGoogleAuth2InitCallback === "function"){
|
---|
208 | optGoogleAuth2InitCallback();
|
---|
209 | }
|
---|
210 | });
|
---|
211 | });
|
---|
212 | }
|
---|
213 |
|
---|
214 | function googleLogout() {
|
---|
215 | var auth2 = gapi.auth2.getAuthInstance();
|
---|
216 | // Use 'disconnect()' rather than 'signOut()' as this does a deeper logout
|
---|
217 | // that revokes the user's "Google granted" permission.
|
---|
218 | // This makes it easier, when using the same browser, to login into Greenstone3
|
---|
219 | // using a differeng Google sign-in account
|
---|
220 |
|
---|
221 | auth2.disconnect().then(function () {
|
---|
222 | console.log("Google-authenticated User signed out");
|
---|
223 | });
|
---|
224 | return false;
|
---|
225 | }
|
---|
226 | </xsl:text>
|
---|
227 | </script>
|
---|
228 | <script src="https://apis.google.com/js/platform.js?onload=googleSigninInit" async="async" defer="defer" ><xsl:text> </xsl:text></script>
|
---|
229 |
|
---|
230 | </xsl:template>
|
---|
231 |
|
---|
232 | <xsl:template name="favicon">
|
---|
233 | <link rel="shortcut icon" href="interfaces/{$interface_name}/images/favicon.ico"/>
|
---|
234 | </xsl:template>
|
---|
235 |
|
---|
236 | <!-- This template allows for extra header content to be added by page, interface, site and collection. -->
|
---|
237 | <xsl:template name="additionalHeaderContent">
|
---|
238 | <xsl:call-template name="additionalHeaderContent-page"/>
|
---|
239 | <xsl:call-template name="additionalHeaderContent-interface"/>
|
---|
240 | <xsl:call-template name="additionalHeaderContent-site"/>
|
---|
241 | <xsl:call-template name="additionalHeaderContent-collection"/>
|
---|
242 | </xsl:template>
|
---|
243 |
|
---|
244 | <!-- This template should be overridden in a page xsl file to add extra header content just to that page -->
|
---|
245 | <xsl:template name="additionalHeaderContent-page">
|
---|
246 | </xsl:template>
|
---|
247 |
|
---|
248 | <!-- This template should be overridden in header.xsl of a new interface file if you want to add extra header content -->
|
---|
249 | <xsl:template name="additionalHeaderContent-interface">
|
---|
250 | </xsl:template>
|
---|
251 | <!-- This template should be overridden in the header.xsl file in a site's transform directory if you want to add site specific headers -->
|
---|
252 | <xsl:template name="additionalHeaderContent-site">
|
---|
253 | </xsl:template>
|
---|
254 | <!-- This template should be overridden in the collectionConfig.xml file if you want to add extra header content -->
|
---|
255 | <xsl:template name="additionalHeaderContent-collection">
|
---|
256 | </xsl:template>
|
---|
257 |
|
---|
258 | <xsl:template name="init-direct-edit">
|
---|
259 | <!-- might be worth moving loading the JS file to earlier, to give time to load -->
|
---|
260 | <script type="text/javascript" src="interfaces/{$interface_name}/js/direct-edit.js"><xsl:text> </xsl:text></script>
|
---|
261 | <script type="text/javascript">
|
---|
262 | <xsl:text disable-output-escaping="yes">
|
---|
263 | $(document).ready(function() {
|
---|
264 | de.onready(function()
|
---|
265 | {
|
---|
266 | try
|
---|
267 | {
|
---|
268 | de.init();
|
---|
269 | }
|
---|
270 | catch (err)
|
---|
271 | {
|
---|
272 | alert("Seaweed failed to initialise: " + err.message);
|
---|
273 | }
|
---|
274 | });
|
---|
275 | });
|
---|
276 | </xsl:text>
|
---|
277 | </script>
|
---|
278 | </xsl:template>
|
---|
279 |
|
---|
280 |
|
---|
281 | <!-- ***** HEADER LAYOUT TEMPLATE ***** -->
|
---|
282 | <xsl:template name="create-banner">
|
---|
283 | <div id="gs_banner" class="ui-widget-header ui-corner-bottom">
|
---|
284 | <div id="titlesearchcontainer">
|
---|
285 | <xsl:call-template name="page-title-area"/>
|
---|
286 | <xsl:call-template name="quick-search-area"/>
|
---|
287 | <div style="clear:both;"><xsl:text> </xsl:text></div>
|
---|
288 | </div>
|
---|
289 | <xsl:call-template name="browsing-tabs"/>
|
---|
290 | </div>
|
---|
291 | </xsl:template>
|
---|
292 |
|
---|
293 | <xsl:template name="additionalNavTabs">
|
---|
294 | <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/extraInfo/navigationTab">
|
---|
295 | <li>
|
---|
296 | <xsl:choose>
|
---|
297 | <!-- if we are in frame type and this is the current page, colour it differently-->
|
---|
298 | <xsl:when test="@type='frame' and /page/pageRequest[@subaction='html'] and /page/pageRequest/paramList/param[@name='url']/@value = @url">
|
---|
299 | <xsl:attribute name='class'>ui-state-default ui-corner-top ui-tabs-selected ui-state-active</xsl:attribute>
|
---|
300 | </xsl:when>
|
---|
301 | <xsl:otherwise>
|
---|
302 | <xsl:attribute name="class">ui-state-default ui-corner-top</xsl:attribute>
|
---|
303 | </xsl:otherwise>
|
---|
304 | </xsl:choose>
|
---|
305 | <a>
|
---|
306 | <xsl:if test="displayItem[@name='description']">
|
---|
307 | <xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute>
|
---|
308 | </xsl:if>
|
---|
309 | <xsl:choose>
|
---|
310 | <xsl:when test="@type='external-link'">
|
---|
311 | <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
|
---|
312 | </xsl:when>
|
---|
313 | <xsl:when test="@type='frame'">
|
---|
314 | <xsl:attribute name="href"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/@name"/>/page/html?url=<xsl:value-of select="@url"/></xsl:attribute>
|
---|
315 | </xsl:when>
|
---|
316 | </xsl:choose>
|
---|
317 | <xsl:choose>
|
---|
318 | <xsl:when test="displayItem[@name='name']">
|
---|
319 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
320 | </xsl:when>
|
---|
321 | <xsl:otherwise>link</xsl:otherwise>
|
---|
322 | </xsl:choose>
|
---|
323 | </a>
|
---|
324 | </li>
|
---|
325 | </xsl:for-each>
|
---|
326 |
|
---|
327 | </xsl:template>
|
---|
328 | <!-- ***** BROWSING TABS ***** -->
|
---|
329 | <xsl:template name="browsing-tabs">
|
---|
330 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service or /page/pageResponse/collection[@name=$collNameChecked]/extraInfo/navigationTab">
|
---|
331 | <ul id="gs-nav">
|
---|
332 | <!-- if this collection has additional tabs, add them here -->
|
---|
333 | <xsl:call-template name="additionalNavTabs"/>
|
---|
334 | <!-- If this collection has a ClassifierBrowse service then add a tab for each classifier-->
|
---|
335 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='browse' and @name='ClassifierBrowse']">
|
---|
336 | <!-- Loop through each classifier -->
|
---|
337 | <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='ClassifierBrowse']/classifierList/classifier">
|
---|
338 | <li>
|
---|
339 | <xsl:choose>
|
---|
340 | <!-- If this tab is selected then colour it differently -->
|
---|
341 | <xsl:when test="util:contains(/page/pageRequest/paramList/param[@name = 'cl' and /page/pageRequest/@action = 'b']/@value, @name)">
|
---|
342 | <xsl:attribute name='class'>ui-state-default ui-corner-top ui-tabs-selected ui-state-active</xsl:attribute>
|
---|
343 | </xsl:when>
|
---|
344 | <xsl:otherwise>
|
---|
345 | <xsl:attribute name='class'>ui-state-default ui-corner-top</xsl:attribute>
|
---|
346 | </xsl:otherwise>
|
---|
347 | </xsl:choose>
|
---|
348 |
|
---|
349 | <a>
|
---|
350 | <!-- Add a title element to the <a> tag if a description exists for this classifier -->
|
---|
351 | <xsl:if test="displayItem[@name='description']">
|
---|
352 | <xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute>
|
---|
353 | </xsl:if>
|
---|
354 |
|
---|
355 | <!-- Add the href element to the <a> tag -->
|
---|
356 | <xsl:choose>
|
---|
357 | <xsl:when test="@name">
|
---|
358 | <xsl:attribute name="href"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/@name"/>/browse/<xsl:value-of select="@name"/></xsl:attribute>
|
---|
359 | </xsl:when>
|
---|
360 | <xsl:otherwise>
|
---|
361 | <xsl:attribute name="href"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/@name"/>/browse/1</xsl:attribute>
|
---|
362 | </xsl:otherwise>
|
---|
363 | </xsl:choose>
|
---|
364 |
|
---|
365 | <!-- Add the actual text of the <a> tag -->
|
---|
366 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
367 | </a>
|
---|
368 | </li>
|
---|
369 | </xsl:for-each>
|
---|
370 | </xsl:if>
|
---|
371 |
|
---|
372 | <!-- PhindApplet. Need something similar for the Collage applet too, probably -->
|
---|
373 | <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='PhindApplet']">
|
---|
374 | <li>
|
---|
375 | <xsl:choose>
|
---|
376 | <!-- If this tab is selected then colour it differently -->
|
---|
377 | <xsl:when test="/page/pageRequest[@action='a']">
|
---|
378 | <xsl:attribute name='class'>ui-state-default ui-corner-top ui-tabs-selected ui-state-active</xsl:attribute>
|
---|
379 | </xsl:when>
|
---|
380 | <xsl:otherwise>
|
---|
381 | <xsl:attribute name='class'>ui-state-default ui-corner-top</xsl:attribute>
|
---|
382 | </xsl:otherwise>
|
---|
383 | </xsl:choose>
|
---|
384 |
|
---|
385 | <a>
|
---|
386 | <xsl:if test="displayItem[@name='description']">
|
---|
387 | <xsl:attribute name="title">
|
---|
388 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
389 | </xsl:attribute>
|
---|
390 | </xsl:if>
|
---|
391 | <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=a&rt=d&s=<xsl:value-of select="@name"/>&c=<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:attribute>
|
---|
392 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
393 | </a>
|
---|
394 | </li>
|
---|
395 | </xsl:for-each>
|
---|
396 |
|
---|
397 | <!-- all other services -->
|
---|
398 | <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[not(@type='query') and not(@type='browse') and not (@name='PhindApplet')]">
|
---|
399 | <xsl:call-template name="navigationTab"/>
|
---|
400 | </xsl:for-each>
|
---|
401 | </ul>
|
---|
402 | <div style="clear:both;"><xsl:text> </xsl:text></div>
|
---|
403 | </xsl:if>
|
---|
404 | </xsl:template>
|
---|
405 |
|
---|
406 | <!-- ***** HOME HELP PREFERENCES LOGIN ***** -->
|
---|
407 | <xsl:template name="home-help-preferences">
|
---|
408 | <ul id="bannerLinks">
|
---|
409 | <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search' or not(@type)]/gsf:option[@name='RSS']/@value = 'true'">
|
---|
410 | <li><xsl:call-template name="RSSLink"/></li>
|
---|
411 | </xsl:if>
|
---|
412 | <li><xsl:call-template name="PrefsLink"/></li>
|
---|
413 | <li><xsl:call-template name="HelpLink"/></li>
|
---|
414 | <li id="userMenuButton"><xsl:call-template name="LoginoutLink"/></li>
|
---|
415 | <xsl:if test="/page/pageRequest/paramList/param[(@name='debug') and (@value='on' or @value='true' or @value='1' or @value='yes')]">
|
---|
416 | <li><xsl:call-template name="DebugLink"/></li>
|
---|
417 | </xsl:if>
|
---|
418 | <xsl:call-template name="buttonStyling"/>
|
---|
419 | </ul>
|
---|
420 | </xsl:template>
|
---|
421 |
|
---|
422 | <xsl:template name="RSSLink">
|
---|
423 | <!-- RSS feed link can appear in a global format statement (where it has no type attribute)
|
---|
424 | or in section specific format statements, such as browse, search, display.
|
---|
425 | If it's present in any format statement, display the RSS link in the bannerlinks section. -->
|
---|
426 | <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search' or not(@type)]/gsf:option[@name='RSS']/@value = 'true'">
|
---|
427 | <gsf:link type="rss"><gsf:icon file="rssicon.png"/></gsf:link>
|
---|
428 | </xsl:if>
|
---|
429 | </xsl:template>
|
---|
430 |
|
---|
431 | <xsl:template name="PrefsLink">
|
---|
432 | <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>/<xsl:if test="not($collNameChecked = '')">collection/<xsl:value-of select="$collNameChecked"/>/</xsl:if>page/pref</xsl:attribute>
|
---|
433 | <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
|
---|
434 | <span id="preferencesButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></span>
|
---|
435 | </a>
|
---|
436 | </xsl:template>
|
---|
437 |
|
---|
438 | <xsl:template name="HelpLink">
|
---|
439 | <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>/<xsl:if test="not($collNameChecked = '')">collection/<xsl:value-of select="$collNameChecked"/>/</xsl:if>page/help</xsl:attribute>
|
---|
440 | <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
|
---|
441 | <span id="helpButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></span>
|
---|
442 | </a>
|
---|
443 | </xsl:template>
|
---|
444 |
|
---|
445 | <xsl:template name="toggleUserMenuScript">
|
---|
446 |
|
---|
447 | <script type="text/javascript">
|
---|
448 | <xsl:text disable-output-escaping="yes">
|
---|
449 | function toggleUserMenu()
|
---|
450 | {
|
---|
451 | var button = $("#userMenuButton");
|
---|
452 | var menu;
|
---|
453 |
|
---|
454 | if(button.data("userMenu"))
|
---|
455 | {
|
---|
456 | menu = button.data("userMenu");
|
---|
457 | if(menu.css("display") == "block")
|
---|
458 | {
|
---|
459 | menu.hide();
|
---|
460 | }
|
---|
461 | else
|
---|
462 | {
|
---|
463 | menu.show();
|
---|
464 | }
|
---|
465 | }
|
---|
466 | else
|
---|
467 | {
|
---|
468 | menu = $("<UL>")
|
---|
469 | .css("position", "absolute")
|
---|
470 | .css("display", "block")
|
---|
471 | .css("z-index", "100")
|
---|
472 | .css("list-style", "none outside none")
|
---|
473 | .css("margin", "0px")
|
---|
474 | .css("padding", "0px")
|
---|
475 | .css("font-size", "90%");
|
---|
476 |
|
---|
477 | menu.attr("id", "userMenu");
|
---|
478 |
|
---|
479 | button.data("userMenu", menu);
|
---|
480 |
|
---|
481 | // get the base url
|
---|
482 | var url = document.URL;
|
---|
483 | var hasQueryString = (url.indexOf("?") != -1);
|
---|
484 | var hashIndex = url.indexOf("#");
|
---|
485 |
|
---|
486 | var hashPart;
|
---|
487 | if(hashIndex != -1)
|
---|
488 | {
|
---|
489 | hashPart = url.substring(hashIndex);
|
---|
490 | url = url.substring(0, hashIndex);
|
---|
491 | }
|
---|
492 |
|
---|
493 | var settingsLink = $("<a>")
|
---|
494 | .attr("href", gs.xsltParams.library_name + "/admin/AccountSettings?s1.username=</xsl:text><xsl:value-of select="/page/pageRequest/userInformation/@username"/><xsl:text disable-output-escaping="yes">");
|
---|
495 | var settingsButton = $("<LI>")
|
---|
496 | .css("padding", "3px")
|
---|
497 | .html("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'menu.account_settings')"/><xsl:text disable-output-escaping="yes">")
|
---|
498 | .addClass("ui-state-default");
|
---|
499 | settingsLink.append(settingsButton);
|
---|
500 | menu.append(settingsLink);
|
---|
501 |
|
---|
502 | </xsl:text><xsl:if test="/page/pageRequest/@action = 'd' and $isEditingAllowed = '1'"><xsl:text disable-output-escaping="yes">
|
---|
503 | var editingLink = $("<a>")
|
---|
504 | .attr("href", "javascript:;");
|
---|
505 | var editingButton = $("<LI>")
|
---|
506 | .addClass("ui-state-default")
|
---|
507 | .css("padding", "3px")</xsl:text>
|
---|
508 | <xsl:choose>
|
---|
509 | <xsl:when test="$isEditingAvailable = '1' and $userHasEditPermission = '1'"><xsl:text disable-output-escaping="yes">
|
---|
510 | .html((gs.userInformation.editEnabled == "true") ? "</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'menu.disable_edit_mode')"/><xsl:text disable-output-escaping="yes">" : "</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'menu.enable_edit_mode')"/><xsl:text disable-output-escaping="yes">")
|
---|
511 | .on("click", function()
|
---|
512 | {
|
---|
513 | var c_url = gs.xsltParams.library_name + "?a=g&rt=ro&s=ChangeUserEditMode&s1.username=" + gs.userInformation.username + "&s1.enabled=" + ((gs.userInformation.editEnabled == "true") ? "false" : "true");
|
---|
514 | $.ajax(c_url)
|
---|
515 | .done(function(response)
|
---|
516 | {
|
---|
517 | //location.reload(true); // need to set docEdit=0 if we have just disabled editing
|
---|
518 | location.href= url + (hasQueryString ? "&" : "?") + ((gs.userInformation.editEnabled == "true") ? "docEdit=0&ed=0":"") + (hashPart ? hashPart : "");
|
---|
519 | });
|
---|
520 | });
|
---|
521 | </xsl:text></xsl:when><xsl:otherwise><xsl:variable name="reason"><xsl:choose><xsl:when test="$isEditingAvailable != '1'"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'de.error_unavailable')"/></xsl:when><xsl:when test="$userHasEditPermission != '1'"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'de.error_wrong_group')"/></xsl:when></xsl:choose><xsl:text> </xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'de.error_contact_admin', $siteAdmin)"/></xsl:variable><xsl:text disable-output-escaping="yes">
|
---|
522 | .html("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'de.error')"/><xsl:text disable-output-escaping='yes'>")
|
---|
523 | .on("click", function()
|
---|
524 | {
|
---|
525 | alert("</xsl:text><xsl:value-of select="$reason"/><xsl:text disable-output-escaping='yes'>");
|
---|
526 | menu.hide();
|
---|
527 | });
|
---|
528 | </xsl:text>
|
---|
529 | </xsl:otherwise></xsl:choose><xsl:text disable-output-escaping="yes">
|
---|
530 | editingLink.append(editingButton);
|
---|
531 | menu.append(editingLink);
|
---|
532 | </xsl:text></xsl:if><xsl:text disable-output-escaping="yes">
|
---|
533 |
|
---|
534 | var logout_url_action = url + (hasQueryString ? "&" : "?") + "logout=" + (hashPart ? hashPart : "");
|
---|
535 | var logout_javascript_call = "javascript:gslogout('"+logout_url_action+"')";
|
---|
536 |
|
---|
537 | var logoutLink = $("<a>")
|
---|
538 | .attr("href", logout_javascript_call);
|
---|
539 |
|
---|
540 | var logoutButton = $("<LI>")
|
---|
541 | .css("padding", "3px")
|
---|
542 | .html("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'menu.logout')"/><xsl:text disable-output-escaping="yes">")
|
---|
543 | .addClass("ui-state-default");
|
---|
544 | logoutLink.append(logoutButton);
|
---|
545 | menu.append(logoutLink);
|
---|
546 |
|
---|
547 | var buttonLeft = button.offset().left;
|
---|
548 | var buttonTop = button.offset().top;
|
---|
549 |
|
---|
550 | var buttonHeight = button.height();
|
---|
551 |
|
---|
552 | menu.offset({top: buttonTop + buttonHeight + 4, left: buttonLeft});
|
---|
553 | $("#topArea").append(menu);
|
---|
554 | }
|
---|
555 | }
|
---|
556 | </xsl:text>
|
---|
557 | </script>
|
---|
558 |
|
---|
559 | </xsl:template>
|
---|
560 |
|
---|
561 | <xsl:template name="generateLoginURL">
|
---|
562 | <xsl:value-of select="$library_name"/>
|
---|
563 | <xsl:text>?a=p&sa=login&redirectURL=</xsl:text>
|
---|
564 | <xsl:value-of select="$library_name"/>
|
---|
565 | <xsl:text>%3F</xsl:text>
|
---|
566 | <xsl:if test="/page/pageRequest/@action">
|
---|
567 | <xsl:text>a=</xsl:text>
|
---|
568 | <xsl:value-of select="/page/pageRequest/@action"/>
|
---|
569 | </xsl:if>
|
---|
570 | <xsl:if test="/page/pageRequest/@subaction">
|
---|
571 | <xsl:text>%26sa=</xsl:text>
|
---|
572 | <xsl:value-of select="/page/pageRequest/@subaction"/>
|
---|
573 | </xsl:if>
|
---|
574 | <xsl:for-each select="/page/pageRequest/paramList/param">
|
---|
575 | <xsl:if test="@name != 'password' and @name != 's1.password' and @name != 's1.newPassword' and @name != 's1.oldPassword'">
|
---|
576 | <xsl:text>%26</xsl:text>
|
---|
577 | <xsl:value-of select="@name"/>
|
---|
578 | <xsl:text>=</xsl:text>
|
---|
579 | <xsl:value-of select="@value"/>
|
---|
580 | </xsl:if>
|
---|
581 | </xsl:for-each>
|
---|
582 |
|
---|
583 | </xsl:template>
|
---|
584 |
|
---|
585 | <!-- Writing the reverse of generateLoginURL since the toggleUserMenuScript does a lot more than I want. -->
|
---|
586 | <!-- https://www.w3schools.com/xml/xsl_functions.asp#string -->
|
---|
587 | <xsl:template name="generateLogoutURL">
|
---|
588 |
|
---|
589 | <xsl:variable name="url" select="/page/pageRequest/@fullURL"/>
|
---|
590 | <xsl:variable name="beforeLogout" select="substring-before($url, '&amp;logout=')"/>
|
---|
591 | <xsl:variable name="tmpAfter" select="substring-after($url, '&amp;logout=')"/>
|
---|
592 | <xsl:variable name="afterLogout" select="substring-after($tmpAfter, '&amp;')"/>
|
---|
593 | <xsl:variable name="beforeHash" select="substring-before($url, '#')"/>
|
---|
594 | <xsl:variable name="afterHash" select="substring-after($url, '#')"/>
|
---|
595 | <!-- Get rid of any lingering &logout= already in the URL.
|
---|
596 | But retain anything before and after it (the after portion would start with &).
|
---|
597 | Can't use fn:replace() as it's only been defined since XSLT 2.0. We use XSLT 1.x -->
|
---|
598 | <xsl:variable name="fullURL">
|
---|
599 | <xsl:choose>
|
---|
600 | <xsl:when test="$beforeLogout != ''"><xsl:value-of select="$beforeLogout" /></xsl:when>
|
---|
601 | <xsl:otherwise><xsl:value-of select="$url" /></xsl:otherwise>
|
---|
602 | </xsl:choose>
|
---|
603 | <xsl:if test="$afterLogout != ''">&<xsl:value-of select="$afterLogout" /></xsl:if>
|
---|
604 | </xsl:variable>
|
---|
605 |
|
---|
606 | <!-- Output the logout link: the current page's URL (with any lingering logout suffix removed)
|
---|
607 | followed by ?logout= or &logout= followed by any # portion of the current page's URL -->
|
---|
608 | <xsl:choose>
|
---|
609 | <xsl:when test="$beforeHash != ''"><xsl:value-of select="$beforeHash" /></xsl:when>
|
---|
610 | <xsl:otherwise><xsl:value-of select="$fullURL" /></xsl:otherwise>
|
---|
611 | </xsl:choose>
|
---|
612 | <xsl:choose>
|
---|
613 | <xsl:when test="contains($fullURL, '?')"><xsl:text>&logout=</xsl:text></xsl:when>
|
---|
614 | <xsl:otherwise>?logout=</xsl:otherwise>
|
---|
615 | </xsl:choose>
|
---|
616 | <xsl:if test="$afterHash != ''">#<xsl:value-of select="$afterHash" /></xsl:if>
|
---|
617 | </xsl:template>
|
---|
618 |
|
---|
619 | <xsl:template name="LoginoutLink">
|
---|
620 | <!-- login/logout -->
|
---|
621 | <xsl:choose>
|
---|
622 | <xsl:when test="/page/pageRequest/userInformation/@username">
|
---|
623 | <a>
|
---|
624 | <xsl:attribute name="href">javascript:toggleUserMenu();</xsl:attribute>
|
---|
625 | <xsl:call-template name="toggleUserMenuScript"/>
|
---|
626 | <span id="loginButton"><xsl:value-of select="/page/pageRequest/userInformation/@username"/></span>
|
---|
627 | </a>
|
---|
628 | </xsl:when>
|
---|
629 | <xsl:otherwise>
|
---|
630 | <a>
|
---|
631 | <xsl:attribute name="href"><xsl:call-template name="generateLoginURL"/>
|
---|
632 | </xsl:attribute>
|
---|
633 | <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_tip')"/></xsl:attribute>
|
---|
634 | <span id="loginButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_b')"/></span>
|
---|
635 | </a>
|
---|
636 | </xsl:otherwise>
|
---|
637 | </xsl:choose>
|
---|
638 | </xsl:template>
|
---|
639 |
|
---|
640 | <xsl:template name="DebugLink">
|
---|
641 | <!-- debuginfo (doesn't use class="ui-state-error" since the text is not legible due to inherited text-colour) -->
|
---|
642 | <xsl:if test="/page/pageRequest/paramList/param[(@name='debug') and (@value='on' or @value='true' or @value='1' or @value='yes')]">
|
---|
643 | <a href="{$library_name}/collection/{$collNameChecked}/page/debug">
|
---|
644 | <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'debuginfo_tip')"/></xsl:attribute>
|
---|
645 | <span id="debugButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'debuginfo_b')"/></span>
|
---|
646 | </a>
|
---|
647 | </xsl:if>
|
---|
648 | </xsl:template>
|
---|
649 |
|
---|
650 | <xsl:template name="buttonStyling">
|
---|
651 | <script type="text/javascript">
|
---|
652 | <xsl:text disable-output-escaping="yes">
|
---|
653 | $("#preferencesButton").button({icon: "ui-icon-wrench"});
|
---|
654 | $("#preferencesButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"});
|
---|
655 | $("#helpButton").button({icon: "ui-icon-help"});
|
---|
656 | $("#helpButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"});
|
---|
657 | $("#debugButton").button({icon: "ui-icon-info"});
|
---|
658 | $("#debugButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"});
|
---|
659 | </xsl:text>
|
---|
660 | <xsl:choose>
|
---|
661 | <xsl:when test="/page/pageRequest/userInformation/@username">
|
---|
662 | <xsl:text disable-output-escaping="yes">$("#loginButton").button({icon: "ui-icon-unlocked"});</xsl:text>
|
---|
663 | </xsl:when>
|
---|
664 | <xsl:otherwise>
|
---|
665 | <xsl:text disable-output-escaping="yes">$("#loginButton").button({icon: "ui-icon-locked"});</xsl:text>
|
---|
666 | </xsl:otherwise>
|
---|
667 | </xsl:choose>
|
---|
668 | <xsl:text disable-output-escaping="yes">
|
---|
669 | $("#loginButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"});
|
---|
670 | </xsl:text>
|
---|
671 | </script>
|
---|
672 |
|
---|
673 | </xsl:template>
|
---|
674 | <!-- ***** PAGE TITLE ***** -->
|
---|
675 | <xsl:template name="page-title-area">
|
---|
676 | <xsl:variable name="pageTitleVar"><xsl:call-template name="pageTitle"/></xsl:variable>
|
---|
677 | <div id="titlearea">
|
---|
678 | <h2>
|
---|
679 | <!-- Resize the title based on how long it is (There's probably a better way to do this) -->
|
---|
680 | <xsl:attribute name="style">
|
---|
681 | <xsl:choose>
|
---|
682 | <xsl:when test="string-length($pageTitleVar) < 20">
|
---|
683 | <xsl:text>font-size: 1.5em;</xsl:text>
|
---|
684 | </xsl:when>
|
---|
685 | <xsl:when test="string-length($pageTitleVar) < 30">
|
---|
686 | <xsl:text>font-size: 1.4em;</xsl:text>
|
---|
687 | </xsl:when>
|
---|
688 | <xsl:when test="string-length($pageTitleVar) < 40">
|
---|
689 | <xsl:text>font-size: 1.3em;</xsl:text>
|
---|
690 | </xsl:when>
|
---|
691 | <xsl:when test="string-length($pageTitleVar) < 50">
|
---|
692 | <xsl:text>font-size: 1.2em;</xsl:text>
|
---|
693 | </xsl:when>
|
---|
694 | <xsl:when test="string-length($pageTitleVar) < 60">
|
---|
695 | <xsl:text>font-size: 1.1em;</xsl:text>
|
---|
696 | </xsl:when>
|
---|
697 | <xsl:when test="string-length($pageTitleVar) < 70">
|
---|
698 | <xsl:text>font-size: 1em;</xsl:text>
|
---|
699 | </xsl:when>
|
---|
700 | <xsl:when test="string-length($pageTitleVar) < 80">
|
---|
701 | <xsl:text>font-size: 0.9em;</xsl:text>
|
---|
702 | </xsl:when>
|
---|
703 | <xsl:when test="string-length($pageTitleVar) < 90">
|
---|
704 | <xsl:text>font-size: 0.8em;</xsl:text>
|
---|
705 | </xsl:when>
|
---|
706 | <xsl:otherwise>
|
---|
707 | <xsl:text>font-size: 0.7em;</xsl:text>
|
---|
708 | </xsl:otherwise>
|
---|
709 | </xsl:choose>
|
---|
710 | </xsl:attribute>
|
---|
711 | <!--<xsl:value-of select="string-length($pageTitleVar)" />-->
|
---|
712 | <xsl:value-of select="$pageTitleVar" />
|
---|
713 | </h2><xsl:text> </xsl:text>
|
---|
714 | </div>
|
---|
715 | </xsl:template>
|
---|
716 |
|
---|
717 | <!-- ***** QUICK SEARCH AREA ***** -->
|
---|
718 | <!-- Search form should only appear if there's a search (query) service AND it has an index.
|
---|
719 | By default, all collections end up with some query service (default is MGPP) even when they have
|
---|
720 | no search indexes, which is why the extra test for the presence of an index/fq-something is necessary. -->
|
---|
721 | <xsl:template name="quick-search-area">
|
---|
722 |
|
---|
723 | <gsf:variable name="tkMetadataURL_collection"><xsl:value-of select="$library_name"/>/sites/<xsl:value-of select="$site_name"/>/collect/<xsl:value-of select="$collNameChecked"/>/metadata/tk.mds</gsf:variable>
|
---|
724 | <gsf:variable name="tkMetadataURL_site"><xsl:value-of select="$library_name"/>/sites/<xsl:value-of select="$site_name"/>/metadata/tk.mds</gsf:variable>
|
---|
725 |
|
---|
726 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']">
|
---|
727 | <xsl:variable name="subaction" select="/page/pageRequest/@subaction"/>
|
---|
728 | <div id="quicksearcharea">
|
---|
729 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
|
---|
730 | <xsl:choose>
|
---|
731 | <xsl:when test="not(page/pageRequest[@action='q']) or /page/pageRequest/paramList/param[@name='qs']/@value = '1'">
|
---|
732 | <form action="{$library_name}/collection/{$collNameChecked}/search/TextQuery">
|
---|
733 | <!-- This parameter says that we have come from the quick search area -->
|
---|
734 | <input type="hidden" name="qs" value="1"/>
|
---|
735 | <input type="hidden" name="rt" value="rd"/>
|
---|
736 | <input type="hidden" name="s1.level">
|
---|
737 | <xsl:attribute name="value">
|
---|
738 | <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name='TextQuery']/paramList/param[@name = 'level']/@default"/>
|
---|
739 | </xsl:attribute>
|
---|
740 | </input>
|
---|
741 | <xsl:choose>
|
---|
742 | <xsl:when test="/page/pageResponse/service[@name = 'TextQuery']/paramList/param[@name = 'startPage']">
|
---|
743 | <input type="hidden" name="s1.startPage" value="1"/>
|
---|
744 | </xsl:when>
|
---|
745 | <xsl:otherwise>
|
---|
746 | <input type="hidden" name="startPage" value="1"/>
|
---|
747 | </xsl:otherwise>
|
---|
748 | </xsl:choose>
|
---|
749 |
|
---|
750 | <!-- The query text box -->
|
---|
751 | <span class="querybox">
|
---|
752 | <xsl:variable name="qs">
|
---|
753 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']" mode="calculate-default"/>
|
---|
754 | </xsl:variable>
|
---|
755 | <nobr>
|
---|
756 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']">
|
---|
757 | <!--
|
---|
758 | <xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.tidyWhitespace($qs, /page/@lang)"/>
|
---|
759 | -->
|
---|
760 | <xsl:with-param name="default" select="normalize-space($qs)"/>
|
---|
761 |
|
---|
762 | </xsl:apply-templates>
|
---|
763 | </nobr>
|
---|
764 | </span>
|
---|
765 | <!-- The index selection list -->
|
---|
766 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']/@type = 'enum_single'">
|
---|
767 | <span class="textselect">
|
---|
768 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']">
|
---|
769 | <xsl:with-param name="default">
|
---|
770 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']" mode="calculate-default"/>
|
---|
771 | </xsl:with-param>
|
---|
772 | <xsl:with-param name="hideSingle">true</xsl:with-param>
|
---|
773 | <xsl:with-param name="quickSearch">true</xsl:with-param>
|
---|
774 | </xsl:apply-templates>
|
---|
775 | </span>
|
---|
776 | </xsl:if>
|
---|
777 | <!-- The partition selection list -->
|
---|
778 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']/@type = 'enum_single'">
|
---|
779 | <span class="textselect">
|
---|
780 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']">
|
---|
781 | <xsl:with-param name="default">
|
---|
782 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']" mode="calculate-default"/>
|
---|
783 | </xsl:with-param>
|
---|
784 | <xsl:with-param name="hideSingle">true</xsl:with-param>
|
---|
785 | <xsl:with-param name="quickSearch">true</xsl:with-param>
|
---|
786 | </xsl:apply-templates>
|
---|
787 | </span>
|
---|
788 | </xsl:if>
|
---|
789 | <!-- The language selection list -->
|
---|
790 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']/@type = 'enum_single'">
|
---|
791 | <span class="textselect">
|
---|
792 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']">
|
---|
793 | <xsl:with-param name="default">
|
---|
794 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']" mode="calculate-default"/>
|
---|
795 | </xsl:with-param>
|
---|
796 | <xsl:with-param name="hideSingle">true</xsl:with-param>
|
---|
797 | <xsl:with-param name="quickSearch">true</xsl:with-param>
|
---|
798 | </xsl:apply-templates>
|
---|
799 | </span>
|
---|
800 | </xsl:if>
|
---|
801 | <!-- The submit button (for TextQuery) -->
|
---|
802 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
|
---|
803 | <input type="submit" id="quickSearchSubmitButton">
|
---|
804 | <xsl:attribute name="value">
|
---|
805 | <xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/displayItem[@name='submit']"/>
|
---|
806 | </xsl:attribute>
|
---|
807 | </input>
|
---|
808 | <br/>
|
---|
809 | </xsl:if>
|
---|
810 | </form>
|
---|
811 | </xsl:when>
|
---|
812 | <xsl:otherwise><br/></xsl:otherwise>
|
---|
813 | </xsl:choose>
|
---|
814 | </xsl:if>
|
---|
815 | <!-- The list of other search types -->
|
---|
816 | <ul>
|
---|
817 | <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']">
|
---|
818 | <xsl:if test="/page/pageRequest/paramList/param[@name='qs']/@value = 1 or not(@name = /page/pageRequest/paramList/param[@name='s']/@value)">
|
---|
819 | <li class="ui-state-default ui-corner-all">
|
---|
820 | <a>
|
---|
821 | <xsl:attribute name="href">
|
---|
822 | <xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collNameChecked"/>/search/<xsl:value-of select="@name"/>
|
---|
823 | </xsl:attribute>
|
---|
824 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
825 | </a>
|
---|
826 | </li>
|
---|
827 | </xsl:if>
|
---|
828 | </xsl:for-each>
|
---|
829 | </ul>
|
---|
830 | </div>
|
---|
831 | </xsl:if>
|
---|
832 | </xsl:template>
|
---|
833 |
|
---|
834 | <xsl:template name="map-scripts">
|
---|
835 | <meta content="initial-scale=1.0, user-scalable=no" name="viewport"/>
|
---|
836 | <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCofVTps3xHfMvIcTMHqYMMxe3xXfkAxnI&libraries=drawing" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
837 | <script src="interfaces/{$interface_name}/js/map-scripts-shapes-util.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
838 | <script src="interfaces/{$interface_name}/js/map-scripts.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
839 | <gsf:script type="text/javascript">$(window).on("load", initializeMapScripts);</gsf:script>
|
---|
840 | </xsl:template>
|
---|
841 |
|
---|
842 | <xsl:template name="openlayers-map-scripts">
|
---|
843 | <script src="interfaces/{interface_name}/js/OpenLayers.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
844 | </xsl:template>
|
---|
845 |
|
---|
846 | <xsl:template name="panoramaViewer-scripts">
|
---|
847 | <script src="interfaces/{$interface_name}/js/three45.min.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
848 | <script src="interfaces/{$interface_name}/js/Tween.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
849 | <script src="interfaces/{$interface_name}/js/Detector.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
850 | <script src="interfaces/{$interface_name}/js/RequestAnimationFrame.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
851 | <script src="interfaces/{$interface_name}/js/panoramaMarker.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
852 | <script src="interfaces/{$interface_name}/js/panoramaViewer.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
853 | <gsf:script type="text/javascript">$(window).on("load", initPanoramaViewer);$(window).on("load", _animate);</gsf:script>
|
---|
854 | </xsl:template>
|
---|
855 |
|
---|
856 | <xsl:template name="choose-title">
|
---|
857 | <gsf:choose-metadata>
|
---|
858 | <gsf:metadata name="dc.Title"/>
|
---|
859 | <gsf:metadata name="exp.Title"/>
|
---|
860 | <gsf:metadata name="ex.dc.Title"/>
|
---|
861 | <gsf:metadata name="Title"/>
|
---|
862 | <gsf:default>Untitled</gsf:default>
|
---|
863 | </gsf:choose-metadata>
|
---|
864 | </xsl:template>
|
---|
865 |
|
---|
866 | <xsl:template name="js-for-loading-tk-metadata-set">
|
---|
867 | <script type="text/javascript">
|
---|
868 | <xsl:text disable-output-escaping="yes">
|
---|
869 | $(document).ready(function() {
|
---|
870 | if (tkMetadataSetStatus == "needs-to-be-loaded") {
|
---|
871 | loadTKMetadataSet("</xsl:text><xsl:value-of select="$lang"/><xsl:text disable-output-escaping="yes">", "collection");
|
---|
872 | }
|
---|
873 | if (tkMetadataSetStatus == "no-metadata-set-for-this-collection") {
|
---|
874 | loadTKMetadataSet("</xsl:text><xsl:value-of select="$lang"/><xsl:text disable-output-escaping="yes">", "site");
|
---|
875 | }
|
---|
876 | })
|
---|
877 | </xsl:text>
|
---|
878 | </script>
|
---|
879 | </xsl:template>
|
---|
880 |
|
---|
881 | <xsl:template name="choose-tklabels-single-field">
|
---|
882 | <xsl:param name="label-metadata">tk.Labels</xsl:param>
|
---|
883 | <xsl:call-template name="js-for-loading-tk-metadata-set"/>
|
---|
884 | <xsl:variable name="labels-csv"><xsl:value-of select="metadataList/metadata[@name=$label-metadata]"/></xsl:variable>
|
---|
885 | <gsf:div class="tklabels">
|
---|
886 | <xsl:if test="util:csvContains($labels-csv, 'tk.Attribution')">
|
---|
887 | <gsf:icon file="tklabels/tk_a.png"/>
|
---|
888 | </xsl:if>
|
---|
889 | <xsl:if test="util:csvContains($labels-csv, 'tk.Clan')">
|
---|
890 | <gsf:icon file="tklabels/tk_cl.png"/>
|
---|
891 | </xsl:if>
|
---|
892 | <xsl:if test="util:csvContains($labels-csv, 'tk.Family')">
|
---|
893 | <gsf:icon file="tklabels/tk_f.png"/>
|
---|
894 | </xsl:if>
|
---|
895 | <xsl:if test="util:csvContains($labels-csv, 'tk.MultipleCommunities')">
|
---|
896 | <gsf:icon file="tklabels/tk_mc.png"/>
|
---|
897 | </xsl:if>
|
---|
898 | <xsl:if test="util:csvContains($labels-csv, 'tk.CommunityVoice')">
|
---|
899 | <gsf:icon file="tklabels/tk_cv.png"/>
|
---|
900 | </xsl:if>
|
---|
901 | <xsl:if test="util:csvContains($labels-csv, 'tk.Creative')">
|
---|
902 | <gsf:icon file="tklabels/tk_cr.png"/>
|
---|
903 | </xsl:if>
|
---|
904 | <xsl:if test="util:csvContains($labels-csv, 'tk.Verified')">
|
---|
905 | <gsf:icon file="tklabels/tk_v.png"/>
|
---|
906 | </xsl:if>
|
---|
907 | <xsl:if test="util:csvContains($labels-csv, 'tk.NonVerified')">
|
---|
908 | <gsf:icon file="tklabels/tk_nv.png"/>
|
---|
909 | </xsl:if>
|
---|
910 | <xsl:if test="util:csvContains($labels-csv, 'tk.Seasonal')">
|
---|
911 | <gsf:icon file="tklabels/tk_s.png"/>
|
---|
912 | </xsl:if>
|
---|
913 | <xsl:if test="util:csvContains($labels-csv, 'tk.WomenGeneral')">
|
---|
914 | <gsf:icon file="tklabels/tk_wg.png"/>
|
---|
915 | </xsl:if>
|
---|
916 | <xsl:if test="util:csvContains($labels-csv, 'tk.MenGeneral')">
|
---|
917 | <gsf:icon file="tklabels/tk_mg.png"/>
|
---|
918 | </xsl:if>
|
---|
919 | <xsl:if test="util:csvContains($labels-csv, 'tk.MenRestricted')">
|
---|
920 | <gsf:icon file="tklabels/tk_mr.png"/>
|
---|
921 | </xsl:if>
|
---|
922 | <xsl:if test="util:csvContains($labels-csv, 'tk.WomenRestricted')">
|
---|
923 | <gsf:icon file="tklabels/tk_wr.png"/>
|
---|
924 | </xsl:if>
|
---|
925 | <xsl:if test="util:csvContains($labels-csv, 'tk.CulturallySensitive')">
|
---|
926 | <gsf:icon file="tklabels/tk_cs.png"/>
|
---|
927 | </xsl:if>
|
---|
928 | <xsl:if test="util:csvContains($labels-csv, 'tk.SecretSacred')">
|
---|
929 | <gsf:icon file="tklabels/tk_ss.png"/>
|
---|
930 | </xsl:if>
|
---|
931 | <xsl:if test="util:csvContains($labels-csv, 'tk.OpenToCommercialization')">
|
---|
932 | <gsf:icon file="tklabels/tk_oc.png"/>
|
---|
933 | </xsl:if>
|
---|
934 | <xsl:if test="util:csvContains($labels-csv, 'tk.nonCommercial')">
|
---|
935 | <gsf:icon file="tklabels/tk_nc.png"/>
|
---|
936 | </xsl:if>
|
---|
937 | <xsl:if test="util:csvContains($labels-csv, 'tk.CommunityUseOnly')">
|
---|
938 | <gsf:icon file="tklabels/tk_co.png"/>
|
---|
939 | </xsl:if>
|
---|
940 | <xsl:if test="util:csvContains($labels-csv, 'tk.Outreach')">
|
---|
941 | <gsf:icon file="tklabels/tk_o.png"/>
|
---|
942 | </xsl:if>
|
---|
943 | <xsl:if test="util:csvContains($labels-csv, 'tk.OpenToCollaboration')">
|
---|
944 | <gsf:icon file="tklabels/tk_cb.png"/>
|
---|
945 | </xsl:if>
|
---|
946 |
|
---|
947 | </gsf:div>
|
---|
948 | </xsl:template>
|
---|
949 |
|
---|
950 | <xsl:template name="choose-tklabels">
|
---|
951 | <xsl:call-template name="js-for-loading-tk-metadata-set"/>
|
---|
952 | <gsf:div class="tklabels">
|
---|
953 | <gsf:switch>
|
---|
954 | <gsf:metadata name="tk.Attribution"/>
|
---|
955 | <gsf:when test="equals" test-value="true">
|
---|
956 | <gsf:icon file="tklabels/tk_a.png"/>
|
---|
957 | </gsf:when>
|
---|
958 | </gsf:switch>
|
---|
959 | <gsf:switch>
|
---|
960 | <gsf:metadata name="tk.Clan"/>
|
---|
961 | <gsf:when test="equals" test-value="true">
|
---|
962 | <gsf:icon file="tklabels/tk_cl.png"/>
|
---|
963 | </gsf:when>
|
---|
964 | </gsf:switch>
|
---|
965 | <gsf:switch>
|
---|
966 | <gsf:metadata name="tk.Family"/>
|
---|
967 | <gsf:when test="equals" test-value="true">
|
---|
968 | <gsf:icon file="tklabels/tk_f.png"/>
|
---|
969 | </gsf:when>
|
---|
970 | </gsf:switch>
|
---|
971 | <gsf:switch>
|
---|
972 | <gsf:metadata name="tk.MultipleCommunities"/>
|
---|
973 | <gsf:when test="equals" test-value="true">
|
---|
974 | <gsf:icon file="tklabels/tk_mc.png"/>
|
---|
975 | </gsf:when>
|
---|
976 | </gsf:switch>
|
---|
977 | <gsf:switch>
|
---|
978 | <gsf:metadata name="tk.CommunityVoice"/>
|
---|
979 | <gsf:when test="equals" test-value="true">
|
---|
980 | <gsf:icon file="tklabels/tk_cv.png"/>
|
---|
981 | </gsf:when>
|
---|
982 | </gsf:switch>
|
---|
983 | <gsf:switch>
|
---|
984 | <gsf:metadata name="tk.Creative"/>
|
---|
985 | <gsf:when test="equals" test-value="true">
|
---|
986 | <gsf:icon file="tklabels/tk_cr.png"/>
|
---|
987 | </gsf:when>
|
---|
988 | </gsf:switch>
|
---|
989 | <gsf:switch>
|
---|
990 | <gsf:metadata name="tk.Verified"/>
|
---|
991 | <gsf:when test="equals" test-value="true">
|
---|
992 | <gsf:icon file="tklabels/tk_v.png"/>
|
---|
993 | </gsf:when>
|
---|
994 | </gsf:switch>
|
---|
995 | <gsf:switch>
|
---|
996 | <gsf:metadata name="tk.NonVerified"/>
|
---|
997 | <gsf:when test="equals" test-value="true">
|
---|
998 | <gsf:icon file="tklabels/tk_nv.png"/>
|
---|
999 | </gsf:when>
|
---|
1000 | </gsf:switch>
|
---|
1001 | <gsf:switch>
|
---|
1002 | <gsf:metadata name="tk.Seasonal"/>
|
---|
1003 | <gsf:when test="equals" test-value="true">
|
---|
1004 | <gsf:icon file="tklabels/tk_s.png"/>
|
---|
1005 | </gsf:when>
|
---|
1006 | </gsf:switch>
|
---|
1007 | <gsf:switch>
|
---|
1008 | <gsf:metadata name="tk.WomenGeneral"/>
|
---|
1009 | <gsf:when test="equals" test-value="true">
|
---|
1010 | <gsf:icon file="tklabels/tk_wg.png"/>
|
---|
1011 | </gsf:when>
|
---|
1012 | </gsf:switch>
|
---|
1013 | <gsf:switch>
|
---|
1014 | <gsf:metadata name="tk.MenGeneral"/>
|
---|
1015 | <gsf:when test="equals" test-value="true">
|
---|
1016 | <gsf:icon file="tklabels/tk_mg.png"/>
|
---|
1017 | </gsf:when>
|
---|
1018 | </gsf:switch>
|
---|
1019 | <gsf:switch>
|
---|
1020 | <gsf:metadata name="tk.MenRestricted"/>
|
---|
1021 | <gsf:when test="equals" test-value="true">
|
---|
1022 | <gsf:icon file="tklabels/tk_mr.png"/>
|
---|
1023 | </gsf:when>
|
---|
1024 | </gsf:switch>
|
---|
1025 | <gsf:switch>
|
---|
1026 | <gsf:metadata name="tk.WomenRestricted"/>
|
---|
1027 | <gsf:when test="equals" test-value="true">
|
---|
1028 | <gsf:icon file="tklabels/tk_wr.png"/>
|
---|
1029 | </gsf:when>
|
---|
1030 | </gsf:switch>
|
---|
1031 | <gsf:switch>
|
---|
1032 | <gsf:metadata name="tk.CulturallySensitive"/>
|
---|
1033 | <gsf:when test="equals" test-value="true">
|
---|
1034 | <gsf:icon file="tklabels/tk_cs.png"/>
|
---|
1035 | </gsf:when>
|
---|
1036 | </gsf:switch>
|
---|
1037 | <gsf:switch>
|
---|
1038 | <gsf:metadata name="tk.SecretSacred"/>
|
---|
1039 | <gsf:when test="equals" test-value="true">
|
---|
1040 | <gsf:icon file="tklabels/tk_ss.png"/>
|
---|
1041 | </gsf:when>
|
---|
1042 | </gsf:switch>
|
---|
1043 | <gsf:switch>
|
---|
1044 | <gsf:metadata name="tk.OpenToCommercialization"/>
|
---|
1045 | <gsf:when test="equals" test-value="true">
|
---|
1046 | <gsf:icon file="tklabels/tk_oc.png"/>
|
---|
1047 | </gsf:when>
|
---|
1048 | </gsf:switch>
|
---|
1049 | <gsf:switch>
|
---|
1050 | <gsf:metadata name="tk.NonCommercial"/>
|
---|
1051 | <gsf:when test="equals" test-value="true">
|
---|
1052 | <gsf:icon file="tklabels/tk_nc.png"/>
|
---|
1053 | </gsf:when>
|
---|
1054 | </gsf:switch>
|
---|
1055 | <gsf:switch>
|
---|
1056 | <gsf:metadata name="tk.CommunityUseOnly"/>
|
---|
1057 | <gsf:when test="equals" test-value="true">
|
---|
1058 | <gsf:icon file="tklabels/tk_co.png"/>
|
---|
1059 | </gsf:when>
|
---|
1060 | </gsf:switch>
|
---|
1061 | <gsf:switch>
|
---|
1062 | <gsf:metadata name="tk.Outreach"/>
|
---|
1063 | <gsf:when test="equals" test-value="true">
|
---|
1064 | <gsf:icon file="tklabels/tk_o.png"/>
|
---|
1065 | </gsf:when>
|
---|
1066 | </gsf:switch>
|
---|
1067 | <gsf:switch>
|
---|
1068 | <gsf:metadata name="tk.OpenToCollaboration"/>
|
---|
1069 | <gsf:when test="equals" test-value="true">
|
---|
1070 | <gsf:icon file="tklabels/tk_cb.png"/>
|
---|
1071 | </gsf:when>
|
---|
1072 | </gsf:switch>
|
---|
1073 | </gsf:div>
|
---|
1074 | </xsl:template>
|
---|
1075 |
|
---|
1076 | <xsl:template name="choose-tklabels-small">
|
---|
1077 | <style>
|
---|
1078 | .tklabels img {
|
---|
1079 | width: 2em;
|
---|
1080 | }
|
---|
1081 | </style>
|
---|
1082 | <xsl:call-template name="choose-tklabels"/>
|
---|
1083 | </xsl:template>
|
---|
1084 |
|
---|
1085 | </xsl:stylesheet>
|
---|