[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"/>
|
---|
[23989] | 14 |
|
---|
| 15 | <xsl:variable name="bookswitch">
|
---|
| 16 | <xsl:choose>
|
---|
| 17 | <xsl:when test="/page/pageRequest/paramList/param[@name='book']/@value">
|
---|
| 18 | <xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/>
|
---|
| 19 | </xsl:when>
|
---|
| 20 | <xsl:otherwise>off</xsl:otherwise>
|
---|
| 21 | </xsl:choose>
|
---|
| 22 | </xsl:variable>
|
---|
[19856] | 23 |
|
---|
[19988] | 24 | <!-- set page title -->
|
---|
| 25 | <xsl:template name="pageTitle"><gslib:documentTitle/></xsl:template>
|
---|
[19856] | 26 |
|
---|
[19988] | 27 | <!-- set page breadcrumbs -->
|
---|
[23813] | 28 | <xsl:template name="breadcrumbs">
|
---|
| 29 | <gslib:siteLink/><gslib:rightArrow/>
|
---|
| 30 | <gslib:collectionNameLinked/><gslib:rightArrow/>
|
---|
| 31 | <a>
|
---|
| 32 | <xsl:attribute name="href">
|
---|
[25371] | 33 | <xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collName"/>/document/<xsl:value-of select="/page/pageResponse/document/documentNode[1]/@nodeID"/>
|
---|
[23813] | 34 | </xsl:attribute>
|
---|
| 35 | <xsl:variable name="documentTitleVar">
|
---|
| 36 | <gslib:documentTitle/>
|
---|
| 37 | </xsl:variable>
|
---|
[24009] | 38 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.document')"/>
|
---|
[23813] | 39 | </a>
|
---|
| 40 | </xsl:template>
|
---|
[23989] | 41 |
|
---|
| 42 | <xsl:template match="/">
|
---|
| 43 | <xsl:choose>
|
---|
| 44 | <!-- if this is the realistic books version of the page -->
|
---|
| 45 | <xsl:when test="$bookswitch = 'flashxml'">
|
---|
| 46 | <html>
|
---|
| 47 | <body>
|
---|
| 48 | <xsl:apply-templates select="/page/pageResponse/document"/>
|
---|
| 49 | </body>
|
---|
| 50 | </html>
|
---|
| 51 | </xsl:when>
|
---|
| 52 | <!-- if this is the regular version of the page -->
|
---|
| 53 | <xsl:otherwise>
|
---|
[25917] | 54 | <xsl:call-template name="mainTemplate"/>
|
---|
[23989] | 55 | </xsl:otherwise>
|
---|
| 56 | </xsl:choose>
|
---|
| 57 | </xsl:template>
|
---|
[24650] | 58 |
|
---|
[26020] | 59 | <xsl:template name="documentHeading">
|
---|
| 60 | <b><gsf:metadata name="Title"/></b><br/>
|
---|
| 61 | </xsl:template>
|
---|
| 62 |
|
---|
| 63 | <xsl:template name="documentContent">
|
---|
| 64 | <xsl:choose>
|
---|
| 65 | <xsl:when test="@docType='simple'">
|
---|
| 66 | <div id="gs-document">
|
---|
[26139] | 67 | <xsl:call-template name="documentPre"/>
|
---|
[26020] | 68 | <xsl:call-template name="wrappedSectionImage"/>
|
---|
| 69 | <div id="gs-document-text">
|
---|
| 70 | <xsl:call-template name="documentNodeText"/>
|
---|
| 71 | </div>
|
---|
| 72 | </div>
|
---|
| 73 | </xsl:when>
|
---|
| 74 | <xsl:otherwise>
|
---|
| 75 | <xsl:call-template name="wrappedDocument"/>
|
---|
| 76 | </xsl:otherwise>
|
---|
| 77 | </xsl:choose>
|
---|
| 78 | </xsl:template>
|
---|
| 79 |
|
---|
[26175] | 80 | <xsl:template name="sectionHeading">
|
---|
[25936] | 81 | <xsl:call-template name="sectionTitle"/>
|
---|
| 82 | </xsl:template>
|
---|
| 83 |
|
---|
[26020] | 84 | <xsl:template name="topLevelSectionContent">
|
---|
| 85 | <xsl:call-template name="wrappedSectionImage"/>
|
---|
| 86 | <xsl:call-template name="wrappedSectionText"/>
|
---|
| 87 | </xsl:template>
|
---|
| 88 |
|
---|
| 89 | <xsl:template name="sectionContent">
|
---|
| 90 | <xsl:call-template name="wrappedSectionImage"/>
|
---|
| 91 | <xsl:call-template name="wrappedSectionText"/>
|
---|
| 92 | </xsl:template>
|
---|
| 93 |
|
---|
| 94 | <xsl:template name="wrappedSectionText">
|
---|
| 95 | <div id="text{@nodeID}" class="sectionText"><!-- *** -->
|
---|
| 96 | <xsl:attribute name="style">
|
---|
| 97 | <xsl:choose>
|
---|
| 98 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'view']/@value = 'image'">
|
---|
| 99 | <xsl:text>display:none;</xsl:text>
|
---|
| 100 | </xsl:when>
|
---|
| 101 | <xsl:otherwise>
|
---|
| 102 | <xsl:text>display:block;</xsl:text>
|
---|
| 103 | </xsl:otherwise>
|
---|
| 104 | </xsl:choose>
|
---|
| 105 | </xsl:attribute>
|
---|
| 106 |
|
---|
| 107 | <xsl:call-template name="documentNodeText"/>
|
---|
| 108 | </div>
|
---|
| 109 | </xsl:template>
|
---|
| 110 |
|
---|
| 111 | <xsl:template name="sectionImage">
|
---|
| 112 | <gsf:image type="screen"/>
|
---|
| 113 | </xsl:template>
|
---|
| 114 |
|
---|
[24650] | 115 | <!-- Used to make sure that regardless what the collection designer uses for the title and content we can wrap it properly -->
|
---|
| 116 | <!-- If editing, be aware that the Document Basket looks for specific classes that this template bakes in (key points marked with ***) -->
|
---|
| 117 | <xsl:template name="wrapDocumentNodes">
|
---|
[25433] | 118 | <a name="{@nodeID}"><xsl:text> </xsl:text></a>
|
---|
[25936] | 119 |
|
---|
[25433] | 120 | <!-- Section header -->
|
---|
| 121 | <table class="sectionHeader"><tr>
|
---|
[25936] | 122 |
|
---|
[25433] | 123 | <!-- Expand/collapse button -->
|
---|
| 124 | <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'">
|
---|
| 125 | <td class="headerTD">
|
---|
| 126 | <img id="dtoggle{@nodeID}" onclick="toggleSection('{@nodeID}');" class="icon">
|
---|
| 127 | <xsl:attribute name="src">
|
---|
[25143] | 128 | <xsl:choose>
|
---|
[25433] | 129 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or util:oidIsMatchOrParent(@nodeID, /page/pageResponse/document/@selectedNode)">
|
---|
| 130 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'collapse_image')"/>
|
---|
[25143] | 131 | </xsl:when>
|
---|
| 132 | <xsl:otherwise>
|
---|
[25433] | 133 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'expand_image')"/>
|
---|
[25143] | 134 | </xsl:otherwise>
|
---|
| 135 | </xsl:choose>
|
---|
| 136 | </xsl:attribute>
|
---|
[25433] | 137 | </img>
|
---|
| 138 | </td>
|
---|
| 139 | </xsl:if>
|
---|
[25936] | 140 |
|
---|
[25433] | 141 | <!-- Title -->
|
---|
| 142 | <td id="header{@nodeID}" class="headerTD sectionTitle"><!-- *** -->
|
---|
[25936] | 143 | <p>
|
---|
| 144 | <xsl:attribute name="class"><xsl:value-of select="util:hashToDepthClass(@nodeID)"/> sectionHeader</xsl:attribute>
|
---|
| 145 |
|
---|
| 146 | <xsl:if test="util:hashToSectionId(@nodeID)">
|
---|
| 147 | <span class="sectionNumberSpan">
|
---|
| 148 | <xsl:value-of select="util:hashToSectionId(@nodeID)"/>
|
---|
| 149 | <xsl:text> </xsl:text>
|
---|
| 150 | </span>
|
---|
| 151 | </xsl:if>
|
---|
| 152 | <!-- Display the title for the section regardless of whether automatic section numbering is turned on -->
|
---|
[26175] | 153 | <span><xsl:call-template name="sectionHeading"/></span>
|
---|
[25936] | 154 | </p>
|
---|
[25433] | 155 | </td>
|
---|
| 156 |
|
---|
| 157 | <!-- "back to top" link -->
|
---|
| 158 | <xsl:if test="util:hashToDepthClass(@nodeID) != 'sectionHeaderDepthTitle'">
|
---|
| 159 | <td class="backToTop headerTD">
|
---|
| 160 | <a href="javascript:scrollToTop();">
|
---|
| 161 | <xsl:text disable-output-escaping="yes">▲</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.back_to_top')"/>
|
---|
| 162 | </a>
|
---|
| 163 | </td>
|
---|
| 164 | </xsl:if>
|
---|
| 165 | </tr></table>
|
---|
[25936] | 166 |
|
---|
[25433] | 167 | <div id="doc{@nodeID}"><!-- *** -->
|
---|
| 168 | <xsl:choose>
|
---|
| 169 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or /page/pageResponse/document/@selectedNode = @nodeID">
|
---|
| 170 | <xsl:attribute name="class">
|
---|
| 171 | <xsl:text>sectionContainer hasText</xsl:text>
|
---|
| 172 | </xsl:attribute>
|
---|
[25177] | 173 | <xsl:attribute name="style">
|
---|
[25433] | 174 | <xsl:text>display:block;</xsl:text>
|
---|
| 175 | </xsl:attribute>
|
---|
| 176 | </xsl:when>
|
---|
| 177 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or util:oidIsMatchOrParent(@nodeID, /page/pageResponse/document/@selectedNode)">
|
---|
| 178 | <xsl:attribute name="class">
|
---|
| 179 | <xsl:text>sectionContainer noText</xsl:text>
|
---|
| 180 | </xsl:attribute>
|
---|
| 181 | <xsl:attribute name="style">
|
---|
| 182 | <xsl:text>display:block;</xsl:text>
|
---|
| 183 | </xsl:attribute>
|
---|
| 184 | </xsl:when>
|
---|
| 185 | <xsl:otherwise>
|
---|
| 186 | <xsl:attribute name="class">
|
---|
| 187 | <xsl:text>sectionContainer noText</xsl:text>
|
---|
| 188 | </xsl:attribute>
|
---|
| 189 | <xsl:attribute name="style">
|
---|
| 190 | <xsl:text>display:none;</xsl:text>
|
---|
| 191 | </xsl:attribute>
|
---|
| 192 | </xsl:otherwise>
|
---|
| 193 | </xsl:choose>
|
---|
| 194 |
|
---|
| 195 | <xsl:if test="/page/pageRequest/userInformation 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))">
|
---|
| 196 | <table id="meta{@nodeID}">
|
---|
| 197 | <xsl:attribute name="style">
|
---|
[25177] | 198 | <xsl:choose>
|
---|
[25433] | 199 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'dmd']/@value = 'true'">
|
---|
| 200 | <xsl:text>display:block;</xsl:text>
|
---|
[25177] | 201 | </xsl:when>
|
---|
| 202 | <xsl:otherwise>
|
---|
[25433] | 203 | <xsl:text>display:none;</xsl:text>
|
---|
[25177] | 204 | </xsl:otherwise>
|
---|
| 205 | </xsl:choose>
|
---|
| 206 | </xsl:attribute>
|
---|
[25433] | 207 | <xsl:value-of select="util:clearMetadataStorage()"/>
|
---|
| 208 | <xsl:for-each select="metadataList/metadata">
|
---|
| 209 | <xsl:sort select="@name"/>
|
---|
| 210 | <xsl:if test="util:checkMetadataNotDuplicate(@name, .)">
|
---|
| 211 | <tr>
|
---|
| 212 | <td class="metaTableCellName"><xsl:value-of select="@name"/></td>
|
---|
[25543] | 213 | <td class="metaTableCell"><xsl:value-of disable-output-escaping="yes" select="."/></td>
|
---|
[25433] | 214 | </tr>
|
---|
| 215 | </xsl:if>
|
---|
| 216 | </xsl:for-each>
|
---|
| 217 | </table>
|
---|
| 218 | </xsl:if>
|
---|
| 219 |
|
---|
[26020] | 220 | <xsl:choose>
|
---|
| 221 | <xsl:when test="../../document">
|
---|
| 222 | <xsl:call-template name="topLevelSectionContent"/>
|
---|
| 223 | </xsl:when>
|
---|
| 224 | <xsl:otherwise>
|
---|
| 225 | <xsl:call-template name="sectionContent"/>
|
---|
| 226 | </xsl:otherwise>
|
---|
| 227 | </xsl:choose>
|
---|
[25433] | 228 |
|
---|
| 229 | <xsl:if test="documentNode">
|
---|
| 230 | <xsl:for-each select="documentNode">
|
---|
[24650] | 231 | <xsl:call-template name="wrapDocumentNodes"/>
|
---|
[25433] | 232 | </xsl:for-each>
|
---|
| 233 | </xsl:if>
|
---|
| 234 | </div>
|
---|
[24650] | 235 | </xsl:template>
|
---|
[19988] | 236 |
|
---|
| 237 | <!-- the page content -->
|
---|
[19856] | 238 | <xsl:template match="/page/pageResponse/document">
|
---|
[25177] | 239 | <xsl:if test="/page/pageRequest/userInformation 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))">
|
---|
[25142] | 240 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts.js"><xsl:text> </xsl:text></script>
|
---|
| 241 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentmaker_scripts_util.js"><xsl:text> </xsl:text></script>
|
---|
[25462] | 242 | <script type="text/javascript">
|
---|
| 243 | <xsl:text disable-output-escaping="yes">
|
---|
| 244 | $(window).load(function()
|
---|
| 245 | {
|
---|
| 246 | if(gs.cgiParams.docEdit == "1")
|
---|
| 247 | {
|
---|
| 248 | readyPageForEditing();
|
---|
| 249 | }
|
---|
| 250 | });
|
---|
| 251 | </xsl:text>
|
---|
| 252 | </script>
|
---|
[24791] | 253 | <gsf:metadata name="all"/>
|
---|
| 254 | </xsl:if>
|
---|
| 255 |
|
---|
[23989] | 256 | <xsl:if test="$bookswitch = 'off'">
|
---|
[24018] | 257 | <div id="bookdiv" style="visibility:hidden; height:0px; display:inline;"><xsl:text> </xsl:text></div>
|
---|
| 258 |
|
---|
[24467] | 259 | <script type="text/javascript" src="interfaces/{$interface_name}/js/document_scripts.js"><xsl:text> </xsl:text></script>
|
---|
| 260 |
|
---|
[24018] | 261 | <xsl:if test="/page/pageResponse/collection[@name = $collName]/metadataList/metadata[@name = 'tidyoption'] = 'tidy'">
|
---|
[24467] | 262 | <script type="text/javascript">
|
---|
| 263 | <xsl:text disable-output-escaping="yes">
|
---|
| 264 | if(document.URL.indexOf("book=on") != -1)
|
---|
| 265 | {
|
---|
| 266 | loadBook();
|
---|
| 267 | }
|
---|
| 268 | </xsl:text>
|
---|
| 269 | </script>
|
---|
[24018] | 270 | </xsl:if>
|
---|
[26014] | 271 |
|
---|
[25177] | 272 | <xsl:if test="/page/pageRequest/userInformation 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))">
|
---|
[25371] | 273 | <xsl:call-template name="editBar"/>
|
---|
[25072] | 274 | </xsl:if>
|
---|
| 275 |
|
---|
[24791] | 276 | <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] | 277 | <xsl:call-template name="rightSidebar"/>
|
---|
[24650] | 278 | </xsl:if>
|
---|
[23989] | 279 | </xsl:if>
|
---|
| 280 |
|
---|
[19856] | 281 | <!-- display the document -->
|
---|
[23813] | 282 | <xsl:choose>
|
---|
[19856] | 283 | <xsl:when test="@external != ''">
|
---|
| 284 | <xsl:call-template name="externalPage">
|
---|
| 285 | <xsl:with-param name="external" select="@external"/>
|
---|
| 286 | </xsl:call-template>
|
---|
| 287 | </xsl:when>
|
---|
[23989] | 288 | <xsl:when test="$bookswitch = 'flashxml'">
|
---|
[25720] | 289 | <xsl:call-template name="documentNodeFlashXML"/>
|
---|
[23989] | 290 | </xsl:when>
|
---|
| 291 | <xsl:when test="$bookswitch = 'on'">
|
---|
[24018] | 292 | <div id="bookdiv" style="display:inline;"><xsl:text> </xsl:text></div>
|
---|
[24791] | 293 | <!-- *** in document-scripts.js *** -->
|
---|
[24467] | 294 | <script type="text/javascript">
|
---|
| 295 | <xsl:text disable-output-escaping="yes">
|
---|
| 296 | if(document.URL.indexOf("book=on") != -1)
|
---|
| 297 | {
|
---|
| 298 | loadBook();
|
---|
| 299 | }
|
---|
| 300 | </xsl:text>
|
---|
| 301 | </script>
|
---|
[23989] | 302 | </xsl:when>
|
---|
[25837] | 303 | <xsl:when test="@docType='simple'">
|
---|
| 304 | <xsl:call-template name="documentHeading"/><br/>
|
---|
| 305 | <xsl:call-template name="documentContent"/>
|
---|
| 306 | </xsl:when>
|
---|
| 307 | <xsl:otherwise> <!-- display the standard greenstone document -->
|
---|
| 308 | <xsl:call-template name="documentContent"/>
|
---|
| 309 | </xsl:otherwise>
|
---|
| 310 | </xsl:choose>
|
---|
| 311 | </xsl:template>
|
---|
[25949] | 312 |
|
---|
[25824] | 313 | <xsl:template name="wrappedDocument">
|
---|
[25837] | 314 | <xsl:choose>
|
---|
[25936] | 315 | <!-- NOTE: alb = ajax load bypass -->
|
---|
| 316 | <xsl:when test="/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 (/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or not(util:contains(/page/pageResponse/document/@selectedNode, '.')))))">
|
---|
[25837] | 317 | <div id="gs-document">
|
---|
| 318 | <xsl:call-template name="documentPre"/>
|
---|
| 319 | <div id="gs-document-text" class="documenttext" collection="{/page/pageResponse/collection/@name}"><!-- *** -->
|
---|
| 320 | <xsl:for-each select="documentNode">
|
---|
| 321 | <xsl:call-template name="wrapDocumentNodes"/>
|
---|
| 322 | </xsl:for-each>
|
---|
| 323 | </div>
|
---|
| 324 | </div>
|
---|
| 325 | </xsl:when>
|
---|
[25972] | 326 | <xsl:when test="/page/pageResponse/document/@docType = 'paged' or /page/pageResponse/document/@docType = 'pagedhierarchy'">
|
---|
[25936] | 327 | <div id="gs-document">
|
---|
| 328 | <div id="tocLoadingImage" style="text-align:center;">
|
---|
| 329 | <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>
|
---|
| 330 | </div>
|
---|
| 331 | </div>
|
---|
| 332 | <script type="text/javascript">
|
---|
| 333 | <xsl:text disable-output-escaping="yes">
|
---|
| 334 | $(window).load(function()
|
---|
| 335 | {
|
---|
| 336 | var url = gs.xsltParams.library_name + "?a=d&c=" + gs.cgiParams.c + "&excerptid=gs-document&dt=hierarchy&d=" + gs.cgiParams.d.replace(/([^.]*)\..*/, "$1");
|
---|
| 337 | loadTopLevelPage(null, url);
|
---|
| 338 | });
|
---|
| 339 | </xsl:text>
|
---|
| 340 | </script>
|
---|
| 341 | </xsl:when>
|
---|
[25837] | 342 | <xsl:otherwise>
|
---|
| 343 | <div id="gs-document">
|
---|
| 344 | <div id="tocLoadingImage" style="text-align:center;">
|
---|
| 345 | <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>
|
---|
| 346 | </div>
|
---|
| 347 | </div>
|
---|
| 348 | <script type="text/javascript">
|
---|
| 349 | <xsl:text disable-output-escaping="yes">
|
---|
| 350 | $(window).load(function()
|
---|
| 351 | {
|
---|
| 352 | loadTopLevelPage(function()
|
---|
| 353 | {
|
---|
| 354 | //Don't focus the section until the table of contents is loaded
|
---|
| 355 | var tocCheck = function()
|
---|
[25371] | 356 | {
|
---|
[25837] | 357 | if(gs.variables.tocLoaded)
|
---|
[25371] | 358 | {
|
---|
[25837] | 359 | focusSection("</xsl:text><xsl:value-of select="/page/pageResponse/document/@selectedNode"/><xsl:text disable-output-escaping="yes">");
|
---|
| 360 | }
|
---|
| 361 | else
|
---|
| 362 | {
|
---|
| 363 | setTimeout(tocCheck, 500);
|
---|
| 364 | }
|
---|
| 365 | }
|
---|
| 366 | tocCheck();
|
---|
| 367 | });
|
---|
| 368 | });
|
---|
| 369 | </xsl:text>
|
---|
| 370 | </script>
|
---|
| 371 | </xsl:otherwise>
|
---|
[19856] | 372 | </xsl:choose>
|
---|
[24791] | 373 |
|
---|
[19856] | 374 | <div class="clear"><xsl:text> </xsl:text></div>
|
---|
[23989] | 375 | </xsl:template>
|
---|
| 376 |
|
---|
[25371] | 377 | <xsl:template name="editBar">
|
---|
| 378 | <table style="width:100%"><tr>
|
---|
| 379 | <td id="editBarLeft" style="width:70%"><xsl:text> </xsl:text></td>
|
---|
| 380 | <td id="editBarRight">
|
---|
| 381 | <div style="text-align:center;">
|
---|
| 382 | <div style="margin:5px;" class="ui-state-default ui-corner-all">
|
---|
| 383 | <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, 'doc.edit_structure')"/></a>
|
---|
| 384 | </div>
|
---|
| 385 | <div style="margin:5px;" class="ui-state-default ui-corner-all">
|
---|
[25462] | 386 | <a id="editContentButton" style="padding: 3px; text-decoration:none;">
|
---|
| 387 | <xsl:attribute name="href">
|
---|
| 388 | <xsl:value-of select="$library_name"/>
|
---|
| 389 | <xsl:text>/collection/</xsl:text>
|
---|
| 390 | <xsl:value-of select="$collName"/>
|
---|
| 391 | <xsl:text>/document/</xsl:text>
|
---|
[26140] | 392 | <xsl:choose>
|
---|
| 393 | <xsl:when test="count(//documentNode) > 0">
|
---|
| 394 | <xsl:value-of select="/page/pageResponse/document/documentNode/@nodeID"/>
|
---|
| 395 | </xsl:when>
|
---|
| 396 | <xsl:otherwise>
|
---|
| 397 | <xsl:value-of select="/page/pageResponse/document/@nodeID"/>
|
---|
| 398 | </xsl:otherwise>
|
---|
| 399 | </xsl:choose>
|
---|
[25462] | 400 | <xsl:if test="not(/page/pageRequest/paramList/param[@name = 'docEdit']/@value = '1')">
|
---|
[26140] | 401 | <xsl:text>?ed=1&docEdit=1&dt=hierarchy</xsl:text>
|
---|
[25462] | 402 | </xsl:if>
|
---|
| 403 | </xsl:attribute>
|
---|
| 404 | <xsl:choose>
|
---|
| 405 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'docEdit']/@value = '1'">
|
---|
| 406 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.hide_editor')"/>
|
---|
| 407 | </xsl:when>
|
---|
| 408 | <xsl:otherwise>
|
---|
| 409 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.edit_content')"/>
|
---|
| 410 | </xsl:otherwise>
|
---|
| 411 | </xsl:choose>
|
---|
| 412 | </a>
|
---|
[25371] | 413 | </div>
|
---|
| 414 | </div>
|
---|
| 415 | </td>
|
---|
| 416 | </tr></table>
|
---|
[25720] | 417 | <gslib:langfrag name="dse"/>
|
---|
[25371] | 418 | </xsl:template>
|
---|
| 419 |
|
---|
[23989] | 420 | <!-- Highlight annotations if requested -->
|
---|
[25720] | 421 | <xsl:template name="displayAnnotation">
|
---|
[23989] | 422 | <xsl:choose>
|
---|
[25720] | 423 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'hl']/@value = 'on'">
|
---|
[23989] | 424 | <span class="termHighlight"><xsl:value-of select="."/></span>
|
---|
| 425 | </xsl:when>
|
---|
| 426 | <xsl:otherwise>
|
---|
| 427 | <span class="noTermHighlight"><xsl:value-of select="."/></span>
|
---|
| 428 | </xsl:otherwise>
|
---|
| 429 | </xsl:choose>
|
---|
| 430 | </xsl:template>
|
---|
[25660] | 431 |
|
---|
[24650] | 432 | <!-- The default template for displaying section titles -->
|
---|
[25720] | 433 | <xsl:template name="sectionTitle">
|
---|
[24650] | 434 | <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Title']"/>
|
---|
| 435 | </xsl:template>
|
---|
| 436 |
|
---|
[26020] | 437 | <xsl:template name="wrappedSectionImage">
|
---|
[25433] | 438 | <gsf:variable name="screenImageWidth"><gsf:metadata name="ScreenWidth"/></gsf:variable>
|
---|
| 439 | <gsf:variable name="screenImageHeight"><gsf:metadata name="ScreenHeight"/></gsf:variable>
|
---|
| 440 | <gsf:variable name="imageWidth"><gsf:metadata name="ImageWidth"/></gsf:variable>
|
---|
| 441 | <gsf:variable name="imageHeight"><gsf:metadata name="ImageHeight"/></gsf:variable>
|
---|
| 442 |
|
---|
| 443 | <xsl:choose>
|
---|
[26024] | 444 | <xsl:when test="metadataList/metadata[@name = 'Screen'] and metadataList/metadata[@name = 'SourceFile'] and ($imageWidth div $screenImageWidth > 1.2)">
|
---|
[25936] | 445 | <div id="image{@nodeID}">
|
---|
| 446 | <div id="wrap{util:replace(@nodeID, '.', '_')}" class="zoomImage" style="position:relative; width: {$screenImageWidth}px; height: {$screenImageHeight}px;">
|
---|
| 447 | <div id="small{util:replace(@nodeID, '.', '_')}" style="position:relative; width: {$screenImageWidth}px; height: {$screenImageHeight}px;">
|
---|
| 448 | <gsf:image type="screen"/>
|
---|
[25433] | 449 | </div>
|
---|
[25936] | 450 | <div id="mover{util:replace(@nodeID, '.', '_')}" style="border: 1px solid green; position: absolute; top: 0; left: 0; width: 198px; height: 198px; overflow: hidden; z-index: 100; background: white; display: none;">
|
---|
| 451 | <div id="overlay{util:replace(@nodeID, '.', '_')}" style="width: 200px; height: 200px; position: absolute; top: 0; left: 0; z-index: 200;">
|
---|
| 452 | <xsl:text> </xsl:text>
|
---|
| 453 | </div>
|
---|
| 454 | <div id="large{util:replace(@nodeID, '.', '_')}" style="position: relative; width: {$imageWidth}px; height: {$imageHeight}px;">
|
---|
| 455 | <gsf:image type="source"/>
|
---|
| 456 | </div>
|
---|
[25433] | 457 | </div>
|
---|
| 458 | </div>
|
---|
[25936] | 459 | <script type="text/javascript">
|
---|
| 460 | <xsl:text disable-output-escaping="yes">
|
---|
| 461 | {
|
---|
| 462 | var nodeID = "</xsl:text><xsl:value-of select="@nodeID"/><xsl:text disable-output-escaping="yes">";
|
---|
| 463 | nodeID = nodeID.replace(/\./g, "_");
|
---|
[25462] | 464 |
|
---|
[25936] | 465 | var bigHeight = </xsl:text><xsl:value-of select="$imageHeight"/><xsl:text disable-output-escaping="yes">;
|
---|
| 466 | var smallHeight = </xsl:text><xsl:value-of select="$screenImageHeight"/><xsl:text disable-output-escaping="yes">;
|
---|
[25462] | 467 |
|
---|
[25936] | 468 | var multiplier = bigHeight / smallHeight;
|
---|
[25433] | 469 |
|
---|
[25936] | 470 | $("#wrap" + nodeID).anythingZoomer({
|
---|
| 471 | smallArea: "#small" + nodeID,
|
---|
| 472 | largeArea: "#large" + nodeID,
|
---|
| 473 | zoomPort: "#overlay" + nodeID,
|
---|
| 474 | mover: "#mover" + nodeID,
|
---|
| 475 | expansionSize:50,
|
---|
| 476 | speedMultiplier:multiplier
|
---|
| 477 | });
|
---|
[26024] | 478 |
|
---|
| 479 | $("#zoomOptions").css("display", "block");
|
---|
[25936] | 480 | }
|
---|
| 481 | </xsl:text>
|
---|
| 482 | </script>
|
---|
| 483 | </div>
|
---|
[25433] | 484 | </xsl:when>
|
---|
[26020] | 485 | <xsl:otherwise>
|
---|
[25433] | 486 | <div id="image{@nodeID}">
|
---|
| 487 | <xsl:attribute name="style">
|
---|
| 488 | <xsl:choose>
|
---|
| 489 | <xsl:when test="/page/pageRequest/paramList/param[@name = 'view']/@value = 'text'">
|
---|
| 490 | <xsl:text>display:none;</xsl:text>
|
---|
| 491 | </xsl:when>
|
---|
| 492 | <xsl:otherwise>
|
---|
| 493 | <xsl:text>display:block;</xsl:text>
|
---|
| 494 | </xsl:otherwise>
|
---|
| 495 | </xsl:choose>
|
---|
| 496 | </xsl:attribute>
|
---|
[26020] | 497 | <xsl:call-template name="sectionImage"/><xsl:text> </xsl:text>
|
---|
[25433] | 498 | </div>
|
---|
[26020] | 499 | </xsl:otherwise>
|
---|
[25433] | 500 | </xsl:choose>
|
---|
| 501 | </xsl:template>
|
---|
[25837] | 502 |
|
---|
[25824] | 503 | <!-- The default template for displaying the document node text -->
|
---|
[25837] | 504 | <!-- equivalent to gsf:text -->
|
---|
[25824] | 505 | <xsl:template name="documentNodeText">
|
---|
[25433] | 506 | <!-- Hides the "This document has no text." message -->
|
---|
| 507 | <xsl:variable name="noText"><gsf:metadata name="NoText"/></xsl:variable>
|
---|
[25837] | 508 | <xsl:if test="not($noText = '1')">
|
---|
| 509 | <!-- Section text -->
|
---|
| 510 | <xsl:for-each select="nodeContent">
|
---|
| 511 | <xsl:for-each select="node()">
|
---|
| 512 | <xsl:choose>
|
---|
| 513 | <xsl:when test="not(name())">
|
---|
[25433] | 514 | <xsl:value-of select="." disable-output-escaping="yes"/>
|
---|
[25837] | 515 | </xsl:when>
|
---|
| 516 | <xsl:when test="name() = 'annotation'">
|
---|
| 517 | <xsl:call-template name="displayAnnotation"/>
|
---|
| 518 | </xsl:when>
|
---|
| 519 | <xsl:otherwise>
|
---|
| 520 | <xsl:apply-templates/>
|
---|
| 521 | </xsl:otherwise>
|
---|
| 522 | </xsl:choose>
|
---|
| 523 | </xsl:for-each>
|
---|
[23989] | 524 | </xsl:for-each>
|
---|
[25837] | 525 | </xsl:if><xsl:text> </xsl:text>
|
---|
[19856] | 526 | </xsl:template>
|
---|
[25824] | 527 |
|
---|
[23989] | 528 | <!-- Used to produce a version of the page in a format that can be read by the realistic books plugin -->
|
---|
[25720] | 529 | <xsl:template name="documentNodeFlashXML">
|
---|
[23989] | 530 | <xsl:text disable-output-escaping="yes">
|
---|
| 531 | <Section>
|
---|
| 532 | <Description>
|
---|
| 533 | <Metadata name="Title">
|
---|
| 534 | </xsl:text>
|
---|
| 535 | <xsl:value-of select="normalize-space(metadataList/metadata[@name = 'Title'])"/>
|
---|
| 536 | <xsl:text disable-output-escaping="yes">
|
---|
| 537 | </Metadata>
|
---|
| 538 | </Description>
|
---|
| 539 | </xsl:text>
|
---|
| 540 |
|
---|
| 541 | <xsl:value-of select="normalize-space(nodeContent)" disable-output-escaping="yes"/>
|
---|
| 542 |
|
---|
[25660] | 543 | <xsl:for-each select="documentNode">
|
---|
[25720] | 544 | <xsl:call-template name="documentNodeFlashXML"/>
|
---|
[25660] | 545 | </xsl:for-each>
|
---|
[23989] | 546 |
|
---|
| 547 | <xsl:text disable-output-escaping="yes">
|
---|
| 548 | </Section>
|
---|
| 549 | </xsl:text>
|
---|
| 550 | </xsl:template>
|
---|
| 551 |
|
---|
[23813] | 552 | <xsl:template name="externalPage">
|
---|
| 553 | <xsl:param name="external"/>
|
---|
| 554 | <xsl:variable name="go_forward_link">
|
---|
| 555 | <a>
|
---|
| 556 | <xsl:attribute name="href">
|
---|
| 557 | <xsl:value-of select="$external"/>
|
---|
| 558 | </xsl:attribute>
|
---|
| 559 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/>
|
---|
| 560 | </a>
|
---|
| 561 | </xsl:variable>
|
---|
| 562 | <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2>
|
---|
| 563 | <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/></p>
|
---|
| 564 | </xsl:template>
|
---|
[19856] | 565 |
|
---|
| 566 | <xsl:template match="/page"><xsl:apply-templates select="/page/pageResponse/document"/></xsl:template> <!-- this to be deleted eventually -->
|
---|
[23989] | 567 |
|
---|
[25371] | 568 | <xsl:template name="documentPre">
|
---|
[24996] | 569 | <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'">
|
---|
| 570 | <xsl:call-template name="mapFeatures"/>
|
---|
| 571 | </xsl:if>
|
---|
| 572 | </xsl:template>
|
---|
| 573 |
|
---|
| 574 | <xsl:template name="mapFeatures">
|
---|
[25462] | 575 | <div id="map_canvas" class="map_canvas_full"><xsl:text> </xsl:text></div>
|
---|
[24996] | 576 |
|
---|
[25711] | 577 | <xsl:for-each select="documentNode">
|
---|
| 578 | <xsl:if test="metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']">
|
---|
| 579 | <div style="background:#BBFFBB; padding: 5px; margin:0px auto; width:890px;">
|
---|
| 580 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.maps.nearby_docs')"/>
|
---|
[25837] | 581 | <img id="nearbyDocumentsToggle" style="margin-left:5px;" src="interfaces/{$interface_name}/images/expand.png">
|
---|
[25711] | 582 | <xsl:attribute name="onclick">
|
---|
| 583 | <xsl:text>performDistanceSearch('</xsl:text>
|
---|
| 584 | <xsl:value-of select="@nodeID"/>
|
---|
| 585 | <xsl:text>', '</xsl:text>
|
---|
| 586 | <gsf:metadata name="Latitude"/>
|
---|
| 587 | <xsl:text>', '</xsl:text>
|
---|
| 588 | <gsf:metadata name="Longitude"/>
|
---|
| 589 | <xsl:text>', 2);</xsl:text>
|
---|
| 590 | </xsl:attribute>
|
---|
| 591 | </img>
|
---|
| 592 | <div id="nearbyDocuments"><xsl:text> </xsl:text></div>
|
---|
| 593 | </div>
|
---|
| 594 | </xsl:if>
|
---|
| 595 | </xsl:for-each>
|
---|
[24996] | 596 |
|
---|
| 597 | <div id="jsonNodes" style="display:none;">
|
---|
| 598 | <xsl:text>[</xsl:text>
|
---|
[26139] | 599 | <xsl:choose>
|
---|
| 600 | <!-- HIERARCHICAL DOCUMENTS -->
|
---|
| 601 | <xsl:when test="count(//documentNode) > 0">
|
---|
| 602 | <xsl:for-each select="//documentNode">
|
---|
| 603 | <xsl:if test="metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']">
|
---|
| 604 | <xsl:text>{</xsl:text>
|
---|
| 605 | <xsl:text disable-output-escaping="yes">"nodeID":"</xsl:text><xsl:value-of select="@nodeID"/><xsl:text disable-output-escaping="yes">",</xsl:text>
|
---|
| 606 | <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>
|
---|
| 607 | <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>
|
---|
| 608 | <xsl:text disable-output-escaping="yes">"lng":</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Longitude']"/>
|
---|
| 609 | <xsl:text>}</xsl:text>
|
---|
| 610 | <xsl:if test="not(position() = count(//documentNode))">
|
---|
| 611 | <xsl:text>,</xsl:text>
|
---|
| 612 | </xsl:if>
|
---|
| 613 | </xsl:if>
|
---|
| 614 | </xsl:for-each>
|
---|
| 615 | </xsl:when>
|
---|
| 616 | <!-- SIMPLE DOCUMENTS -->
|
---|
| 617 | <xsl:otherwise>
|
---|
| 618 | <xsl:for-each select="/page/pageResponse/document">
|
---|
| 619 | <xsl:if test="metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']">
|
---|
| 620 | <xsl:text>{</xsl:text>
|
---|
| 621 | <xsl:text disable-output-escaping="yes">"nodeID":"</xsl:text><xsl:value-of select="@selectedNode"/><xsl:text disable-output-escaping="yes">",</xsl:text>
|
---|
| 622 | <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>
|
---|
| 623 | <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>
|
---|
| 624 | <xsl:text disable-output-escaping="yes">"lng":</xsl:text><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Longitude']"/>
|
---|
| 625 | <xsl:text>}</xsl:text>
|
---|
| 626 | </xsl:if>
|
---|
| 627 | </xsl:for-each>
|
---|
| 628 | </xsl:otherwise>
|
---|
| 629 | </xsl:choose>
|
---|
[24996] | 630 | <xsl:text>]</xsl:text>
|
---|
| 631 | </div>
|
---|
| 632 | </xsl:template>
|
---|
[19856] | 633 | </xsl:stylesheet>
|
---|