Changeset 25774

Show
Ignore:
Timestamp:
06.06.2012 20:52:11 (7 years ago)
Author:
ak19
Message:

Collections that are built without a search index, as is the backdrop tutorial collection based on image-e, should not produce a search form. So far a search form was appearing anyway and crashed when a search was attempted (because it wasn't built on any indexes).

Files:
1 modified

Legend:

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

    r25759 r25774  
    357357     
    358358    <!-- ***** QUICK SEARCH AREA ***** --> 
     359    <!-- Search form should only appear if there's a search (query) service AND it has an index.  
     360         By default, all collections end up with some query service (default is MGPP) even when they have 
     361         no search indexes, which is why the extra test for the presence of an index is necessary. --> 
    359362    <xsl:template name="quick-search-area"> 
    360         <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']"> 
     363        <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']/paramList/param[@name='index']"> 
    361364            <xsl:variable name="subaction" select="/page/pageRequest/@subaction"/> 
    362365            <td id="quicksearcharea">