Changeset 31380

Show
Ignore:
Timestamp:
02.02.2017 14:35:25 (3 years ago)
Author:
kjdon
Message:

added some new templates to do with collection groups. modified selectACollectionTextBar to display a different message depending on whether there are groups or collecitons or both or none.

Files:
1 modified

Legend:

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

    r31186 r31380  
    188188   
    189189  <xsl:template name="selectACollectionTextBar"> 
    190     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/> 
     190    <xsl:choose> 
     191      <xsl:when test="/page/pageResponse/groupList/group and /page/pageResponse/collectionList/collection"> 
     192      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection_or_group')"/> 
     193      </xsl:when> 
     194      <xsl:when test="/page/pageResponse/groupList/group"> 
     195    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_group')"/> 
     196      </xsl:when> 
     197      <xsl:when test="/page/pageResponse/collectionList/collection"> 
     198    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/> 
     199      </xsl:when> 
     200      <xsl:otherwise> 
     201    <xsl:choose> 
     202      <xsl:when test="/page/pageResponse/pathList/group"> 
     203        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.no_collections_group')"/> 
     204      </xsl:when> 
     205      <xsl:otherwise> 
     206        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.no_collections')"/> 
     207      </xsl:otherwise> 
     208    </xsl:choose> 
     209      </xsl:otherwise> 
     210    </xsl:choose> 
    191211  </xsl:template> 
    192212   
     
    221241  </xsl:template> 
    222242   
     243  <xsl:template name="groupName"> 
     244    <xsl:param name="path"/> 
     245    <xsl:value-of select="/page/pageResponse/pathList/group[@path=$path]/title"/> 
     246  </xsl:template> 
     247  <xsl:template name="groupDescription"> 
     248    <xsl:param name="path"/> 
     249    <xsl:value-of select="/page/pageResponse/pathList/group[@path=$path]/description"/> 
     250  </xsl:template> 
     251 
     252  <xsl:template name="groupHref"> 
     253    <xsl:param name="path"/> 
     254    <xsl:value-of select="$library_name"/>?a=p&amp;sa=home&amp;group=<xsl:value-of select="@path"/> 
     255  </xsl:template> 
     256 
    223257  <xsl:template name="groupLinkWithImage"> 
    224258    <xsl:variable name="desc"><xsl:value-of select="description"/></xsl:variable>