Changeset 26277

Show
Ignore:
Timestamp:
03.10.2012 14:25:19 (7 years ago)
Author:
sjm84
Message:

When text query only has one index we don't need to display it

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

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/layouts/header.xsl

    r26149 r26277  
    439439                                        <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']" mode="calculate-default"/> 
    440440                                    </xsl:with-param> 
     441                                    <xsl:with-param name="hideEmpty">true</xsl:with-param> 
    441442                                </xsl:apply-templates> 
    442443                            </span> 
  • main/trunk/greenstone3/web/interfaces/default/transform/query-common.xsl

    r23989 r26277  
    3232    <xsl:template match="param[@type='enum_single']"> 
    3333        <xsl:param name="ns">s1.</xsl:param> 
     34        <xsl:param name="hideEmpty">false</xsl:param> 
    3435        <xsl:param name="default"/> 
    3536        <xsl:choose> 
    3637            <xsl:when test="count(option) = 1"> 
    37                 <xsl:value-of select="option/displayItem[@name='name']"/> 
     38                <xsl:if test="$hideEmpty = 'false'"> 
     39                    <xsl:value-of select="option/displayItem[@name='name']"/> 
     40                </xsl:if> 
    3841                <input type='hidden' name='{$ns}{@name}'><xsl:attribute name='value'><xsl:value-of  select='option/@name'/></xsl:attribute></input> 
    3942            </xsl:when>