Changeset 30841


Ignore:
Timestamp:
09/22/16 12:14:33 (4 years ago)
Author:
kjdon
Message:

site name and description are now displayItems rather than metadata. and at site and colleciton level, displayItems are in a displayItemList, to match metadataList

File:
1 edited

Legend:

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

    r30825 r30841  
    2323
    2424  <xsl:template name="siteName">
    25     <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteName']"/>
     25    <xsl:value-of select="/page/pageResponse/displayItemList/displayItem[@name='siteName']"/>
    2626  </xsl:template>
    2727
    2828  <xsl:template name="siteDescription">
    29     <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteDescription']"/>
     29    <xsl:value-of select="/page/pageResponse/displayItemList/displayItem[@name='siteDescription']"/>
    3030  </xsl:template>
    3131
     
    5959    <xsl:choose>
    6060      <xsl:when test="/page/pageResponse/collection">
    61         <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/>
     61        <xsl:value-of select="/page/pageResponse/collection/displayItemList/displayItem[@name='name']"/>
    6262      </xsl:when>
    6363      <xsl:otherwise>All Collections</xsl:otherwise>
     
    213213        <a href="{$group_href}" title="{$desc}">
    214214          <img class="groupLinkImage">
    215             <xsl:attribute name="alt"><xsl:value-of select="displayItem[@name='name']"/></xsl:attribute>
     215            <xsl:attribute name="alt"><xsl:value-of select="displayItemList/displayItem[@name='name']"/></xsl:attribute>
    216216            <xsl:attribute name="src">sites/<xsl:value-of select="$site_name"/>/<xsl:value-of select="backgroundImage"/></xsl:attribute>
    217217          </img>
     
    239239 
    240240  <xsl:template name="collectionLinkWithImage">
    241     <xsl:variable name="desc"><xsl:value-of select="displayItem[@name='shortDescription']"/></xsl:variable>
     241    <xsl:variable name="desc"><xsl:value-of select="displayItemList/displayItem[@name='shortDescription']"/></xsl:variable>
    242242    <xsl:variable name="coll_href"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="@name"/>/page/about<xsl:choose><xsl:when test="libraryParamList/param">?<xsl:for-each select="libraryParamList/param"><xsl:value-of select="@name"/>=<xsl:value-of select="@default"/>&amp;</xsl:for-each></xsl:when></xsl:choose></xsl:variable>
    243243    <xsl:choose>
    244       <xsl:when test="displayItem[@name='smallicon']">
     244      <xsl:when test="displayItemList/displayItem[@name='smallicon']">
    245245        <a href="{$coll_href}" title="{$desc}">
    246246          <img class="collectionLinkImage">
    247             <xsl:attribute name="alt"><xsl:value-of select="displayItem[@name='name']"/></xsl:attribute>
    248             <xsl:attribute name="src">sites/<xsl:value-of select="$site_name"/>/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="displayItem[@name='smallicon']"/></xsl:attribute>
     247            <xsl:attribute name="alt"><xsl:value-of select="displayItemList/displayItem[@name='name']"/></xsl:attribute>
     248            <xsl:attribute name="src">sites/<xsl:value-of select="$site_name"/>/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="displayItemList/displayItem[@name='smallicon']"/></xsl:attribute>
    249249          </img>
    250250        </a>
     
    254254          <div class="collectionLink ui-corner-all">
    255255            <div class="collectionLinkText ui-widget-content ui-corner-top">
    256                 <xsl:choose><xsl:when test="displayItem[@name='name']"><xsl:value-of select="displayItem[@name='name']"/></xsl:when>
     256                <xsl:choose><xsl:when test="displayItemList/displayItem[@name='name']"><xsl:value-of select="displayItemList/displayItem[@name='name']"/></xsl:when>
    257257                <xsl:otherwise>
    258258                  <xsl:value-of select="@name"/>
     
    276276      <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
    277277        <xsl:value-of select="@name"/>
    278         <xsl:value-of select="displayItem[@name='name']"/>
     278        <xsl:value-of select="displayItemList/displayItem[@name='name']"/>
    279279      </a>
    280280    </xsl:for-each>
     
    383383  <xsl:template name="aboutCollectionPageTitle">
    384384    <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    385     <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/>
     385    <xsl:value-of select="/page/pageResponse/collection/displayItemList/displayItem[@name='name']"/>
    386386    <xsl:text> </xsl:text>
    387387  </xsl:template>
     
    390390    <a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
    391391      <xsl:choose>
    392         <xsl:when test="$this-element/displayItem[@name='icon']">
     392        <xsl:when test="$this-element/displayItemList/displayItem[@name='icon']">
    393393          <img border="0">
    394             <xsl:attribute name="src"><xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/></xsl:attribute>
     394            <xsl:attribute name="src"><xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItemList/displayItem[@name='icon']"/></xsl:attribute>
    395395            <xsl:attribute name="alt">
    396               <xsl:value-of select="$this-element/displayItem[@name='name']"/>
     396              <xsl:value-of select="$this-element/displayItemList/displayItem[@name='name']"/>
    397397            </xsl:attribute>
    398398            <xsl:attribute name="title">
     
    402402        </xsl:when>
    403403        <xsl:otherwise>
    404           <xsl:value-of select="$this-element/displayItem[@name='name']"/>
     404          <xsl:value-of select="$this-element/displayItemList/displayItem[@name='name']"/>
    405405        </xsl:otherwise>
    406406      </xsl:choose>
     
    501501  </xsl:template>
    502502  <xsl:template match="collection|serviceCluster">
    503     <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
     503    <xsl:value-of select="displayItemList/displayItem[@name='description']" disable-output-escaping="yes"/>
    504504<!-- Uncomment this section if you want the collection service links and their descriptions to appear -->
    505505    <!--<xsl:apply-templates select="serviceList">
Note: See TracChangeset for help on using the changeset viewer.