Show
Ignore:
Timestamp:
08.05.2017 09:40:16 (3 years ago)
Author:
kjdon
Message:

classifierNodeLink template is needed by config_format as well as classifier.xsl, so I have moved it into query-common as this gets included everywhere.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/query-common.xsl

    r31178 r31652  
    170170    </xsl:template> 
    171171 
     172  <xsl:template name="classifierNodeLink"> 
     173    <xsl:param name="link-type">dynamic</xsl:param> 
     174    <xsl:param name="node-id"></xsl:param> 
     175    <xsl:variable name="final-link-type"> 
     176      <xsl:choose> 
     177    <xsl:when test="$link-type='static'">static</xsl:when> 
     178    <xsl:when test="$link-type='javascript'">javascript</xsl:when> 
     179    <xsl:when test="@classifierStyle = 'HList'">static</xsl:when> 
     180    <xsl:when test="not(/page/pageResponse/format[@type='browse']/gsf:option[@name='turnstyleClassifiers']) or /page/pageResponse/format[@type='browse']/gsf:option[@name='turnstyleClassifiers']/@value='true'">javascript</xsl:when> 
     181    <xsl:otherwise>static</xsl:otherwise> 
     182      </xsl:choose> 
     183    </xsl:variable> 
     184    <xsl:choose> 
     185      <xsl:when test="$final-link-type='static'"> 
     186    <xsl:value-of select='$library_name'/>/collection/<xsl:value-of select='/page/pageResponse/collection/@name'/>/browse/<xsl:choose><xsl:when test="$node-id"><xsl:value-of select="$node-id"/></xsl:when><xsl:otherwise><xsl:value-of select='util:replace(@nodeID, ".", "/")'/></xsl:otherwise></xsl:choose> 
     187      </xsl:when> 
     188      <xsl:otherwise>javascript:toggleSection('<xsl:value-of select="@nodeID"/>');</xsl:otherwise> 
     189    </xsl:choose>    
     190  </xsl:template> 
     191 
    172192</xsl:stylesheet>