source: main/trunk/greenstone3/web/interfaces/default/transform/pages/document.xsl@ 36287

Last change on this file since 36287 was 36287, checked in by anupama, 7 months ago

PagedImg-e showed up a bug where only the first page of a paged-img document was shown with its img and text. Dr Bainbridge identified the bug as the self-closing div problem and suggested I look at gsf:div definition for solution (if I couldn't use gsf:div itself). Following his Kathy's advice to debug document.xsl by adding AAAA to ZZZZ to each template, I've now found the location(s) that resulted in the self-closing div. Using gsf:div in place of div sufficed to fix the problem.

File size: 42.9 KB
Line 
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 <!-- use the 'main' layout -->
12 <xsl:import href="layouts/main.xsl"/>
13 <xsl:import href="layouts/toc.xsl"/>
14
15 <!-- templates for adding user comments -->
16 <xsl:import href="layouts/usercomments.xsl"/>
17
18 <!-- We technically need this include. However, it is imported with toc.xsl -->
19 <!-- <xsl:include href="document-shared.xsl" /> -->
20
21 <xsl:variable name="bookswitch">
22 <xsl:choose>
23 <xsl:when test="/page/pageRequest/paramList/param[@name='book']/@value">
24 <xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/>
25 </xsl:when>
26 <xsl:otherwise>off</xsl:otherwise>
27 </xsl:choose>
28 </xsl:variable>
29
30 <xsl:variable name="canDoEditing">
31 <xsl:if test="$isEditingAllowed = '1' and (/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)))">true</xsl:if>
32 </xsl:variable>
33 <xsl:variable name="editingTurnedOn">
34 <xsl:if test="/page/pageRequest/paramList/param[@name='docEdit']/@value = '1'">true</xsl:if>
35 </xsl:variable>
36
37 <!-- optional cgi-params for links to document pages -->
38 <xsl:variable name="opt-doc-link-args"></xsl:variable>
39 <!-- set page title -->
40 <xsl:template name="pageTitle"><gslib:documentTitle/></xsl:template>
41
42 <!-- set page breadcrumbs -->
43 <xsl:template name="breadcrumbs">
44 <gslib:siteLink/><gslib:rightArrow/>
45 <gslib:collectionNameLinked/><gslib:rightArrow/>
46 <a>
47 <xsl:attribute name="href">
48 <xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collName"/>/document/<xsl:value-of select="/page/pageResponse/document/documentNode[1]/@nodeID"/>
49 </xsl:attribute>
50 <xsl:variable name="documentTitleVar">
51 <gslib:documentTitle/>
52 </xsl:variable>
53 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.document')"/>
54 </a>
55 </xsl:template>
56
57 <xsl:template match="/">
58 <xsl:choose>
59 <!-- if this is the realistic books version of the page -->
60 <xsl:when test="$bookswitch = 'flashxml'">
61 <html>
62 <body>
63 <xsl:apply-templates select="/page/pageResponse/document"/>
64 </body>
65 </html>
66 </xsl:when>
67 <!-- if this is the regular version of the page -->
68 <xsl:otherwise>
69 <xsl:call-template name="mainTemplate"/>
70 </xsl:otherwise>
71 </xsl:choose>
72 </xsl:template>
73
74 <xsl:template name="documentHeading">
75 <span style="font-weight:bold; font-size: 120%;">
76 <xsl:call-template name="choose-title"/>
77 </span>
78 </xsl:template>
79
80 <!-- content of a simple document. Will not be used for editing mode -->
81 <xsl:template name="documentContent">
82 <div id="gs-document">
83 <xsl:call-template name="documentPre"/>
84 <xsl:call-template name="wrappedSectionImage"/>
85 <div id="gs-document-text">
86 <xsl:call-template name="documentNodeText"/>
87 </div>
88 </div>
89 </xsl:template>
90
91 <xsl:template name="topLevelSectionContent">
92 <xsl:call-template name="wrappedSectionImage"/>
93 <xsl:call-template name="wrappedSectionText"/>
94 </xsl:template>
95
96 <xsl:template name="sectionContent">
97 <xsl:call-template name="wrappedSectionImage"/>
98 <xsl:call-template name="wrappedSectionText"/>
99 </xsl:template>
100 <xsl:template name="sectionContentForEditing">
101 <xsl:call-template name="wrappedSectionImage"/>
102 <xsl:call-template name="wrappedSectionTextForEditing"/>
103 </xsl:template>
104
105 <xsl:template name="wrappedSectionTextForEditing">
106 <br /><br />
107 <div id="text{@nodeID}" class="sectionText" style="display:block;"><!-- *** -->
108 <xsl:attribute name="contenteditable">
109 <xsl:text>true</xsl:text>
110 </xsl:attribute>
111 <xsl:call-template name="documentNodeTextForEditing"/>
112 </div>
113 </xsl:template>
114
115 <xsl:template name="wrappedSectionText">
116 <br /><br />
117
118 <div id="text{@nodeID}" class="sectionText"><!-- *** -->
119 <xsl:attribute name="style">
120 <xsl:choose>
121 <xsl:when test="/page/pageRequest/paramList/param[@name = 'view']/@value = 'image'">
122 <xsl:text>display:none;</xsl:text>
123 </xsl:when>
124 <xsl:otherwise>
125 <xsl:text>display:block;</xsl:text>
126 </xsl:otherwise>
127 </xsl:choose>
128 </xsl:attribute>
129 <xsl:call-template name="documentNodeText"/>
130 </div>
131 </xsl:template>
132
133 <xsl:template name="sectionImage">
134 <gsf:image type="screen"/>
135 </xsl:template>
136
137 <!-- Used to make sure that regardless what the collection designer uses for the title and content we can wrap it properly -->
138 <!-- If editing, be aware that the Document Basket looks for specific classes that this template bakes in (key points marked with ***) -->
139 <xsl:template name="wrapDocumentNodes">
140 <xsl:variable name="nodeID" select="@nodeID"/>
141 <a name="{@nodeID}"><xsl:text> </xsl:text></a>
142
143 <!-- Section header -->
144 <table class="sectionHeader"><tr>
145
146 <!-- Expand/collapse button -->
147 <xsl:if test="not(/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='sectionExpandCollapse']/@value) or /page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='sectionExpandCollapse']/@value = 'true'">
148 <td class="headerTD">
149 <img id="dtoggle{@nodeID}" onclick="toggleSection('{@nodeID}');" class="icon">
150 <xsl:attribute name="src">
151 <xsl:choose>
152 <xsl:when test="/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or util:oidIsMatchOrParent($nodeID, /page/pageResponse/document/@selectedNode)">
153 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'collapse_image')"/>
154 </xsl:when>
155 <xsl:otherwise>
156 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'expand_image')"/>
157 </xsl:otherwise>
158 </xsl:choose>
159 </xsl:attribute>
160 </img>
161 </td>
162 </xsl:if>
163
164 <!-- Title -->
165 <td id="header{@nodeID}" class="headerTD sectionTitle"><!-- *** -->
166 <p>
167 <xsl:attribute name="class"><xsl:value-of select="util:hashToDepthClass(@nodeID)"/> sectionHeader</xsl:attribute>
168
169 <xsl:if test="util:hashToSectionId(@nodeID)">
170 <span class="sectionNumberSpan">
171 <xsl:value-of select="util:hashToSectionId(@nodeID)"/>
172 <xsl:text> </xsl:text>
173 </span>
174 </xsl:if>
175 <!-- Display the title for the section regardless of whether automatic section numbering is turned on -->
176 <span><xsl:call-template name="sectionHeading"/></span>
177 </p>
178 </td>
179
180 <!-- "back to top" link -->
181 <xsl:if test="util:hashToDepthClass(@nodeID) != 'sectionHeaderDepthTitle' and not(/page/pageResponse/format[@type='display']/gsf:option[@name='backToTopLinks']) or /page/pageResponse/format[@type='display']/gsf:option[@name='backToTopLinks']/@value='true'">
182 <td class="backToTop headerTD">
183 <a href="javascript:scrollToTop();">
184 <xsl:text disable-output-escaping="yes">&#9650;</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.back_to_top')"/>
185 </a>
186 </td>
187 </xsl:if>
188 </tr></table>
189
190 <div id="doc{@nodeID}"><!-- *** -->
191 <xsl:choose>
192 <xsl:when test="/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or /page/pageResponse/document/@selectedNode = @nodeID">
193 <xsl:attribute name="class">
194 <xsl:text>sectionContainer hasText</xsl:text>
195 </xsl:attribute>
196 <xsl:attribute name="style">
197 <xsl:text>display:block;</xsl:text>
198 </xsl:attribute>
199 </xsl:when>
200 <xsl:when test="/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or util:oidIsMatchOrParent(@nodeID, /page/pageResponse/document/@selectedNode)">
201 <xsl:attribute name="class">
202 <xsl:text>sectionContainer noText</xsl:text>
203 </xsl:attribute>
204 <xsl:attribute name="style">
205 <xsl:text>display:block;</xsl:text>
206 </xsl:attribute>
207 </xsl:when>
208 <xsl:otherwise>
209 <xsl:attribute name="class">
210 <xsl:text>sectionContainer noText</xsl:text>
211 </xsl:attribute>
212 <xsl:attribute name="style">
213 <xsl:text>display:none;</xsl:text>
214 </xsl:attribute>
215 </xsl:otherwise>
216 </xsl:choose>
217
218 <xsl:choose>
219 <xsl:when test="$canDoEditing = 'true' and $editingTurnedOn = 'true'">
220 <table id="meta{@nodeID}">
221 <xsl:attribute name="style">
222 <xsl:choose>
223 <xsl:when test="/page/pageRequest/paramList/param[@name = 'dmd']/@value = 'true'">
224 <xsl:text>display:block;</xsl:text>
225 </xsl:when>
226 <xsl:otherwise>
227 <xsl:text>display:none;</xsl:text>
228 </xsl:otherwise>
229 </xsl:choose>
230 </xsl:attribute>
231 <xsl:value-of select="util:clearMetadataStorage()"/>
232 <xsl:for-each select="metadataList/metadata">
233 <xsl:sort select="@name"/>
234 <tr>
235 <td class="metaTableCellName"><xsl:value-of select="@name"/></td>
236 <td class="metaTableCell"> <textarea autocomplete="off"><xsl:attribute name="class">metaTableCellArea <xsl:value-of select="translate(@name, '.-', '')"/></xsl:attribute><xsl:value-of select="."/></textarea></td>
237 </tr>
238 </xsl:for-each>
239 </table>
240 <xsl:if test="$isMapGPSEditingAllowed = '1'">
241 <div id="map-and-controls-{@nodeID}" tabindex="-1">
242 <div id="map-{@nodeID}" style="height: 300px;"><xsl:text> </xsl:text></div>
243
244
245 <div id="ControlPanel-{@nodeID}" class="ControlPanel" >
246 <div id="ControlButtons">
247
248 <button onclick="gsmap_store['map-{@nodeID}'].deleteAllShapes()" >Clear All</button>
249 <button onclick="gsmap_store['map-{@nodeID}'].deleteSelectedShapes()" >Delete Selected</button>
250 <button onclick="gsmap_store['map-{@nodeID}'].mapEditorHistory.undo()" >Undo</button>
251 <button onclick="gsmap_store['map-{@nodeID}'].mapEditorHistory.redo()" >Redo</button>
252 <input type="checkbox" name="draggableCB" id="draggableCB-{@nodeID}" value="false" /> Lock all shapes location <br/>
253 </div>
254
255 <div id="SecondRow">
256 <div id="LineThickness">
257 <p class="valueEditor">Line thickness:
258 <div class="valueChanger">
259 <input type="number" class="valueInput" id="thicknessRangeVal-{@nodeID}" min="1.00" max="5.00" value="1.00" step="0.01" />
260 <span class="unit" style="display:none">%</span>
261 <!-- % sign added above, to keep the thickness field width equal to that of the opacity field -->
262 <!-- setting the step attribute to 0.01 means we allow 2 decimal places
263 (then Firefox won't make the box red/invalid for values with 2 dec places)
264 -->
265 </div>
266 <input type="range" size="2" min="20" max="100" value="1" class="slider" id="thicknessRange-{@nodeID}" />
267 </p>
268 </div>
269
270 <div id="ColourOpacity">
271 <p class="valueEditor">Colour opacity:
272 <div class="valueChanger">
273 <input type="number" class="valueInput" id="opacityRangeVal-{@nodeID}" min="0.0" max="100.0" value="40" />
274 <span class="unit">%</span>
275 </div>
276 <input type="range" min="0" max="100" value="40" class="slider" id="colourOpacity-{@nodeID}" />
277 </p>
278 </div>
279 </div>
280 <div id = "ThirdRow">
281 <div id="FillColour">
282 <p> Fill Colour:</p> <div id="color-palette1-{@nodeID}"><xsl:text> </xsl:text></div>
283 </div>
284 </div>
285 <div id = "FourthRow">
286 <p>Label Text:
287 <input type="text" class="description" id="description-{@nodeID}" value="" />
288 </p>
289 </div>
290
291 </div>
292 <!--
293 <div id="style-selector-control-{@nodeID}" class="map-control">
294 <select id="style-selector-{@nodeID}" class="selector-control">
295 <option value="default" selected="selected">Default</option>
296 <option value="silver">Silver</option>
297 <option value="night">Night mode</option>
298 <option value="retro">Retro</option>
299 <option value="paleDawn">Pale Dawn</option>
300 <option value="avocadoWorld">Avocado World</option>
301 <option value="bright">Bright</option>
302 <option value="turquoise">Turquoise</option>
303 <option value="hiding">Hide features</option>
304 </select>
305 </div>
306 -->
307 </div>
308 </xsl:if>
309 <xsl:call-template name="sectionContentForEditing"/>
310 </xsl:when>
311 <xsl:otherwise>
312 <xsl:choose>
313 <xsl:when test="../../document">
314 <xsl:call-template name="topLevelSectionContent"/>
315 </xsl:when>
316 <xsl:otherwise>
317 <xsl:call-template name="sectionContent"/>
318 </xsl:otherwise>
319 </xsl:choose>
320 </xsl:otherwise>
321 </xsl:choose>
322 <xsl:if test="documentNode">
323 <xsl:for-each select="documentNode">
324 <xsl:call-template name="wrapDocumentNodes"/>
325 </xsl:for-each>
326 </xsl:if>
327 </div>
328 </xsl:template>
329
330 <xsl:template name="javascriptForDocumentView">
331 <script type="text/javascript" src="interfaces/{$interface_name}/js/utility_scripts.js"><xsl:text> </xsl:text></script>
332 <script type="text/javascript" src="interfaces/{$interface_name}/js/document_scripts.js"><xsl:text> </xsl:text></script>
333 <gsf:metadata name="Thumb" hidden="true"/>
334 <script type="text/javascript">
335 <xsl:text disable-output-escaping="yes">
336 function goToAnchor(sectionID,anchor)
337 {
338 var docIdentifier = '</xsl:text><xsl:value-of select="//documentNode[@nodeType = 'root']/@nodeID"/><xsl:text disable-output-escaping="yes">';
339 focusAnchor(docIdentifier + "."+ sectionID,0,1,anchor);
340 }
341 </xsl:text>
342 </script>
343 <xsl:call-template name="customJavascriptForDocumentView"/>
344 </xsl:template>
345
346 <!-- Use this to add in extra javascript/files for an interface, site, collection -->
347 <xsl:template name="customJavascriptForDocumentView">
348 </xsl:template>
349
350 <xsl:template name="javascriptForDocumentEditing">
351 <!-- <script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts.js"><xsl:text> </xsl:text></script>-->
352 <script type="text/javascript" src="interfaces/{$interface_name}/js/documentedit_scripts.js"><xsl:text> </xsl:text></script>
353 <script type="text/javascript" src="interfaces/{$interface_name}/js/documentedit_scripts_util.js"><xsl:text> </xsl:text></script>
354 <script type="text/javascript" src="interfaces/{$interface_name}/js/map-scripts-shapes-util.js"><xsl:text> </xsl:text></script>
355 <script type="text/javascript" src="interfaces/{$interface_name}/js/map-scripts-editor-history.js"><xsl:text> </xsl:text></script>
356 <script type="text/javascript" src="interfaces/{$interface_name}/js/map-scripts-editor-themes.js"><xsl:text> </xsl:text></script>
357 <!-- LEAVE THIS NEXT LINE IN, IF USING CUSTOM OVERLAYS TO SHOW LABELS ON THE MAP -->
358 <!--<script type="text/javascript" src="interfaces/{$interface_name}/js/label-overlay-class.js"><xsl:text> </xsl:text></script>-->
359 <script type="text/javascript" src="interfaces/{$interface_name}/js/map-scripts-editor.js"><xsl:text> </xsl:text></script>
360 <script type="text/javascript" src="interfaces/{$interface_name}/js/hierarchy.js"><xsl:text> </xsl:text></script>
361
362 <link rel="stylesheet" href="interfaces/{$interface_name}/style/map-editors.css" type="text/css"/>
363
364 <script type="text/javascript">
365 <xsl:text disable-output-escaping="yes">
366
367 $(window).on("load", function()
368 {
369 if(gs.cgiParams.docEdit == "1")
370 {
371 readyPageForEditing(</xsl:text><xsl:value-of select="$isMapGPSEditingAllowed"/><xsl:text disable-output-escaping="yes">);
372 }
373 });
374 </xsl:text>
375 <!-- download and process hierarchy files -->
376 <xsl:text disable-output-escaping="yes">$(document).ready(function(){</xsl:text>
377 <xsl:for-each select="//classifier[@hfile]">
378 <xsl:if test="@hfile != ''">
379 <xsl:text disable-output-escaping="yes">downloadAndProcessHierarchyFile('</xsl:text>
380 <xsl:text>sites/localsite/collect/</xsl:text><xsl:value-of select="$collName"/><xsl:text>/etc/</xsl:text><xsl:value-of select="@hfile"/>
381 <xsl:text disable-output-escaping="yes">','</xsl:text><xsl:value-of select="@metadata"/><xsl:text disable-output-escaping="yes">');</xsl:text>
382 </xsl:if>
383 </xsl:for-each>
384 <xsl:text disable-output-escaping="yes">});</xsl:text>
385
386 </script>
387 <xsl:call-template name="customJavascriptForDocumentEditing"/>
388 </xsl:template>
389
390 <!-- Use this to add in extra javascript/files for an interface, site, collection -->
391 <xsl:template name="customJavascriptForDocumentEditing">
392 </xsl:template>
393
394 <!-- the page content -->
395 <xsl:template match="/page/pageResponse/document">
396 <xsl:if test="$bookswitch = 'off'">
397 <xsl:call-template name="javascriptForDocumentView"/>
398 <gslib:langfrag name="doc"/>
399 <xsl:if test="/page/pageResponse/collection[@name = $collName]/metadataList/metadata[@name = 'tidyoption'] = 'tidy'">
400 <script type="text/javascript">
401 <xsl:text disable-output-escaping="yes">
402 if(document.URL.indexOf("book=on") != -1)
403 {
404 loadBook();
405 }
406 </xsl:text>
407 </script>
408 </xsl:if>
409 </xsl:if>
410 <xsl:if test="$canDoEditing = 'true'">
411 <xsl:call-template name="javascriptForDocumentEditing"/>
412 <gslib:langfrag name="dse"/>
413 <gslib:langfrag name="de"/>
414 </xsl:if>
415
416 <xsl:if test="$bookswitch = 'off'">
417 <div id="bookdiv" style="visibility:hidden; height:0px; display:inline;"><xsl:text> </xsl:text></div>
418
419 <div id="float-anchor" style="width: 30%; min-width:180px; float:right; margin: 0 0 10px 20px;">
420 <xsl:if test="$canDoEditing = 'true'">
421 <xsl:call-template name="editBar"/>
422 </xsl:if>
423 <xsl:if test="not(/page/pageResponse/format[@type='display']/gsf:option[@name='sideBar']) or /page/pageResponse/format[@type='display']/gsf:option[@name='sideBar']/@value='true'">
424 <xsl:call-template name="rightSidebarTOC"/>
425 </xsl:if>
426 <!-- add in some text just in case nothing has been added to this div-->
427 <xsl:text> </xsl:text>
428 </div>
429 <xsl:if test="$canDoEditing = 'true'">
430 <script type="text/javascript">
431 if (keep_editing_controls_visible) {
432 $(function() {
433 moveScroller();
434 });
435 }
436 </script>
437 </xsl:if>
438 </xsl:if>
439
440 <!-- display the document -->
441 <xsl:choose>
442 <xsl:when test="@external != ''">
443 <xsl:call-template name="externalPage">
444 <xsl:with-param name="external" select="@external"/>
445 </xsl:call-template>
446 </xsl:when>
447 <xsl:when test="$bookswitch = 'flashxml'">
448 <xsl:call-template name="documentNodeFlashXML"/>
449 </xsl:when>
450 <xsl:when test="$bookswitch = 'on'">
451 <div id="bookdiv" style="display:inline;"><xsl:text> </xsl:text></div>
452 <!-- *** in document-scripts.js *** -->
453 <script type="text/javascript">
454 <xsl:text disable-output-escaping="yes">
455 if(document.URL.indexOf("book=on") != -1)
456 {
457 loadBook();
458 }
459 </xsl:text>
460 </script>
461 </xsl:when>
462 <!-- we want to do this stuff even if docType is simple or paged. Don't want to just set dt=hierarchy as that gives other unnecessary stuff-->
463 <!-- This is the first choice from wrappedDocument template-->
464 <xsl:when test="$canDoEditing = 'true' and $editingTurnedOn = 'true' ">
465 <div id="gs-document" style="width: 67%">
466 <xsl:call-template name="documentPre"/>
467 <div id="gs-document-text" class="documenttext" collection="{/page/pageResponse/collection/@name}"><!-- *** -->
468 <xsl:choose>
469 <xsl:when test="@docType='simple'">
470 <xsl:call-template name="wrapDocumentNodes"/>
471 </xsl:when>
472 <xsl:otherwise>
473 <xsl:for-each select="documentNode">
474 <xsl:call-template name="wrapDocumentNodes"/>
475 </xsl:for-each>
476 </xsl:otherwise>
477 </xsl:choose>
478 </div>
479 </div>
480 </xsl:when>
481 <xsl:when test="@docType='simple'">
482 <xsl:call-template name="documentHeading"/><br/>
483 <xsl:call-template name="documentContent"/>
484 <br /><xsl:call-template name="userCommentsSection"/>
485 </xsl:when>
486 <xsl:otherwise> <!-- display the standard greenstone document -->
487 <xsl:call-template name="wrappedDocument"/>
488 <br /><xsl:call-template name="userCommentsSection"/>
489 </xsl:otherwise>
490 </xsl:choose>
491 </xsl:template>
492
493 <xsl:template name="wrappedDocument">
494 <xsl:choose>
495 <!-- NOTE: alb = ajax load bypass -->
496 <!--
497 If we have asked for expanded document, then do this.
498 OR If the docType is hierarchy and we want to bypass the ajax load then do this
499 OR If the docType is hierarchy and we have asked for the top level document then do this
500 -->
501 <xsl:when test="/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or (/page/pageResponse/document/@docType = 'hierarchy' and (/page/pageRequest/paramList/param[@name = 'alb']/@value = '1' or (string-length(/page/pageRequest/paramList/param[@name = 'd']/@value) > 0 and not(util:contains(/page/pageResponse/document/@selectedNode, '.')))))">
502 <div id="gs-document">
503 <xsl:call-template name="documentPre"/>
504 <div id="gs-document-text" class="documenttext" collection="{/page/pageResponse/collection/@name}"><!-- *** -->
505 <xsl:for-each select="documentNode">
506 <xsl:call-template name="wrapDocumentNodes"/>
507 </xsl:for-each>
508 </div>
509 </div>
510 </xsl:when>
511 <xsl:when test="/page/pageResponse/document/@docType = 'paged' or /page/pageResponse/document/@docType = 'pagedhierarchy'">
512 <div id="gs-document">
513 <div id="tocLoadingImage" style="text-align:center;">
514 <img src="{util:getInterfaceText($interface_name, /page/@lang, 'loading_image')}"/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.loading')"/><xsl:text>...</xsl:text>
515 </div>
516 </div>
517 <script type="text/javascript">
518 <xsl:text disable-output-escaping="yes">
519 $(window).on("load", function()
520 {
521 var sectionID = gs.cgiParams.d;
522 var callbackFunction = null;
523 if(sectionID.indexOf(".") != -1)
524 {
525 callbackFunction = function()
526 {
527 focusSection(sectionID);
528 };
529 }
530 else {
531 callbackFunction = function()
532 {
533
534 expandAndExecute(sectionID+".1", null, null, null);
535 };
536 }
537 var docID = sectionID.replace(/([^.]*)\..*/, "$1");
538 var url = gs.xsltParams.library_name + "?a=d&amp;c=" + gs.cgiParams.c + "&amp;excerptid=gs-document&amp;dt=hierarchy&amp;d=" + docID;
539 if(gs.cgiParams.p_s) {
540 url += "&amp;p.s="+gs.cgiParams.p_s;
541 }
542 loadTopLevelPage(callbackFunction, url);
543 });
544 </xsl:text>
545 </script>
546 </xsl:when>
547 <xsl:otherwise>
548 <div id="gs-document">
549 <div id="tocLoadingImage" style="text-align:center;">
550 <img src="{util:getInterfaceText($interface_name, /page/@lang, 'loading_image')}"/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.loading')"/><xsl:text>...</xsl:text>
551 </div>
552 </div>
553 <script type="text/javascript">
554 <xsl:text disable-output-escaping="yes">
555 $(window).on("load", function()
556 {
557 loadTopLevelPage(function()
558 {
559 //Don't focus the section until the table of contents is loaded
560 var tocCheck = function()
561 {
562 if(gs.variables.tocLoaded)
563 {
564 focusSection("</xsl:text><xsl:value-of select="/page/pageResponse/document/@selectedNode"/><xsl:text disable-output-escaping="yes">");
565 }
566 else
567 {
568 setTimeout(tocCheck, 500);
569 }
570 }
571 tocCheck();
572 });
573 });
574 </xsl:text>
575 </script>
576 </xsl:otherwise>
577 </xsl:choose>
578
579 <div class="clear"><xsl:text> </xsl:text></div>
580 </xsl:template>
581
582 <xsl:template name="editBar">
583 <table style="width:100%; border:none;" id="editBar" class="ui-widget-content"><tr>
584 <td id="editBarLeft" style="width:70%"><xsl:text> </xsl:text></td>
585 <td id="editBarRight">
586 <div style="text-align:center;">
587 <!-- edit structure button -->
588 <!-- comment this out as its not working -->
589 <!-- <div style="margin:5px;" class="ui-state-default ui-corner-all">
590 <a style="padding: 3px; text-decoration:none;" href="{$library_name}?a=g&amp;sa=documentbasket&amp;c=&amp;s=DisplayDocumentList&amp;rt=r&amp;p.c={/page/pageResponse/collection/@name}&amp;docToEdit={/page/pageResponse/document/documentNode/@nodeID}"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.edit_structure')"/></a>
591 </div>-->
592 <!-- edit content button -->
593 <div style="margin:5px;" class="ui-state-default ui-corner-all">
594 <a id="editContentButton" style="padding: 3px; text-decoration:none;">
595 <xsl:attribute name="href">
596 <xsl:value-of select="$library_name"/>
597 <xsl:text>/collection/</xsl:text>
598 <xsl:value-of select="$collName"/>
599 <xsl:text>/document/</xsl:text>
600 <xsl:choose>
601 <xsl:when test="count(//documentNode) > 0">
602 <xsl:value-of select="/page/pageResponse/document/documentNode/@nodeID"/>
603 </xsl:when>
604 <xsl:otherwise>
605 <xsl:value-of select="/page/pageResponse/document/@nodeID"/>
606 </xsl:otherwise>
607 </xsl:choose>
608 <xsl:if test="not(/page/pageRequest/paramList/param[@name = 'docEdit']/@value = '1')">
609 <xsl:text>?ed=1&amp;docEdit=1</xsl:text>
610 </xsl:if>
611 </xsl:attribute>
612 <xsl:choose>
613 <xsl:when test="/page/pageRequest/paramList/param[@name = 'docEdit']/@value = '1'">
614 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'de.hide_editor')"/>
615 </xsl:when>
616 <xsl:otherwise>
617 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'de.edit_content')"/>
618 </xsl:otherwise>
619 </xsl:choose>
620 </a>
621 </div>
622 </div>
623 </td>
624 </tr></table>
625 <gslib:langfrag name="dse"/>
626 </xsl:template>
627
628 <xsl:template name="wrappedSectionImage">
629 <gsf:variable name="screenImageWidth"><gsf:metadata name="ScreenWidth"/></gsf:variable>
630 <gsf:variable name="screenImageHeight"><gsf:metadata name="ScreenHeight"/></gsf:variable>
631 <gsf:variable name="imageWidth"><gsf:metadata name="ImageWidth"/></gsf:variable>
632 <gsf:variable name="imageHeight"><gsf:metadata name="ImageHeight"/></gsf:variable>
633
634 <xsl:choose>
635 <xsl:when test="metadataList/metadata[@name = 'Screen'] and metadataList/metadata[@name = 'SourceFile'] and ($imageWidth div $screenImageWidth > 1.2) and (not(/page/pageResponse/format[@type='display']/gsf:option[@name='disableZoom']) or /page/pageResponse/format[@type='display']/gsf:option[@name='disableZoom']/@value='false')">
636 <gsf:div id="tidyDiv" />
637 <!-- adding a div with clear:both when the image doesn't nicely fit in beside the side bar. Otherwise, the divs stays up, but the image moves down and everything looks and acts weird. -->
638 <script type="text/javascript">
639 <xsl:text disable-output-escaping="yes">
640
641 var containerWidth = document.getElementById("container").offsetWidth;
642 var sidebarWidth = document.getElementById("rightSidebar").offsetWidth;
643 if (containerWidth - sidebarWidth &lt; </xsl:text><xsl:value-of select="$screenImageWidth"/><xsl:text disable-output-escaping="yes">) {
644 $("#tidyDiv").css("clear", "both");
645 }
646 </xsl:text>
647 </script>
648 <gsf:div id="image{@nodeID}">
649 <!-- when we ask for an individual section content we set ed=1. putting this test here prevents downloading all the screen and full images for each section of the document when we are just looking at the contents list. ed is not set for simple docs, so do this if doctype is simple -->
650 <xsl:if test="/page/pageResponse/document[@docType='simple'] or /page/pageRequest/paramList/param[@name = 'ed']/@value='1'">
651
652 <div id="wrap{util:replace(@nodeID, '.', '_')}" class="zoomImage" style="position:relative; width: {$screenImageWidth}px; height: {$screenImageHeight}px;">
653 <div id="small{util:replace(@nodeID, '.', '_')}" style="position:relative; width: {$screenImageWidth}px; height: {$screenImageHeight}px;">
654 <gsf:link type="source" target="_blank"><gsf:image type="screen"/></gsf:link>
655 </div>
656 <div id="mover{util:replace(@nodeID, '.', '_')}" style="border: 1px solid green; position: absolute; top: 0; left: 0; width: 598px; height: 598px; overflow: hidden; z-index: 100; background: white; display: none;">
657 <div id="overlay{util:replace(@nodeID, '.', '_')}" style="width: 600px; height: 600px; position: absolute; top: 0; left: 0; z-index: 200;">
658 <xsl:text> </xsl:text>
659 </div>
660 <div id="large{util:replace(@nodeID, '.', '_')}" style="position: relative; width: {$imageWidth}px; height: {$imageHeight}px;">
661 <gsf:link type="source"><gsf:image type="source"/></gsf:link>
662 </div>
663 </div>
664 </div>
665 <script type="text/javascript">
666 <xsl:text disable-output-escaping="yes">
667 {
668 var nodeID = "</xsl:text><xsl:value-of select="@nodeID"/><xsl:text disable-output-escaping="yes">";
669 nodeID = nodeID.replace(/\./g, "_");
670
671 var bigHeight = </xsl:text><xsl:value-of select="$imageHeight"/><xsl:text disable-output-escaping="yes">;
672 var smallHeight = </xsl:text><xsl:value-of select="$screenImageHeight"/><xsl:text disable-output-escaping="yes">;
673
674 var multiplier = bigHeight / smallHeight;
675
676 $("#wrap" + nodeID).anythingZoomer({
677 smallArea: "#small" + nodeID,
678 largeArea: "#large" + nodeID,
679 zoomPort: "#overlay" + nodeID,
680 mover: "#mover" + nodeID,
681 expansionSize:50,
682 speedMultiplier:multiplier
683 });
684
685 $("#zoomOptions input").prop("checked", false);
686 $("#zoomOptions").css("display", "");
687 }
688 </xsl:text>
689 </script>
690 </xsl:if>
691 </gsf:div>
692 </xsl:when>
693 <xsl:otherwise>
694 <gsf:div id="image{@nodeID}">
695 <xsl:attribute name="style">
696 <xsl:choose>
697 <xsl:when test="/page/pageRequest/paramList/param[@name = 'view']/@value = 'text'">
698 <xsl:text>display:none;</xsl:text>
699 </xsl:when>
700 <xsl:otherwise>
701 <xsl:text>display:block;</xsl:text>
702 </xsl:otherwise>
703 </xsl:choose>
704 </xsl:attribute>
705 <xsl:call-template name="sectionImage"/><xsl:text> </xsl:text>
706 </gsf:div>
707 </xsl:otherwise>
708 </xsl:choose>
709 </xsl:template>
710
711 <!-- The default template for displaying the document node text -->
712 <!-- equivalent to gsf:text -->
713 <xsl:template name="documentNodeText">
714 <xsl:param name="force">0</xsl:param>
715 <!-- Hides the "This document has no text." message -->
716 <xsl:variable name="noText"><gsf:metadata name="NoText"/></xsl:variable>
717 <xsl:choose>
718 <xsl:when test="$force = '1' or not($noText = '1')">
719
720 <!-- Section text -->
721 <xsl:for-each select="nodeContent">
722 <xsl:call-template name="displayMarkedUpTextAndAnnotations"/>
723 </xsl:for-each>
724 </xsl:when>
725 <xsl:when test="$noText = '1' and not(metadataList/metadata[@name='ImageType'])">
726 <gsf:link type="source"><gsf:metadata name="Source"/></gsf:link>
727 </xsl:when>
728 </xsl:choose>
729 <xsl:text> </xsl:text>
730 </xsl:template>
731
732 <!-- The default template for displaying the document node text in
733 editing mode -->
734 <!-- Note: we need to put some content in if the nodeContent is empty, otherwise you end up with an empty div, it gets changed to <div> and the ckeditor ends up being attached to everything else afterwards. -->
735 <!-- equivalent to gsf:text -->
736 <xsl:template name="documentNodeTextForEditing">
737 <!-- Section text -->
738 <xsl:for-each select="nodeContent">
739 <xsl:if test="not(node())"><gsf:space/></xsl:if>
740 <xsl:for-each select="node()">
741 <xsl:choose>
742 <xsl:when test="not(name())">
743 <xsl:value-of select="." disable-output-escaping="yes"/>
744 </xsl:when>
745 <xsl:otherwise>
746 <xsl:apply-templates/>
747 </xsl:otherwise>
748 </xsl:choose>
749 </xsl:for-each>
750 </xsl:for-each>
751 </xsl:template>
752
753 <!-- Used to produce a version of the page in a format that can be read by the realistic books plugin -->
754 <xsl:template name="documentNodeFlashXML">
755 <xsl:text disable-output-escaping="yes">
756 &lt;Section&gt;
757 &lt;Description&gt;
758 &lt;Metadata name="Title"&gt;
759 </xsl:text>
760 <xsl:value-of select="normalize-space(metadataList/metadata[@name = 'Title'])"/>
761 <xsl:text disable-output-escaping="yes">
762 &lt;/Metadata&gt;
763 &lt;/Description&gt;
764 </xsl:text>
765
766 <xsl:value-of select="normalize-space(nodeContent)" disable-output-escaping="yes"/>
767
768 <xsl:for-each select="documentNode">
769 <xsl:call-template name="documentNodeFlashXML"/>
770 </xsl:for-each>
771
772 <xsl:text disable-output-escaping="yes">
773 &lt;/Section&gt;
774 </xsl:text>
775 </xsl:template>
776
777 <xsl:template name="externalPage">
778 <xsl:param name="external"/>
779 <xsl:variable name="go_forward_link">
780 <a>
781 <xsl:attribute name="href">
782 <xsl:value-of select="$external"/>
783 </xsl:attribute>
784 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/>
785 </a>
786 </xsl:variable>
787 <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2>
788 <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/></p>
789 </xsl:template>
790
791 <xsl:template match="/page"><xsl:apply-templates select="/page/pageResponse/document"/></xsl:template> <!-- this to be deleted eventually -->
792
793 <xsl:template name="documentPre">
794 <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'">
795 <xsl:call-template name="mapFeatures"/>
796 </xsl:if>
797 </xsl:template>
798
799 <xsl:template name="mapFeatures">
800 <div id="map_canvas" class="map_canvas_full"><xsl:text> </xsl:text></div>
801
802 <xsl:choose>
803 <!-- HIERARCHICAL DOCUMENTS -->
804 <xsl:when test="count(//documentNode) > 0">
805 <xsl:for-each select="documentNode">
806 <xsl:call-template name="mapPlacesNearHere"/>
807 </xsl:for-each>
808 </xsl:when>
809 <!-- SIMPLE DOCUMENTS -->
810 <xsl:otherwise>
811 <xsl:call-template name="mapPlacesNearHere"/>
812 </xsl:otherwise>
813 </xsl:choose>
814
815 <div id="jsonNodes" style="display:none;">
816 <xsl:text>[</xsl:text>
817 <xsl:choose>
818 <!-- HIERARCHICAL DOCUMENTS -->
819 <xsl:when test="count(//documentNode) > 0">
820 <xsl:for-each select="//documentNode">
821 <xsl:if test="(metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']) or metadataList/metadata[@name = 'Coordinate'] or metadataList/metadata[@name = 'GPS.mapOverlay'] or metadataList/metadata[@name = 'descendants_GPS.mapOverlay']">
822 <xsl:text>{</xsl:text>
823 <xsl:text disable-output-escaping="yes">"nodeID":"</xsl:text><xsl:value-of select="@nodeID"/><xsl:text disable-output-escaping="yes">",</xsl:text>
824 <xsl:text disable-output-escaping="yes">"title":"</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Title']"/>
825 <xsl:text disable-output-escaping="yes">"</xsl:text>
826 <xsl:if test="metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']">
827 <xsl:text disable-output-escaping="yes">,</xsl:text>
828 <xsl:text disable-output-escaping="yes">"lat":</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Latitude']"/><xsl:text>,</xsl:text>
829 <xsl:text disable-output-escaping="yes">"lng":</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Longitude']"/>
830 </xsl:if>
831 <!--
832 <xsl:if test="metadataList/metadata[@name = 'Coordinate']">
833 <xsl:text disable-output-escaping="yes">,</xsl:text>
834 <xsl:text disable-output-escaping="yes">"coords":</xsl:text>
835 <xsl:text>[</xsl:text>
836 <xsl:for-each select="metadataList/metadata[@name = 'Coordinate']">
837 <xsl:text disable-output-escaping="yes">"</xsl:text>
838 <xsl:value-of disable-output-escaping="yes" select="current()"/>
839 <xsl:text disable-output-escaping="yes">"</xsl:text>
840 <xsl:text disable-output-escaping="yes">,</xsl:text>
841 </xsl:for-each>
842 <xsl:text>]</xsl:text>
843 </xsl:if>
844 -->
845 <xsl:if test="metadataList/metadata[@name = 'GPS.mapOverlay']">
846 <xsl:text disable-output-escaping="yes">,</xsl:text>
847 <xsl:text disable-output-escaping="yes">"mapoverlay":</xsl:text>
848 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'GPS.mapOverlay']"/>
849 </xsl:if>
850
851 <xsl:if test="metadataList/metadata[@name = 'descendants_GPS.mapOverlay']">
852 <xsl:variable name="count"><xsl:value-of select="count(metadataList/metadata[@name = 'descendants_GPS.mapOverlay'])"/></xsl:variable>
853 <xsl:text disable-output-escaping="yes">,</xsl:text>
854 <xsl:text disable-output-escaping="yes">"descendantsMapoverlays":[</xsl:text>
855 <xsl:for-each select="metadataList/metadata[@name = 'descendants_GPS.mapOverlay']">
856 <xsl:value-of disable-output-escaping="yes" select="current()"/>
857 <xsl:if test="not(position() = $count)">
858 <xsl:text disable-output-escaping="yes">,</xsl:text>
859 </xsl:if>
860 </xsl:for-each>
861 <xsl:text disable-output-escaping="yes">]</xsl:text>
862 </xsl:if>
863
864 <xsl:text>}</xsl:text>
865
866 <xsl:if test="not(position() = count(//documentNode))">
867 <xsl:text>,</xsl:text>
868 </xsl:if>
869
870 </xsl:if>
871 </xsl:for-each>
872 </xsl:when>
873 <!-- SIMPLE DOCUMENTS -->
874 <xsl:otherwise>
875 <xsl:for-each select="/page/pageResponse/document">
876 <xsl:if test="(metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']) or metadataList/metadata[@name = 'Coordinate'] or metadataList/metadata[@name = 'GPS.mapOverlay'] or metadataList/metadata[@name = 'descendants_GPS.mapOverlay']">
877 <xsl:text>{</xsl:text>
878 <xsl:text disable-output-escaping="yes">"nodeID":"</xsl:text><xsl:value-of select="@selectedNode"/><xsl:text disable-output-escaping="yes">",</xsl:text>
879 <xsl:text disable-output-escaping="yes">"title":"</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Title']"/>
880 <xsl:text disable-output-escaping="yes">"</xsl:text>
881 <xsl:if test="metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']">
882 <xsl:text disable-output-escaping="yes">,</xsl:text>
883 <xsl:text disable-output-escaping="yes">"lat":</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Latitude']"/><xsl:text>,</xsl:text>
884 <xsl:text disable-output-escaping="yes">"lng":</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Longitude']"/>
885 </xsl:if>
886 <!--
887 <xsl:if test="metadataList/metadata[@name = 'Coordinate']">
888 <xsl:text disable-output-escaping="yes">,</xsl:text>
889 <xsl:text disable-output-escaping="yes">"coords":</xsl:text>
890 <xsl:text>[</xsl:text>
891 <xsl:for-each select="metadataList/metadata[@name = 'Coordinate']">
892 <xsl:text disable-output-escaping="yes">"</xsl:text>
893 <xsl:value-of disable-output-escaping="yes" select="current()"/>
894 <xsl:text disable-output-escaping="yes">"</xsl:text>
895 <xsl:text disable-output-escaping="yes">,</xsl:text>
896 </xsl:for-each>
897 <xsl:text>]</xsl:text>
898 </xsl:if>
899 -->
900 <xsl:if test="metadataList/metadata[@name = 'GPS.mapOverlay']">
901 <xsl:text disable-output-escaping="yes">,</xsl:text>
902 <xsl:text disable-output-escaping="yes">"mapoverlay":</xsl:text>
903 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'GPS.mapOverlay']"/>
904 </xsl:if>
905
906 <xsl:if test="metadataList/metadata[@name = 'descendants_GPS.mapOverlay']">
907 <xsl:variable name="count"><xsl:value-of select="count(metadataList/metadata[@name = 'descendants_GPS.mapOverlay'])"/></xsl:variable>
908 <xsl:text disable-output-escaping="yes">,</xsl:text>
909 <xsl:text disable-output-escaping="yes">"descendantsMapoverlays":[</xsl:text>
910 <xsl:for-each select="metadataList/metadata[@name = 'descendants_GPS.mapOverlay']">
911 <xsl:value-of disable-output-escaping="yes" select="current()"/>
912 <xsl:if test="not(position() = $count)">
913 <xsl:text disable-output-escaping="yes">,</xsl:text>
914 </xsl:if>
915 </xsl:for-each>
916 <xsl:text disable-output-escaping="yes">]</xsl:text>
917 </xsl:if>
918
919 <xsl:text>}</xsl:text>
920 </xsl:if>
921 </xsl:for-each>
922 </xsl:otherwise>
923 </xsl:choose>
924 <xsl:text>]</xsl:text>
925 </div>
926
927 <!-- TODO: Why do we have to do this to see Coordinate meta appear in extraMetadataList on o=xml page, when Lat and Lng appear without doing the same???
928 Furthermore, map-tools.xsl already requests Coordinate meta, and map-tools.xsl is always included when format statement for collection in
929 search|browse|doc display view has mapEnabled=true -->
930 <gsf:metadata name="Coordinate" hidden="true"/>
931 <gsf:metadata name="GPS.mapOverlay" hidden="true"/>
932 <gsf:metadata name="GPS.mapOverlay" select="descendants" hidden="true"/>
933 </xsl:template>
934
935 <xsl:template name="mapPlacesNearHere">
936 <xsl:if test="metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']">
937 <div style="background:#BBFFBB; padding: 5px; margin:0px auto; width:890px;">
938 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.map_nearby_docs')"/>
939 <img id="nearbyDocumentsToggle" style="margin-left:5px;" src="interfaces/{$interface_name}/images/expand.png">
940 <xsl:attribute name="onclick">
941 <xsl:text>performDistanceSearch('</xsl:text>
942 <xsl:value-of select="@nodeID"/>
943 <xsl:text>', '</xsl:text>
944 <gsf:metadata name="Latitude"/>
945 <xsl:text>', '</xsl:text>
946 <gsf:metadata name="Longitude"/>
947 <xsl:text>', 2);</xsl:text>
948 </xsl:attribute>
949 </img>
950 <div id="nearbyDocuments"><xsl:text> </xsl:text></div>
951 </div>
952 </xsl:if>
953
954 <xsl:if test="metadataList/metadata[@name = 'Coordinate']">
955 <div style="background:#BBFFBB; padding: 5px; margin:0px auto; width:890px;">
956 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.map_nearby_docs')"/>
957 <xsl:for-each select="metadataList/metadata[@name = 'Coordinate']">
958
959 <xsl:variable name="coordinate"><xsl:value-of select="current()"/></xsl:variable>
960
961
962 <img id="nearbyDocumentsToggle" style="margin-left:5px;" src="interfaces/{$interface_name}/images/expand.png">
963 <xsl:attribute name="onclick">
964 <xsl:text>performDistanceSearchWithCoordinates('</xsl:text>
965 <xsl:value-of select="@nodeID"/>
966 <xsl:text>', '</xsl:text>
967 <xsl:value-of select="$coordinate"/><!--<gsf:metadata name="Coordinate"/>-->
968 <xsl:text>', 2);</xsl:text>
969 </xsl:attribute>
970 </img>
971 </xsl:for-each>
972 <div id="nearbyDocuments"><xsl:text> </xsl:text></div>
973 </div>
974 </xsl:if>
975 </xsl:template>
976</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.