Changeset 31537 for main/trunk/greenstone3/web/interfaces/default/transform
- Timestamp:
- 2017-03-24T21:37:12+13:00 (7 years ago)
- Location:
- main/trunk/greenstone3/web/interfaces/default/transform
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/transform/config_format.xsl
r31179 r31537 110 110 when the XSLT processes it (which would then result in it 111 111 being changed into a self-closing element, which then is 112 incorrectly rendered as HTML). Doing thi ngwith the112 incorrectly rendered as HTML). Doing this with the 113 113 value-of is better then injecting an xsl:comment in 114 114 (another approach we have used in the past) as the … … 116 116 HTML. This can lead to further complications if 117 117 Javascript using the 'empty' div truely expects it to 118 have no con nent of any form.118 have no content of any form. 119 119 --> 120 120 -
main/trunk/greenstone3/web/interfaces/default/transform/layouts/header.xsl
r31399 r31537 409 409 410 410 </xsl:template> 411 411 412 <xsl:template name="generateLoginURL"> 412 413 <xsl:value-of select="$library_name"/> … … 431 432 </xsl:for-each> 432 433 434 </xsl:template> 435 436 <!-- Writing the reverse of generateLoginURL since the toggleUserMenuScript does a lot more than I want. --> 437 <!-- https://www.w3schools.com/xml/xsl_functions.asp#string --> 438 <xsl:template name="generateLogoutURL"> 439 440 <xsl:variable name="url" select="/page/pageRequest/@fullURL"/> 441 <xsl:variable name="tmpURL" select="substring-before($url, '&amp;logout=')"/> 442 <xsl:variable name="beforeHash" select="substring-before($url, '#')"/> 443 <xsl:variable name="afterHash" select="substring-after($url, '#')"/> 444 <!-- Get rid of any lingering &logout= already in the URL. 445 Can't use fn:replace() as it's only been defined since XSLT 2.0. We use XSLT 1.x --> 446 <xsl:variable name="fullURL"> 447 <xsl:choose> 448 <xsl:when test="$tmpURL != ''"><xsl:value-of select="$tmpURL" /></xsl:when> 449 <xsl:otherwise><xsl:value-of select="$url" /></xsl:otherwise> 450 </xsl:choose> 451 </xsl:variable> 452 453 <!-- Output the logout link: the current page's URL (with any lingering logout suffix removed) 454 followed by ?logout= or &logout= followed by any # portion of the current page's URL --> 455 <xsl:choose> 456 <xsl:when test="$beforeHash != ''"><xsl:value-of select="$beforeHash" /></xsl:when> 457 <xsl:otherwise><xsl:value-of select="$fullURL" /></xsl:otherwise> 458 </xsl:choose> 459 <xsl:choose> 460 <xsl:when test="contains($fullURL, '?')"><xsl:text>&logout=</xsl:text></xsl:when> 461 <xsl:otherwise>?logout=</xsl:otherwise> 462 </xsl:choose> 463 <xsl:if test="$afterHash != ''">#<xsl:value-of select="$afterHash" /></xsl:if> 433 464 </xsl:template> 434 465 -
main/trunk/greenstone3/web/interfaces/default/transform/pages/document.xsl
r31534 r31537 12 12 <xsl:import href="layouts/main.xsl"/> 13 13 <xsl:import href="layouts/toc.xsl"/> 14 15 <!-- templates for adding user comments --> 16 <xsl:import href="layouts/usercomments.xsl"/> 14 17 15 18 <xsl:variable name="bookswitch"> … … 367 370 <xsl:call-template name="documentHeading"/><br/> 368 371 <xsl:call-template name="documentContent"/> 372 <br /><xsl:call-template name="userCommentsSection"/> 369 373 </xsl:when> 370 374 <xsl:otherwise> <!-- display the standard greenstone document -->
Note:
See TracChangeset
for help on using the changeset viewer.