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