Changeset 31890

Show
Ignore:
Timestamp:
17.08.2017 11:31:52 (5 weeks ago)
Author:
kjdon
Message:

want to bold the selected node in each horizintal row. for displaying the month down the side in a datelist, assume have classified on the first date

Files:
1 modified

Legend:

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

    r31850 r31890  
    9494    <xsl:param name="collName"/> 
    9595    <xsl:param name="serviceName"/> 
     96    <xsl:variable name="selectedNode"><xsl:value-of select="/page/pageRequest/paramList/param[@name = 'cl']/@value"/></xsl:variable> 
    9697    <ul class="horizontalContainer"> 
    9798      <xsl:for-each select='classifierNode'> 
    9899    <li> 
    99100      <xsl:attribute name="class"> 
    100         <!--<xsl:if test="@nodeID = /page/pageRequest/paramList/param[@name = 'cl']/@value">selectedHorizontalClassifierNode </xsl:if>--> 
    101         <xsl:if test="starts-with(/page/pageRequest/paramList/param[@name = 'cl']/@value, @nodeID)">selectedHorizontalClassifierNode </xsl:if> 
     101        <xsl:if test="starts-with($selectedNode, @nodeID) or (not(contains($selectedNode, '.')) and @nodeID = concat($selectedNode, '.1'))">selectedHorizontalClassifierNode </xsl:if> 
    102102        <xsl:text>horizontalClassifierNode</xsl:text> 
    103103      </xsl:attribute> 
     
    145145        <xsl:if test="../@childType = 'DateList'"> 
    146146          <xsl:variable name="prevMonth"><xsl:value-of select="util:getString('prevMonth')"/></xsl:variable> 
    147           <xsl:variable name="currentDate"><gsf:metadata name="Date"/></xsl:variable> 
     147          <xsl:variable name="currentDate"><gsf:metadata name="Date" pos="1"/></xsl:variable> <!-- note pos=1 won't work if a document can be included in a datelist multiple times. currently only the first date is used...--> 
    148148          <xsl:variable name="currentMonth"><xsl:value-of select="util:getDetailFromDate($currentDate, 'month', /page/@lang)"/></xsl:variable> 
    149149          <xsl:value-of select="util:storeString('prevMonth', $currentMonth)"/>