Changeset 33510

Show
Ignore:
Timestamp:
24.09.2019 14:13:22 (3 weeks ago)
Author:
kjdon
Message:

isEditingTurnedOn renamed to isEditingAllowed, and added isMapGPSEditingAllowed

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/layouts/header.xsl

    r33504 r33510  
    2424  </xsl:variable> 
    2525 
    26   <!-- does this collection have editing turned on - turned on by default, can turn off in config file--> 
    27   <xsl:variable name="isEditingTurnedOn"> 
     26  <!-- does this collection have editing allowed? it's turned on by default, can turn off in config file--> 
     27  <xsl:variable name="isEditingAllowed"> 
    2828    <xsl:if test="not(/page/pageResponse/format[@type='display']/gsf:option[@name='allowDocumentEditing']) or /page/pageResponse/format[@type='display']/gsf:option[@name='allowDocumentEditing']/@value='true'">1</xsl:if> 
    2929  </xsl:variable> 
     
    3232    <xsl:choose><xsl:when test="/page/pageResponse/collection/@no_archives">0</xsl:when><xsl:otherwise>1</xsl:otherwise></xsl:choose> 
    3333  </xsl:variable> 
     34  <xsl:variable name="isMapGPSEditingAllowed"> 
     35    <xsl:choose><xsl:when test="not(/page/pageResponse/format[@type='display']/gsf:option[@name='allowMapGPSEditing']) or /page/pageResponse/format[@type='display']/gsf:option[@name='allowMapGPSEditing']/@value='true'">1</xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose> 
     36  </xsl:variable> 
     37   
    3438  <!-- is a user logged in, and do they have editing rights for this collection? --> 
    3539  <xsl:variable name="userHasEditPermission"> 
     
    422426    menu.append(settingsLink); 
    423427     
    424     </xsl:text><xsl:if test="/page/pageRequest/@action = 'd' and $isEditingTurnedOn = '1'"><xsl:text disable-output-escaping="yes"> 
     428    </xsl:text><xsl:if test="/page/pageRequest/@action = 'd' and $isEditingAllowed = '1'"><xsl:text disable-output-escaping="yes"> 
    425429    var editingLink = $("&lt;a&gt;") 
    426430    .attr("href", "javascript:;");