Changeset 31890 for main/trunk


Ignore:
Timestamp:
08/17/17 11:31:52 (3 years 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

File:
1 edited

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)"/>
Note: See TracChangeset for help on using the changeset viewer.