- Timestamp:
- 2018-09-17T14:40:12+12:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/transform/layouts/header.xsl
r32385 r32460 22 22 </xsl:otherwise> 23 23 </xsl:choose> 24 </xsl:variable> 25 26 <xsl:variable name="isEditingAvailable"> 27 <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:groupsContains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor))">1</xsl:if> 24 28 </xsl:variable> 25 29 … … 60 64 </xsl:if> 61 65 66 <!-- <xsl:call-template name="addGoogleTracking"/>--> 62 67 <xsl:choose> 63 68 <xsl:when test="/page/pageResponse/interfaceOptions/option[@name = 'cssTheme']/@value"> … … 100 105 <script type="text/javascript" src="interfaces/{$interface_name}/js/visual-xml-editor.js"><xsl:text> </xsl:text></script> 101 106 </xsl:if> 102 107 103 108 <xsl:call-template name="setup-gs-variable"/> 104 109 <xsl:if test="/page/pageRequest/@action ='p' and /page/pageRequest/@subaction='pref'"> … … 111 116 112 117 <xsl:call-template name="additionalHeaderContent"/> 118 </xsl:template> 119 120 <xsl:template name="addGoogleTracking"> 121 <xsl:variable name="trackid">UA-xxx-1</xsl:variable> 122 <!-- Global site tag (gtag.js) - Google Analytics --> 123 <script async="async" src="https://www.googletagmanager.com/gtag/js?id={$google_tracking_id}"><xsl:text> </xsl:text></script> 124 <script> 125 <xsl:text disable-output-escaping="yes"> 126 window.dataLayer = window.dataLayer || []; 127 function gtag(){dataLayer.push(arguments);} 128 gtag('js', new Date()); 129 130 gtag('config', '</xsl:text><xsl:value-of select="$google_tracking_id"/><xsl:text disable-output-escaping="yes">');</xsl:text> 131 </script> 113 132 </xsl:template> 114 133 … … 323 342 324 343 <xsl:template name="toggleUserMenuScript"> 344 325 345 <script type="text/javascript"> 326 346 <xsl:text disable-output-escaping="yes"> … … 364 384 .addClass("ui-state-default"); 365 385 settingsLink.append(settingsButton); 386 menu.append(settingsLink); 366 387 388 </xsl:text><xsl:if test="$isEditingAvailable = '1'"><xsl:text disable-output-escaping="yes"> 367 389 var editingLink = $("<a>") 368 390 .attr("href", "javascript:;"); … … 381 403 }); 382 404 editingLink.append(editingButton); 383 405 menu.append(editingLink); 406 </xsl:text></xsl:if><xsl:text disable-output-escaping="yes"> 384 407 var url = document.URL; 385 408 var hasQueryString = (url.indexOf("?") != -1); … … 400 423 .addClass("ui-state-default"); 401 424 logoutLink.append(logoutButton); 402 403 menu.append(settingsLink);404 menu.append(editingLink);405 425 menu.append(logoutLink); 406 426
Note:
See TracChangeset
for help on using the changeset viewer.