Changeset 33593


Ignore:
Timestamp:
2019-10-22T13:59:53+13:00 (5 years ago)
Author:
kjdon
Message:

the test for facets should be facetList/facet/count, as the facets get sent through even if there are no search results. and then it mucks up the display. get the favourites basket sitting underneath the footer bar. Also, moved displayBaskets template into gslib, so query and classifier can both call it.

File:
1 edited

Legend:

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

    r33592 r33593  
    4949    <xsl:call-template name="displayMatchDocs"/>
    5050    <xsl:call-template name="displayTermInfo"/>
    51     <xsl:call-template name="displayBaskets"/>
     51    <gslib:displayBaskets/>
    5252    <xsl:call-template name="displayResults"/>
    5353    <xsl:call-template name="resultsPagePost"/>
     
    5858  </xsl:variable>
    5959
    60   <xsl:template name="displayBaskets">
    61     <xsl:if test="$berryBasketOn or $favouriteBasketOn or ($documentBasketOn and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor)))">
    62       <div id="rightSidebar">
    63     <xsl:if test="$berryBasketOn">
    64       <!-- show the berry basket if it's turned on -->
    65       <gslib:berryBasket/>
    66       <xsl:text> </xsl:text>
    67     </xsl:if>
    68 
    69     <xsl:if test="$favouriteBasketOn">
    70       <!-- show the favourites 'basket' if it's turned on -->
    71       <gslib:gotoFavourites/>
    72       <xsl:text> </xsl:text>
    73     </xsl:if>
    74 
    75     <xsl:if test="$documentBasketOn and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor))">
    76       <gslib:documentBasket/>
    77       <xsl:text> </xsl:text>
    78     </xsl:if>
    79       </div>
    80     </xsl:if>
    81   </xsl:template>
    8260
    8361  <xsl:template name="displayResults">
    84     <xsl:if test="/page/pageResponse/facetList/facet">
     62    <xsl:if test="/page/pageResponse/facetList/facet/count">
    8563      <xsl:call-template name="displayFacets"/>
    8664    </xsl:if>
    8765    <div id="resultsArea">
    8866      <xsl:attribute name="class">
    89     <xsl:if test="/page/pageResponse/facetList/facet">facetedResults</xsl:if>
     67    <xsl:if test="/page/pageResponse/facetList/facet/count">facetedResults</xsl:if>
    9068      </xsl:attribute>
    9169      <table id="resultsTable">
     
    11896      <xsl:call-template name="prevNextButtons"/>
    11997    </div>
    120     <xsl:if test="/page/pageResponse/facetList/facet">
     98    <xsl:if test="/page/pageResponse/facetList/facet/count">
    12199      <div style="clear:both;">
    122100    <xsl:text> </xsl:text>
     
    130108      <xsl:text> </xsl:text>
    131109    </script>
    132     <div id="facetSelector">
     110    <div id="facetSelector" style="position: relative; top: 100px;" >
    133111      <xsl:for-each select="/page/pageResponse/facetList/facet">
    134112    <xsl:if test="count(count) > 0">
     
    148126          </xsl:choose>
    149127        </xsl:variable>
    150 
     128       
    151129        <li class="ui-widget-header" style="text-transform:capitalize; text-align:center;">
    152130          <xsl:value-of select="displayItem[@name='name']"/>
     
    176154      </xsl:for-each>
    177155    </div>
    178 
    179   </xsl:template>
     156  </xsl:template>
     157
    180158  <!-- this usually gets overriden in collectionConfig.xml -->
    181159  <gsf:template match="documentNode">
     
    227205        <xsl:when test="/page/pageResponse/hierarchy and paramList/param[@name ='collection']">
    228206          <xsl:call-template name="CCSParams"> <!-- cross coll search -->
    229         <xsl:with-param name="ns" select="$ns" />
    230           </xsl:call-template>
     207          <xsl:with-param name="ns" select="$ns" />
     208        </xsl:call-template>
    231209        </xsl:when>
    232210        <xsl:otherwise>
     
    259237
    260238  <xsl:template name="CCSParams">
     239
    261240    <xsl:param name="ns" />
    262241    <xsl:variable name="currentSelection"><xsl:value-of select="util:getFormattedCCSSelection(/page/pageRequest/paramList/param[@name='s1.collection']/@value,/page/pageRequest/paramList/param[@name='s1.group']/@value)"/></xsl:variable>
Note: See TracChangeset for help on using the changeset viewer.