Changeset 36528


Ignore:
Timestamp:
2022-08-29T08:08:59+12:00 (5 weeks ago)
Author:
kjdon
Message:

only display a line in metadata-table if there is a metadata value. or if show_if_empty = true

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/expand-gsf.xsl

    r36506 r36528  
    682682      <tbody>
    683683    <xsl:for-each select="gsf:metadata">
     684
     685      <xsl:variable name="meta-path">(./metadataList)[last()]/metadata[@name='<xsl:call-template name="getMetadataName"/>']<xsl:if test="@pos">[<xsl:value-of select="@pos"/>]</xsl:if></xsl:variable>
     686
     687      <xslt:if><xsl:attribute name="test"><xsl:choose><xsl:when test="@show-if-empty='true'">true()</xsl:when><xsl:otherwise><xsl:value-of select="$meta-path"/></xsl:otherwise></xsl:choose></xsl:attribute>
    684688    <tr>
    685689      <td>
     
    704708      </td>
    705709    </tr>
     710      </xslt:if>
    706711    </xsl:for-each>
    707712   
Note: See TracChangeset for help on using the changeset viewer.