[19856] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <xsl:stylesheet version="1.0"
|
---|
| 3 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
| 4 | xmlns:java="http://xml.apache.org/xslt/java"
|
---|
| 5 | xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
|
---|
| 6 | xmlns:gslib="http://www.greenstone.org/skinning"
|
---|
| 7 | xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
|
---|
| 8 | extension-element-prefixes="java util"
|
---|
| 9 | exclude-result-prefixes="java util gsf">
|
---|
| 10 |
|
---|
[23989] | 11 | <!-- use the 'main' layout -->
|
---|
| 12 | <xsl:import href="layouts/main.xsl"/>
|
---|
[25660] | 13 | <xsl:import href="layouts/toc.xsl"/>
|
---|
[31537] | 14 |
|
---|
| 15 | <!-- templates for adding user comments -->
|
---|
| 16 | <xsl:import href="layouts/usercomments.xsl"/>
|
---|
[23989] | 17 |
|
---|
| 18 | <xsl:variable name="bookswitch">
|
---|
| 19 | <xsl:choose>
|
---|
| 20 | <xsl:when test="/page/pageRequest/paramList/param[@name='book']/@value">
|
---|
| 21 | <xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/>
|
---|
| 22 | </xsl:when>
|
---|
| 23 | <xsl:otherwise>off</xsl:otherwise>
|
---|
| 24 | </xsl:choose>
|
---|
| 25 | </xsl:variable>
|
---|
[19856] | 26 |
|
---|
[26316] | 27 | <!-- optional cgi-params for links to document pages -->
|
---|
| 28 | <xsl:variable name="opt-doc-link-args"></xsl:variable>
|
---|
[19988] | 29 | <!-- set page title -->
|
---|
| 30 | <xsl:template name="pageTitle"><gslib:documentTitle/></xsl:template>
|
---|
[19856] | 31 |
|
---|
[19988] | 32 | <!-- set page breadcrumbs -->
|
---|
[23813] | 33 | <xsl:template name="breadcrumbs">
|
---|
| 34 | <gslib:siteLink/><gslib:rightArrow/>
|
---|
| 35 | <gslib:collectionNameLinked/><gslib:rightArrow/>
|
---|
| 36 | <a>
|
---|
| 37 | <xsl:attribute name="href">
|
---|
[25371] | 38 | <xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collName"/>/document/<xsl:value-of select="/page/pageResponse/document/documentNode[1]/@nodeID"/>
|
---|
[23813] | 39 | </xsl:attribute>
|
---|
| 40 | <xsl:variable name="documentTitleVar">
|
---|
| 41 | <gslib:documentTitle/>
|
---|
| 42 | </xsl:variable>
|
---|
[24009] | 43 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.document')"/>
|
---|
[23813] | 44 | </a>
|
---|
| 45 | </xsl:template>
|
---|
[23989] | 46 |
|
---|
| 47 | <xsl:template match="/">
|
---|
| 48 | <xsl:choose>
|
---|
| 49 | <!-- if this is the realistic books version of the page -->
|
---|
| 50 | <xsl:when test="$bookswitch = 'flashxml'">
|
---|
| 51 | <html>
|
---|
| 52 | <body>
|
---|
| 53 | <xsl:apply-templates select="/page/pageResponse/document"/>
|
---|
| 54 | </body>
|
---|
| 55 | </html>
|
---|
| 56 | </xsl:when>
|
---|
| 57 | <!-- if this is the regular version of the page -->
|
---|
| 58 | <xsl:otherwise>
|
---|
[25917] | 59 | <xsl:call-template name="mainTemplate"/>
|
---|
[23989] | 60 | </xsl:otherwise>
|
---|
| 61 | </xsl:choose>
|
---|
| 62 | </xsl:template>
|
---|
[24650] | 63 |
|
---|
[26020] | 64 | <xsl:template name="documentHeading">
|
---|
[29755] | 65 | <b><xsl:text> </xsl:text><gsf:metadata name="Title"/></b><br/>
|
---|
[26020] | 66 | </xsl:template>
|
---|
| 67 |
|
---|
| 68 | <xsl:template name="documentContent">
|
---|
[26298] | 69 | <div id="gs-document">
|
---|
| 70 | <xsl:call-template name="documentPre"/>
|
---|
| 71 | <xsl:call-template name="wrappedSectionImage"/>
|
---|
| 72 | <div id="gs-document-text">
|
---|
| 73 | <xsl:call-template name="documentNodeText"/>
|
---|
| 74 | </div>
|
---|
| 75 | </div>
|
---|
[30773] | 76 | </xsl:template>
|
---|
| 77 |
|
---|
[26175] | 78 | <xsl:template name="sectionHeading">
|
---|
[25936] | 79 | <xsl:call-template name="sectionTitle"/>
|
---|
| 80 | </xsl:template>
|
---|
| 81 |
|
---|
[26020] | 82 | <xsl:template name="topLevelSectionContent">
|
---|
| 83 | <xsl:call-template name="wrappedSectionImage"/>
|
---|
| 84 | <xsl:call-template name="wrappedSectionText"/>
|
---|
| 85 | </xsl:template>
|
---|
| 86 |
|
---|
| 87 | <xsl:template name="sectionContent">
|
---|
| 88 | <xsl:call-template name="wrappedSectionImage"/>
|
---|
| 89 | <xsl:call-template name="wrappedSectionText"/>
|
---|
| 90 | </xsl:template>
|
---|
| 91 |
|
---|
| 92 | <xsl:template name="wrappedSectionText">
|
---|
[29861] | 93 | <br /><br />
|
---|
[30020] | 94 | <div id="text{@nodeID}" class="sectionText"><!-- *** -->
|
---|
| 95 | <xsl:if test="/page/pageRequest/paramList/param[(@name='docEdit') and (@value='on' or @value='true' or @value='1')]">
|
---|
| 96 | <xsl:attribute name="contenteditable">
|
---|
| 97 | <xsl:text>true</xsl:text>
|
---|
| 98 | </xsl:attribute>
|
---|
| 99 | </xsl:if>
|
---|
[26020] | 100 | <xsl:attribute name="style">
|
---|
| 101 | <xsl:choose>
|
---|
| 102 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'view']/@value = 'image'">
|
---|
| 103 | <xsl:text>display:none;</xsl:text>
|
---|
| 104 | </xsl:when>
|
---|
| 105 | <xsl:otherwise>
|
---|
| 106 | <xsl:text>display:block;</xsl:text>
|
---|
| 107 | </xsl:otherwise>
|
---|
| 108 | </xsl:choose>
|
---|
| 109 | </xsl:attribute>
|
---|
| 110 |
|
---|
| 111 | <xsl:call-template name="documentNodeText"/>
|
---|
| 112 | </div>
|
---|
| 113 | </xsl:template>
|
---|
| 114 |
|
---|
| 115 | <xsl:template name="sectionImage">
|
---|
| 116 | <gsf:image type="screen"/>
|
---|
| 117 | </xsl:template>
|
---|
| 118 |
|
---|
[24650] | 119 | <!-- Used to make sure that regardless what the collection designer uses for the title and content we can wrap it properly -->
|
---|
| 120 | <!-- If editing, be aware that the Document Basket looks for specific classes that this template bakes in (key points marked with ***) -->
|
---|
| 121 | <xsl:template name="wrapDocumentNodes">
|
---|
[30478] | 122 | <xsl:variable name="nodeID" select="@nodeID"/>
|
---|
[25433] | 123 | <a name="{@nodeID}"><xsl:text> </xsl:text></a>
|
---|
[25936] | 124 |
|
---|
[25433] | 125 | <!-- Section header -->
|
---|
| 126 | <table class="sectionHeader"><tr>
|
---|
[25936] | 127 |
|
---|
[25433] | 128 | <!-- Expand/collapse button -->
|
---|
| 129 | <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'">
|
---|
| 130 | <td class="headerTD">
|
---|
| 131 | <img id="dtoggle{@nodeID}" onclick="toggleSection('{@nodeID}');" class="icon">
|
---|
| 132 | <xsl:attribute name="src">
|
---|
[25143] | 133 | <xsl:choose>
|
---|
[30478] | 134 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or util:oidIsMatchOrParent($nodeID, /page/pageResponse/document/@selectedNode)">
|
---|
[25433] | 135 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'collapse_image')"/>
|
---|
[25143] | 136 | </xsl:when>
|
---|
| 137 | <xsl:otherwise>
|
---|
[25433] | 138 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'expand_image')"/>
|
---|
[25143] | 139 | </xsl:otherwise>
|
---|
| 140 | </xsl:choose>
|
---|
| 141 | </xsl:attribute>
|
---|
[25433] | 142 | </img>
|
---|
| 143 | </td>
|
---|
| 144 | </xsl:if>
|
---|
[25936] | 145 |
|
---|
[25433] | 146 | <!-- Title -->
|
---|
| 147 | <td id="header{@nodeID}" class="headerTD sectionTitle"><!-- *** -->
|
---|
[25936] | 148 | <p>
|
---|
| 149 | <xsl:attribute name="class"><xsl:value-of select="util:hashToDepthClass(@nodeID)"/> sectionHeader</xsl:attribute>
|
---|
| 150 |
|
---|
| 151 | <xsl:if test="util:hashToSectionId(@nodeID)">
|
---|
| 152 | <span class="sectionNumberSpan">
|
---|
| 153 | <xsl:value-of select="util:hashToSectionId(@nodeID)"/>
|
---|
| 154 | <xsl:text> </xsl:text>
|
---|
| 155 | </span>
|
---|
| 156 | </xsl:if>
|
---|
| 157 | <!-- Display the title for the section regardless of whether automatic section numbering is turned on -->
|
---|
[26175] | 158 | <span><xsl:call-template name="sectionHeading"/></span>
|
---|
[25936] | 159 | </p>
|
---|
[25433] | 160 | </td>
|
---|
| 161 |
|
---|
| 162 | <!-- "back to top" link -->
|
---|
[26216] | 163 | <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'">
|
---|
[25433] | 164 | <td class="backToTop headerTD">
|
---|
| 165 | <a href="javascript:scrollToTop();">
|
---|
| 166 | <xsl:text disable-output-escaping="yes">▲</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.back_to_top')"/>
|
---|
| 167 | </a>
|
---|
| 168 | </td>
|
---|
| 169 | </xsl:if>
|
---|
| 170 | </tr></table>
|
---|
[25936] | 171 |
|
---|
[25433] | 172 | <div id="doc{@nodeID}"><!-- *** -->
|
---|
| 173 | <xsl:choose>
|
---|
| 174 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or /page/pageResponse/document/@selectedNode = @nodeID">
|
---|
| 175 | <xsl:attribute name="class">
|
---|
| 176 | <xsl:text>sectionContainer hasText</xsl:text>
|
---|
| 177 | </xsl:attribute>
|
---|
[25177] | 178 | <xsl:attribute name="style">
|
---|
[25433] | 179 | <xsl:text>display:block;</xsl:text>
|
---|
| 180 | </xsl:attribute>
|
---|
| 181 | </xsl:when>
|
---|
| 182 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or util:oidIsMatchOrParent(@nodeID, /page/pageResponse/document/@selectedNode)">
|
---|
| 183 | <xsl:attribute name="class">
|
---|
| 184 | <xsl:text>sectionContainer noText</xsl:text>
|
---|
| 185 | </xsl:attribute>
|
---|
| 186 | <xsl:attribute name="style">
|
---|
| 187 | <xsl:text>display:block;</xsl:text>
|
---|
| 188 | </xsl:attribute>
|
---|
| 189 | </xsl:when>
|
---|
| 190 | <xsl:otherwise>
|
---|
| 191 | <xsl:attribute name="class">
|
---|
| 192 | <xsl:text>sectionContainer noText</xsl:text>
|
---|
| 193 | </xsl:attribute>
|
---|
| 194 | <xsl:attribute name="style">
|
---|
| 195 | <xsl:text>display:none;</xsl:text>
|
---|
| 196 | </xsl:attribute>
|
---|
| 197 | </xsl:otherwise>
|
---|
| 198 | </xsl:choose>
|
---|
| 199 |
|
---|
[28274] | 200 | <xsl:if test="/page/pageRequest/userInformation and /page/pageRequest/userInformation/@editEnabled = 'true' and /page/pageRequest/paramList/param[@name='docEdit']/@value = '1' 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))">
|
---|
[25433] | 201 | <table id="meta{@nodeID}">
|
---|
| 202 | <xsl:attribute name="style">
|
---|
[25177] | 203 | <xsl:choose>
|
---|
[25433] | 204 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'dmd']/@value = 'true'">
|
---|
| 205 | <xsl:text>display:block;</xsl:text>
|
---|
[25177] | 206 | </xsl:when>
|
---|
| 207 | <xsl:otherwise>
|
---|
[25433] | 208 | <xsl:text>display:none;</xsl:text>
|
---|
[25177] | 209 | </xsl:otherwise>
|
---|
| 210 | </xsl:choose>
|
---|
| 211 | </xsl:attribute>
|
---|
[25433] | 212 | <xsl:value-of select="util:clearMetadataStorage()"/>
|
---|
| 213 | <xsl:for-each select="metadataList/metadata">
|
---|
| 214 | <xsl:sort select="@name"/>
|
---|
| 215 | <xsl:if test="util:checkMetadataNotDuplicate(@name, .)">
|
---|
| 216 | <tr>
|
---|
| 217 | <td class="metaTableCellName"><xsl:value-of select="@name"/></td>
|
---|
[31049] | 218 | <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>
|
---|
[25433] | 219 | </tr>
|
---|
| 220 | </xsl:if>
|
---|
| 221 | </xsl:for-each>
|
---|
| 222 | </table>
|
---|
| 223 | </xsl:if>
|
---|
[26020] | 224 | <xsl:choose>
|
---|
| 225 | <xsl:when test="../../document">
|
---|
| 226 | <xsl:call-template name="topLevelSectionContent"/>
|
---|
| 227 | </xsl:when>
|
---|
| 228 | <xsl:otherwise>
|
---|
| 229 | <xsl:call-template name="sectionContent"/>
|
---|
| 230 | </xsl:otherwise>
|
---|
| 231 | </xsl:choose>
|
---|
[25433] | 232 | <xsl:if test="documentNode">
|
---|
| 233 | <xsl:for-each select="documentNode">
|
---|
[24650] | 234 | <xsl:call-template name="wrapDocumentNodes"/>
|
---|
[25433] | 235 | </xsl:for-each>
|
---|
| 236 | </xsl:if>
|
---|
| 237 | </div>
|
---|
[24650] | 238 | </xsl:template>
|
---|
[19988] | 239 |
|
---|
[30345] | 240 | <xsl:template name="javascriptForDocumentView">
|
---|
| 241 | <script type="text/javascript" src="interfaces/{$interface_name}/js/document_scripts.js"><xsl:text> </xsl:text></script>
|
---|
[31416] | 242 | <script type="text/javascript">
|
---|
| 243 | <xsl:text disable-output-escaping="yes">
|
---|
| 244 | function goToAnchor(sectionID,anchor)
|
---|
| 245 | {
|
---|
| 246 | var docIdentifier = '</xsl:text><xsl:value-of select="//documentNode[@nodeType = 'root']/@nodeID"/><xsl:text disable-output-escaping="yes">';
|
---|
| 247 | focusAnchor(docIdentifier + "."+ sectionID,0,1,anchor);
|
---|
| 248 | }
|
---|
| 249 | </xsl:text>
|
---|
| 250 | </script>
|
---|
[30345] | 251 | </xsl:template>
|
---|
[29172] | 252 | <xsl:template name="javascriptForDocumentEditing">
|
---|
[31749] | 253 | <!-- <script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts.js"><xsl:text> </xsl:text></script>-->
|
---|
| 254 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentedit_scripts.js"><xsl:text> </xsl:text></script>
|
---|
| 255 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentedit_scripts_util.js"><xsl:text> </xsl:text></script>
|
---|
[30382] | 256 | <script type="text/javascript" src="interfaces/{$interface_name}/js/hierarchy.js"><xsl:text> </xsl:text></script>
|
---|
[25462] | 257 | <script type="text/javascript">
|
---|
| 258 | <xsl:text disable-output-escaping="yes">
|
---|
[30773] | 259 |
|
---|
[25462] | 260 | $(window).load(function()
|
---|
| 261 | {
|
---|
| 262 | if(gs.cgiParams.docEdit == "1")
|
---|
| 263 | {
|
---|
| 264 | readyPageForEditing();
|
---|
| 265 | }
|
---|
| 266 | });
|
---|
| 267 | </xsl:text>
|
---|
[30382] | 268 | <!-- download and process hierarchy files -->
|
---|
| 269 | <xsl:text disable-output-escaping="yes">$(document).ready(function(){</xsl:text>
|
---|
| 270 | <xsl:for-each select="//classifier[@hfile]">
|
---|
| 271 | <xsl:text disable-output-escaping="yes">downloadAndProcessHierarchyFile('</xsl:text>
|
---|
| 272 | <xsl:text>sites/localsite/collect/</xsl:text><xsl:value-of select="$collName"/><xsl:text>/etc/</xsl:text><xsl:value-of select="@hfile"/>
|
---|
| 273 | <xsl:text disable-output-escaping="yes">','</xsl:text><xsl:value-of select="@metadata"/><xsl:text disable-output-escaping="yes">');</xsl:text>
|
---|
| 274 | </xsl:for-each>
|
---|
| 275 | <xsl:text disable-output-escaping="yes">});</xsl:text>
|
---|
| 276 |
|
---|
[25462] | 277 | </script>
|
---|
[29172] | 278 |
|
---|
| 279 | </xsl:template>
|
---|
[24791] | 280 |
|
---|
[29172] | 281 | <!-- the page content -->
|
---|
| 282 | <xsl:template match="/page/pageResponse/document">
|
---|
| 283 | <xsl:if test="$bookswitch = 'off'">
|
---|
[30345] | 284 | <xsl:call-template name="javascriptForDocumentView"/>
|
---|
[30773] | 285 | <gslib:langfrag name="doc"/>
|
---|
[29172] | 286 | <xsl:if test="/page/pageResponse/collection[@name = $collName]/metadataList/metadata[@name = 'tidyoption'] = 'tidy'">
|
---|
| 287 | <script type="text/javascript">
|
---|
| 288 | <xsl:text disable-output-escaping="yes">
|
---|
| 289 | if(document.URL.indexOf("book=on") != -1)
|
---|
| 290 | {
|
---|
| 291 | loadBook();
|
---|
| 292 | }
|
---|
| 293 | </xsl:text>
|
---|
| 294 | </script>
|
---|
| 295 | </xsl:if>
|
---|
| 296 | </xsl:if>
|
---|
| 297 | <xsl:variable name="canDoEditing">
|
---|
| 298 | <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))">true</xsl:if>
|
---|
| 299 | </xsl:variable>
|
---|
| 300 | <xsl:if test="$canDoEditing = 'true'">
|
---|
| 301 | <xsl:call-template name="javascriptForDocumentEditing"/>
|
---|
| 302 | <gsf:metadata name="all"/>
|
---|
| 303 | <gslib:langfrag name="dse"/>
|
---|
[30773] | 304 | <gslib:langfrag name="de"/>
|
---|
[29172] | 305 | </xsl:if>
|
---|
| 306 |
|
---|
[23989] | 307 | <xsl:if test="$bookswitch = 'off'">
|
---|
[24018] | 308 | <div id="bookdiv" style="visibility:hidden; height:0px; display:inline;"><xsl:text> </xsl:text></div>
|
---|
| 309 |
|
---|
[29172] | 310 | <div id="float-anchor" style="width: 30%; min-width:180px; float:right; margin: 0 0 10px 20px;">
|
---|
[31749] | 311 | <xsl:if test="$canDoEditing = 'true'">
|
---|
[25371] | 312 | <xsl:call-template name="editBar"/>
|
---|
[25072] | 313 | </xsl:if>
|
---|
[24791] | 314 | <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'">
|
---|
[25371] | 315 | <xsl:call-template name="rightSidebar"/>
|
---|
[24650] | 316 | </xsl:if>
|
---|
[29440] | 317 | <!-- add in some text just in case nothing has been added to this div-->
|
---|
| 318 | <xsl:text> </xsl:text>
|
---|
[29172] | 319 | </div>
|
---|
[31752] | 320 | <xsl:if test="$canDoEditing = 'true'">
|
---|
| 321 | <script type="text/javascript">
|
---|
[29172] | 322 | if (keep_editing_controls_visible) {
|
---|
| 323 | $(function() {
|
---|
| 324 | moveScroller();
|
---|
| 325 | });
|
---|
| 326 | }
|
---|
| 327 | </script>
|
---|
[31752] | 328 | </xsl:if>
|
---|
[23989] | 329 | </xsl:if>
|
---|
| 330 |
|
---|
[19856] | 331 | <!-- display the document -->
|
---|
[23813] | 332 | <xsl:choose>
|
---|
[19856] | 333 | <xsl:when test="@external != ''">
|
---|
| 334 | <xsl:call-template name="externalPage">
|
---|
| 335 | <xsl:with-param name="external" select="@external"/>
|
---|
| 336 | </xsl:call-template>
|
---|
| 337 | </xsl:when>
|
---|
[23989] | 338 | <xsl:when test="$bookswitch = 'flashxml'">
|
---|
[25720] | 339 | <xsl:call-template name="documentNodeFlashXML"/>
|
---|
[23989] | 340 | </xsl:when>
|
---|
| 341 | <xsl:when test="$bookswitch = 'on'">
|
---|
[24018] | 342 | <div id="bookdiv" style="display:inline;"><xsl:text> </xsl:text></div>
|
---|
[24791] | 343 | <!-- *** in document-scripts.js *** -->
|
---|
[24467] | 344 | <script type="text/javascript">
|
---|
| 345 | <xsl:text disable-output-escaping="yes">
|
---|
| 346 | if(document.URL.indexOf("book=on") != -1)
|
---|
| 347 | {
|
---|
| 348 | loadBook();
|
---|
| 349 | }
|
---|
| 350 | </xsl:text>
|
---|
| 351 | </script>
|
---|
[23989] | 352 | </xsl:when>
|
---|
[29166] | 353 | <!-- 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-->
|
---|
| 354 | <!-- This is the first choice from wrappedDocument template-->
|
---|
| 355 | <xsl:when test="$canDoEditing = 'true' and /page/pageRequest/paramList/param[@name='docEdit']/@value = '1'">
|
---|
[30773] | 356 | <div id="gs-document" style="width: 67%">
|
---|
[29166] | 357 | <xsl:call-template name="documentPre"/>
|
---|
| 358 | <div id="gs-document-text" class="documenttext" collection="{/page/pageResponse/collection/@name}"><!-- *** -->
|
---|
[29525] | 359 | <xsl:choose>
|
---|
| 360 | <xsl:when test="@docType='simple'">
|
---|
| 361 | <xsl:call-template name="wrapDocumentNodes"/>
|
---|
| 362 | </xsl:when>
|
---|
| 363 | <xsl:otherwise>
|
---|
[29166] | 364 | <xsl:for-each select="documentNode">
|
---|
| 365 | <xsl:call-template name="wrapDocumentNodes"/>
|
---|
| 366 | </xsl:for-each>
|
---|
[29525] | 367 | </xsl:otherwise>
|
---|
| 368 | </xsl:choose>
|
---|
[29166] | 369 | </div>
|
---|
| 370 | </div>
|
---|
| 371 | </xsl:when>
|
---|
[25837] | 372 | <xsl:when test="@docType='simple'">
|
---|
| 373 | <xsl:call-template name="documentHeading"/><br/>
|
---|
| 374 | <xsl:call-template name="documentContent"/>
|
---|
[31537] | 375 | <br /><xsl:call-template name="userCommentsSection"/>
|
---|
[29172] | 376 | </xsl:when>
|
---|
[25837] | 377 | <xsl:otherwise> <!-- display the standard greenstone document -->
|
---|
[26298] | 378 | <xsl:call-template name="wrappedDocument"/>
|
---|
[31540] | 379 | <br /><xsl:call-template name="userCommentsSection"/>
|
---|
[25837] | 380 | </xsl:otherwise>
|
---|
| 381 | </xsl:choose>
|
---|
| 382 | </xsl:template>
|
---|
[25949] | 383 |
|
---|
[25824] | 384 | <xsl:template name="wrappedDocument">
|
---|
[25837] | 385 | <xsl:choose>
|
---|
[25936] | 386 | <!-- NOTE: alb = ajax load bypass -->
|
---|
[26205] | 387 | <!--
|
---|
[31534] | 388 | If we have asked for expanded document, then do this.
|
---|
| 389 | OR If the docType is hierarchy and we want to bypass the ajax load then do this
|
---|
| 390 | OR If the docType is hierarchy and we have asked for the top level document then do this
|
---|
[26205] | 391 | -->
|
---|
[31534] | 392 | <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, '.')))))">
|
---|
[25837] | 393 | <div id="gs-document">
|
---|
| 394 | <xsl:call-template name="documentPre"/>
|
---|
| 395 | <div id="gs-document-text" class="documenttext" collection="{/page/pageResponse/collection/@name}"><!-- *** -->
|
---|
| 396 | <xsl:for-each select="documentNode">
|
---|
| 397 | <xsl:call-template name="wrapDocumentNodes"/>
|
---|
| 398 | </xsl:for-each>
|
---|
| 399 | </div>
|
---|
| 400 | </div>
|
---|
| 401 | </xsl:when>
|
---|
[25972] | 402 | <xsl:when test="/page/pageResponse/document/@docType = 'paged' or /page/pageResponse/document/@docType = 'pagedhierarchy'">
|
---|
[25936] | 403 | <div id="gs-document">
|
---|
| 404 | <div id="tocLoadingImage" style="text-align:center;">
|
---|
| 405 | <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>
|
---|
| 406 | </div>
|
---|
| 407 | </div>
|
---|
| 408 | <script type="text/javascript">
|
---|
| 409 | <xsl:text disable-output-escaping="yes">
|
---|
| 410 | $(window).load(function()
|
---|
| 411 | {
|
---|
[26296] | 412 | var sectionID = gs.cgiParams.d;
|
---|
| 413 | var callbackFunction = null;
|
---|
| 414 | if(sectionID.indexOf("\\.") == -1)
|
---|
| 415 | {
|
---|
| 416 | callbackFunction = function()
|
---|
| 417 | {
|
---|
| 418 | focusSection(sectionID);
|
---|
| 419 | };
|
---|
| 420 | }
|
---|
| 421 |
|
---|
| 422 | var docID = sectionID.replace(/([^.]*)\..*/, "$1");
|
---|
| 423 | var url = gs.xsltParams.library_name + "?a=d&c=" + gs.cgiParams.c + "&excerptid=gs-document&dt=hierarchy&d=" + docID;
|
---|
| 424 | loadTopLevelPage(callbackFunction, url);
|
---|
[25936] | 425 | });
|
---|
| 426 | </xsl:text>
|
---|
| 427 | </script>
|
---|
| 428 | </xsl:when>
|
---|
[25837] | 429 | <xsl:otherwise>
|
---|
| 430 | <div id="gs-document">
|
---|
| 431 | <div id="tocLoadingImage" style="text-align:center;">
|
---|
| 432 | <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>
|
---|
| 433 | </div>
|
---|
| 434 | </div>
|
---|
| 435 | <script type="text/javascript">
|
---|
| 436 | <xsl:text disable-output-escaping="yes">
|
---|
| 437 | $(window).load(function()
|
---|
| 438 | {
|
---|
| 439 | loadTopLevelPage(function()
|
---|
| 440 | {
|
---|
| 441 | //Don't focus the section until the table of contents is loaded
|
---|
| 442 | var tocCheck = function()
|
---|
[25371] | 443 | {
|
---|
[25837] | 444 | if(gs.variables.tocLoaded)
|
---|
[25371] | 445 | {
|
---|
[25837] | 446 | focusSection("</xsl:text><xsl:value-of select="/page/pageResponse/document/@selectedNode"/><xsl:text disable-output-escaping="yes">");
|
---|
| 447 | }
|
---|
| 448 | else
|
---|
| 449 | {
|
---|
| 450 | setTimeout(tocCheck, 500);
|
---|
| 451 | }
|
---|
| 452 | }
|
---|
| 453 | tocCheck();
|
---|
| 454 | });
|
---|
| 455 | });
|
---|
| 456 | </xsl:text>
|
---|
| 457 | </script>
|
---|
| 458 | </xsl:otherwise>
|
---|
[19856] | 459 | </xsl:choose>
|
---|
[24791] | 460 |
|
---|
[19856] | 461 | <div class="clear"><xsl:text> </xsl:text></div>
|
---|
[23989] | 462 | </xsl:template>
|
---|
| 463 |
|
---|
[25371] | 464 | <xsl:template name="editBar">
|
---|
[29172] | 465 | <table style="width:100%; border:none;" id="editBar" class="ui-widget-content"><tr>
|
---|
[25371] | 466 | <td id="editBarLeft" style="width:70%"><xsl:text> </xsl:text></td>
|
---|
| 467 | <td id="editBarRight">
|
---|
| 468 | <div style="text-align:center;">
|
---|
[30097] | 469 | <!-- edit structure button -->
|
---|
| 470 | <!-- comment this out as its not working -->
|
---|
| 471 | <!-- <div style="margin:5px;" class="ui-state-default ui-corner-all">
|
---|
[30773] | 472 | <a style="padding: 3px; text-decoration:none;" href="{$library_name}?a=g&sa=documentbasket&c=&s=DisplayDocumentList&rt=r&p.c={/page/pageResponse/collection/@name}&docToEdit={/page/pageResponse/document/documentNode/@nodeID}"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'dse.edit_structure')"/></a>
|
---|
[30097] | 473 | </div>-->
|
---|
| 474 | <!-- edit content button -->
|
---|
[25371] | 475 | <div style="margin:5px;" class="ui-state-default ui-corner-all">
|
---|
[25462] | 476 | <a id="editContentButton" style="padding: 3px; text-decoration:none;">
|
---|
| 477 | <xsl:attribute name="href">
|
---|
| 478 | <xsl:value-of select="$library_name"/>
|
---|
| 479 | <xsl:text>/collection/</xsl:text>
|
---|
| 480 | <xsl:value-of select="$collName"/>
|
---|
| 481 | <xsl:text>/document/</xsl:text>
|
---|
[26140] | 482 | <xsl:choose>
|
---|
| 483 | <xsl:when test="count(//documentNode) > 0">
|
---|
| 484 | <xsl:value-of select="/page/pageResponse/document/documentNode/@nodeID"/>
|
---|
| 485 | </xsl:when>
|
---|
| 486 | <xsl:otherwise>
|
---|
| 487 | <xsl:value-of select="/page/pageResponse/document/@nodeID"/>
|
---|
| 488 | </xsl:otherwise>
|
---|
| 489 | </xsl:choose>
|
---|
[25462] | 490 | <xsl:if test="not(/page/pageRequest/paramList/param[@name = 'docEdit']/@value = '1')">
|
---|
[29166] | 491 | <xsl:text>?ed=1&docEdit=1</xsl:text>
|
---|
[25462] | 492 | </xsl:if>
|
---|
| 493 | </xsl:attribute>
|
---|
| 494 | <xsl:choose>
|
---|
| 495 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'docEdit']/@value = '1'">
|
---|
[30773] | 496 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'de.hide_editor')"/>
|
---|
[25462] | 497 | </xsl:when>
|
---|
| 498 | <xsl:otherwise>
|
---|
[30773] | 499 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'de.edit_content')"/>
|
---|
[25462] | 500 | </xsl:otherwise>
|
---|
| 501 | </xsl:choose>
|
---|
| 502 | </a>
|
---|
[25371] | 503 | </div>
|
---|
| 504 | </div>
|
---|
| 505 | </td>
|
---|
| 506 | </tr></table>
|
---|
[25720] | 507 | <gslib:langfrag name="dse"/>
|
---|
[25371] | 508 | </xsl:template>
|
---|
| 509 |
|
---|
[23989] | 510 | <!-- Highlight annotations if requested -->
|
---|
[25720] | 511 | <xsl:template name="displayAnnotation">
|
---|
[23989] | 512 | <xsl:choose>
|
---|
[31248] | 513 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'hl']/@value = 'off' or /page/pageResponse/format[@type='display']/gsf:option[@name='disableSearchTermHighlighting']/@value='true'">
|
---|
[29399] | 514 | <span class="noTermHighlight"><xsl:value-of select="."/></span>
|
---|
[23989] | 515 | </xsl:when>
|
---|
| 516 | <xsl:otherwise>
|
---|
[29399] | 517 | <span class="termHighlight"><xsl:value-of select="."/></span>
|
---|
[23989] | 518 | </xsl:otherwise>
|
---|
| 519 | </xsl:choose>
|
---|
| 520 | </xsl:template>
|
---|
[25660] | 521 |
|
---|
[24650] | 522 | <!-- The default template for displaying section titles -->
|
---|
[25720] | 523 | <xsl:template name="sectionTitle">
|
---|
[24650] | 524 | <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Title']"/>
|
---|
| 525 | </xsl:template>
|
---|
| 526 |
|
---|
[26020] | 527 | <xsl:template name="wrappedSectionImage">
|
---|
[25433] | 528 | <gsf:variable name="screenImageWidth"><gsf:metadata name="ScreenWidth"/></gsf:variable>
|
---|
| 529 | <gsf:variable name="screenImageHeight"><gsf:metadata name="ScreenHeight"/></gsf:variable>
|
---|
| 530 | <gsf:variable name="imageWidth"><gsf:metadata name="ImageWidth"/></gsf:variable>
|
---|
| 531 | <gsf:variable name="imageHeight"><gsf:metadata name="ImageHeight"/></gsf:variable>
|
---|
| 532 |
|
---|
| 533 | <xsl:choose>
|
---|
[28164] | 534 | <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')">
|
---|
[25936] | 535 | <div id="image{@nodeID}">
|
---|
| 536 | <div id="wrap{util:replace(@nodeID, '.', '_')}" class="zoomImage" style="position:relative; width: {$screenImageWidth}px; height: {$screenImageHeight}px;">
|
---|
| 537 | <div id="small{util:replace(@nodeID, '.', '_')}" style="position:relative; width: {$screenImageWidth}px; height: {$screenImageHeight}px;">
|
---|
[28622] | 538 | <gsf:link type="source"><gsf:image type="screen"/></gsf:link>
|
---|
[25433] | 539 | </div>
|
---|
[26408] | 540 | <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;">
|
---|
| 541 | <div id="overlay{util:replace(@nodeID, '.', '_')}" style="width: 600px; height: 600px; position: absolute; top: 0; left: 0; z-index: 200;">
|
---|
[25936] | 542 | <xsl:text> </xsl:text>
|
---|
| 543 | </div>
|
---|
| 544 | <div id="large{util:replace(@nodeID, '.', '_')}" style="position: relative; width: {$imageWidth}px; height: {$imageHeight}px;">
|
---|
[28622] | 545 | <gsf:link type="source"><gsf:image type="source"/></gsf:link>
|
---|
[25936] | 546 | </div>
|
---|
[25433] | 547 | </div>
|
---|
| 548 | </div>
|
---|
[25936] | 549 | <script type="text/javascript">
|
---|
| 550 | <xsl:text disable-output-escaping="yes">
|
---|
| 551 | {
|
---|
| 552 | var nodeID = "</xsl:text><xsl:value-of select="@nodeID"/><xsl:text disable-output-escaping="yes">";
|
---|
| 553 | nodeID = nodeID.replace(/\./g, "_");
|
---|
[25462] | 554 |
|
---|
[25936] | 555 | var bigHeight = </xsl:text><xsl:value-of select="$imageHeight"/><xsl:text disable-output-escaping="yes">;
|
---|
| 556 | var smallHeight = </xsl:text><xsl:value-of select="$screenImageHeight"/><xsl:text disable-output-escaping="yes">;
|
---|
[25462] | 557 |
|
---|
[25936] | 558 | var multiplier = bigHeight / smallHeight;
|
---|
[25433] | 559 |
|
---|
[25936] | 560 | $("#wrap" + nodeID).anythingZoomer({
|
---|
| 561 | smallArea: "#small" + nodeID,
|
---|
| 562 | largeArea: "#large" + nodeID,
|
---|
| 563 | zoomPort: "#overlay" + nodeID,
|
---|
| 564 | mover: "#mover" + nodeID,
|
---|
| 565 | expansionSize:50,
|
---|
| 566 | speedMultiplier:multiplier
|
---|
| 567 | });
|
---|
[26024] | 568 |
|
---|
[29321] | 569 | $("#zoomOptions input").prop("checked", false);
|
---|
[29441] | 570 | $("#zoomOptions").css("display", "");
|
---|
[25936] | 571 | }
|
---|
| 572 | </xsl:text>
|
---|
| 573 | </script>
|
---|
| 574 | </div>
|
---|
[25433] | 575 | </xsl:when>
|
---|
[26020] | 576 | <xsl:otherwise>
|
---|
[25433] | 577 | <div id="image{@nodeID}">
|
---|
| 578 | <xsl:attribute name="style">
|
---|
| 579 | <xsl:choose>
|
---|
| 580 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'view']/@value = 'text'">
|
---|
| 581 | <xsl:text>display:none;</xsl:text>
|
---|
| 582 | </xsl:when>
|
---|
| 583 | <xsl:otherwise>
|
---|
| 584 | <xsl:text>display:block;</xsl:text>
|
---|
| 585 | </xsl:otherwise>
|
---|
| 586 | </xsl:choose>
|
---|
| 587 | </xsl:attribute>
|
---|
[26020] | 588 | <xsl:call-template name="sectionImage"/><xsl:text> </xsl:text>
|
---|
[25433] | 589 | </div>
|
---|
[26020] | 590 | </xsl:otherwise>
|
---|
[25433] | 591 | </xsl:choose>
|
---|
| 592 | </xsl:template>
|
---|
[25837] | 593 |
|
---|
[25824] | 594 | <!-- The default template for displaying the document node text -->
|
---|
[25837] | 595 | <!-- equivalent to gsf:text -->
|
---|
[25824] | 596 | <xsl:template name="documentNodeText">
|
---|
[25433] | 597 | <!-- Hides the "This document has no text." message -->
|
---|
| 598 | <xsl:variable name="noText"><gsf:metadata name="NoText"/></xsl:variable>
|
---|
[28622] | 599 | <xsl:choose>
|
---|
| 600 | <xsl:when test="not($noText = '1')">
|
---|
| 601 |
|
---|
[25837] | 602 | <!-- Section text -->
|
---|
| 603 | <xsl:for-each select="nodeContent">
|
---|
| 604 | <xsl:for-each select="node()">
|
---|
| 605 | <xsl:choose>
|
---|
| 606 | <xsl:when test="not(name())">
|
---|
[30478] | 607 | <xsl:value-of select="." disable-output-escaping="yes"/>
|
---|
[25837] | 608 | </xsl:when>
|
---|
| 609 | <xsl:when test="name() = 'annotation'">
|
---|
| 610 | <xsl:call-template name="displayAnnotation"/>
|
---|
| 611 | </xsl:when>
|
---|
| 612 | <xsl:otherwise>
|
---|
| 613 | <xsl:apply-templates/>
|
---|
| 614 | </xsl:otherwise>
|
---|
| 615 | </xsl:choose>
|
---|
| 616 | </xsl:for-each>
|
---|
[23989] | 617 | </xsl:for-each>
|
---|
[28622] | 618 | </xsl:when>
|
---|
| 619 | <xsl:when test="$noText = '1' and not(metadataList/metadata[@name='Image'])">
|
---|
| 620 | <gsf:link type="source"><gsf:metadata name="Source"/></gsf:link>
|
---|
| 621 | </xsl:when>
|
---|
| 622 | </xsl:choose>
|
---|
| 623 | <xsl:text> </xsl:text>
|
---|
[19856] | 624 | </xsl:template>
|
---|
[25824] | 625 |
|
---|
[23989] | 626 | <!-- Used to produce a version of the page in a format that can be read by the realistic books plugin -->
|
---|
[25720] | 627 | <xsl:template name="documentNodeFlashXML">
|
---|
[23989] | 628 | <xsl:text disable-output-escaping="yes">
|
---|
| 629 | <Section>
|
---|
| 630 | <Description>
|
---|
| 631 | <Metadata name="Title">
|
---|
| 632 | </xsl:text>
|
---|
| 633 | <xsl:value-of select="normalize-space(metadataList/metadata[@name = 'Title'])"/>
|
---|
| 634 | <xsl:text disable-output-escaping="yes">
|
---|
| 635 | </Metadata>
|
---|
| 636 | </Description>
|
---|
| 637 | </xsl:text>
|
---|
| 638 |
|
---|
| 639 | <xsl:value-of select="normalize-space(nodeContent)" disable-output-escaping="yes"/>
|
---|
| 640 |
|
---|
[25660] | 641 | <xsl:for-each select="documentNode">
|
---|
[25720] | 642 | <xsl:call-template name="documentNodeFlashXML"/>
|
---|
[25660] | 643 | </xsl:for-each>
|
---|
[23989] | 644 |
|
---|
| 645 | <xsl:text disable-output-escaping="yes">
|
---|
| 646 | </Section>
|
---|
| 647 | </xsl:text>
|
---|
| 648 | </xsl:template>
|
---|
| 649 |
|
---|
[23813] | 650 | <xsl:template name="externalPage">
|
---|
| 651 | <xsl:param name="external"/>
|
---|
| 652 | <xsl:variable name="go_forward_link">
|
---|
| 653 | <a>
|
---|
| 654 | <xsl:attribute name="href">
|
---|
| 655 | <xsl:value-of select="$external"/>
|
---|
| 656 | </xsl:attribute>
|
---|
| 657 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/>
|
---|
| 658 | </a>
|
---|
| 659 | </xsl:variable>
|
---|
| 660 | <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2>
|
---|
| 661 | <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/></p>
|
---|
| 662 | </xsl:template>
|
---|
[19856] | 663 |
|
---|
| 664 | <xsl:template match="/page"><xsl:apply-templates select="/page/pageResponse/document"/></xsl:template> <!-- this to be deleted eventually -->
|
---|
[23989] | 665 |
|
---|
[25371] | 666 | <xsl:template name="documentPre">
|
---|
[24996] | 667 | <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'">
|
---|
| 668 | <xsl:call-template name="mapFeatures"/>
|
---|
| 669 | </xsl:if>
|
---|
| 670 | </xsl:template>
|
---|
| 671 |
|
---|
| 672 | <xsl:template name="mapFeatures">
|
---|
[25462] | 673 | <div id="map_canvas" class="map_canvas_full"><xsl:text> </xsl:text></div>
|
---|
[24996] | 674 |
|
---|
[26178] | 675 | <xsl:choose>
|
---|
| 676 | <!-- HIERARCHICAL DOCUMENTS -->
|
---|
| 677 | <xsl:when test="count(//documentNode) > 0">
|
---|
| 678 | <xsl:for-each select="documentNode">
|
---|
| 679 | <xsl:call-template name="mapPlacesNearHere"/>
|
---|
| 680 | </xsl:for-each>
|
---|
| 681 | </xsl:when>
|
---|
| 682 | <!-- SIMPLE DOCUMENTS -->
|
---|
| 683 | <xsl:otherwise>
|
---|
| 684 | <xsl:call-template name="mapPlacesNearHere"/>
|
---|
| 685 | </xsl:otherwise>
|
---|
| 686 | </xsl:choose>
|
---|
[24996] | 687 |
|
---|
| 688 | <div id="jsonNodes" style="display:none;">
|
---|
| 689 | <xsl:text>[</xsl:text>
|
---|
[26139] | 690 | <xsl:choose>
|
---|
| 691 | <!-- HIERARCHICAL DOCUMENTS -->
|
---|
| 692 | <xsl:when test="count(//documentNode) > 0">
|
---|
| 693 | <xsl:for-each select="//documentNode">
|
---|
| 694 | <xsl:if test="metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']">
|
---|
| 695 | <xsl:text>{</xsl:text>
|
---|
| 696 | <xsl:text disable-output-escaping="yes">"nodeID":"</xsl:text><xsl:value-of select="@nodeID"/><xsl:text disable-output-escaping="yes">",</xsl:text>
|
---|
| 697 | <xsl:text disable-output-escaping="yes">"title":"</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Title']"/><xsl:text disable-output-escaping="yes">",</xsl:text>
|
---|
| 698 | <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>
|
---|
| 699 | <xsl:text disable-output-escaping="yes">"lng":</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Longitude']"/>
|
---|
| 700 | <xsl:text>}</xsl:text>
|
---|
| 701 | <xsl:if test="not(position() = count(//documentNode))">
|
---|
| 702 | <xsl:text>,</xsl:text>
|
---|
| 703 | </xsl:if>
|
---|
| 704 | </xsl:if>
|
---|
| 705 | </xsl:for-each>
|
---|
| 706 | </xsl:when>
|
---|
| 707 | <!-- SIMPLE DOCUMENTS -->
|
---|
| 708 | <xsl:otherwise>
|
---|
| 709 | <xsl:for-each select="/page/pageResponse/document">
|
---|
| 710 | <xsl:if test="metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']">
|
---|
| 711 | <xsl:text>{</xsl:text>
|
---|
| 712 | <xsl:text disable-output-escaping="yes">"nodeID":"</xsl:text><xsl:value-of select="@selectedNode"/><xsl:text disable-output-escaping="yes">",</xsl:text>
|
---|
| 713 | <xsl:text disable-output-escaping="yes">"title":"</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Title']"/><xsl:text disable-output-escaping="yes">",</xsl:text>
|
---|
| 714 | <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>
|
---|
| 715 | <xsl:text disable-output-escaping="yes">"lng":</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Longitude']"/>
|
---|
| 716 | <xsl:text>}</xsl:text>
|
---|
| 717 | </xsl:if>
|
---|
| 718 | </xsl:for-each>
|
---|
| 719 | </xsl:otherwise>
|
---|
| 720 | </xsl:choose>
|
---|
[24996] | 721 | <xsl:text>]</xsl:text>
|
---|
| 722 | </div>
|
---|
| 723 | </xsl:template>
|
---|
[26178] | 724 |
|
---|
| 725 | <xsl:template name="mapPlacesNearHere">
|
---|
| 726 | <xsl:if test="metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']">
|
---|
| 727 | <div style="background:#BBFFBB; padding: 5px; margin:0px auto; width:890px;">
|
---|
[30773] | 728 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.map_nearby_docs')"/>
|
---|
[26178] | 729 | <img id="nearbyDocumentsToggle" style="margin-left:5px;" src="interfaces/{$interface_name}/images/expand.png">
|
---|
| 730 | <xsl:attribute name="onclick">
|
---|
| 731 | <xsl:text>performDistanceSearch('</xsl:text>
|
---|
| 732 | <xsl:value-of select="@nodeID"/>
|
---|
| 733 | <xsl:text>', '</xsl:text>
|
---|
| 734 | <gsf:metadata name="Latitude"/>
|
---|
| 735 | <xsl:text>', '</xsl:text>
|
---|
| 736 | <gsf:metadata name="Longitude"/>
|
---|
| 737 | <xsl:text>', 2);</xsl:text>
|
---|
| 738 | </xsl:attribute>
|
---|
| 739 | </img>
|
---|
| 740 | <div id="nearbyDocuments"><xsl:text> </xsl:text></div>
|
---|
| 741 | </div>
|
---|
| 742 | </xsl:if>
|
---|
| 743 | </xsl:template>
|
---|
[19856] | 744 | </xsl:stylesheet>
|
---|