Ignore:
Timestamp:
2017-05-08T09:40:16+12:00 (7 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.

Location:
main/trunk/greenstone3/web/interfaces/default/transform
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/classifier.xsl

    r31563 r31652  
    302302  </xsl:template>
    303303 
    304   <xsl:template name="classifierNodeLink">
    305     <xsl:param name="link-type">dynamic</xsl:param>
    306     <xsl:param name="node-id"></xsl:param>
    307     <xsl:variable name="final-link-type">
    308       <xsl:choose>
    309     <xsl:when test="$link-type='static'">static</xsl:when>
    310     <xsl:when test="$link-type='javascript'">javascript</xsl:when>
    311     <xsl:when test="@classifierStyle = 'HList'">static</xsl:when>
    312     <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>
    313     <xsl:otherwise>static</xsl:otherwise>
    314       </xsl:choose>
    315     </xsl:variable>
    316     <xsl:choose>
    317       <xsl:when test="$final-link-type='static'">
    318     <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>
    319       </xsl:when>
    320       <xsl:otherwise>javascript:toggleSection('<xsl:value-of select="@nodeID"/>');</xsl:otherwise>
    321     </xsl:choose>   
    322   </xsl:template>
    323 
    324304
    325305  <xsl:template name="classifierPre">
  • 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>
Note: See TracChangeset for help on using the changeset viewer.