Ignore:
Timestamp:
2007-08-28T09:03:29+12:00 (14 years ago)
Author:
anna
Message:

Changed paramList template so that don't generate the search level drop down list if the level param is invisible. Added namespace prefix in hidden placeholder of a param in the param(multi, contents) template, to make the AdvancedFieldSearch work.

File:
1 edited

Legend:

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

    r13254 r14385  
    2929  <xsl:template match="paramList" priority='2'>
    3030    <span class="textselect">
    31       Search for <xsl:apply-templates select="param[@name='index']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='index']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates><xsl:if test="param[@name='level']">at <xsl:apply-templates select="param[@name='level']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='level']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates> level</xsl:if><xsl:call-template name='query_mode'/>
     31      Search for <xsl:apply-templates select="param[@name='index']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='index']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates><xsl:if test="param[@name='level' and not(@type='invisible')]">at <xsl:apply-templates select="param[@name='level']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='level']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates> level</xsl:if><xsl:call-template name='query_mode'/>
    3232    </span>
    3333    <span class="querybox">
     
    6868    </xsl:choose>
    6969  </xsl:template>
    70 
     70   
    7171  <xsl:template match="param[@name='matchMode']" mode='query1'>
    7272   <xsl:param name='default'/>
     
    134134  <xsl:template match="param[@type='multi']" mode="contents">
    135135    <xsl:param name="occurs"/>
     136    <xsl:param name="ns">s1.</xsl:param>
    136137    <xsl:param name="pos"/>
    137138 <!--   <xsl:variable name="pos" select="@occurs - $occurs"/>-->
     
    144145        </xsl:when>
    145146        <xsl:otherwise><!-- put in a hidden placeholder -->
    146           <input type="hidden" name='{@name}' value=''/>
     147          <input type="hidden" name='{$ns}{@name}' value=''/>
    147148        </xsl:otherwise>
    148149      </xsl:choose></td>
Note: See TracChangeset for help on using the changeset viewer.