Skip to content

Commit

Permalink
Re-do attributes list as a table to support annotation badges
Browse files Browse the repository at this point in the history
  • Loading branch information
amoeba committed Jul 24, 2019
1 parent 9ba7260 commit 2edb50e
Showing 1 changed file with 32 additions and 34 deletions.
66 changes: 32 additions & 34 deletions lib/style/skins/metacatui/eml-2/eml-attribute.xsl
Expand Up @@ -76,40 +76,38 @@
<div class="row-fluid"> <div class="row-fluid">
<div class="span2"> <div class="span2">
<!-- render the side nav --> <!-- render the side nav -->
<ul class="nav nav-list" id="attributeTabs"> <span class="nav-header">Variables</span>
<li class="nav-header">Variables</li> <table class="attributeListTable">
<xsl:for-each select="attribute"> <tbody>
<xsl:variable name="attributeindex" select="position()"/> <xsl:for-each select="attribute">
<li> <xsl:variable name="attributeindex" select="position()"/>
<xsl:if test="position() = 1"> <tr>
<xsl:attribute name="class">active</xsl:attribute> <td><xsl:if test="annotation"><i class="icon icon-ok-circle"></i></xsl:if></td>
</xsl:if> <td>
<a data-toggle="tab"> <xsl:if test="position() = 1">
<xsl:attribute name="title"><xsl:value-of select="attributeName"/></xsl:attribute> <xsl:attribute name="class">active</xsl:attribute>
<xsl:attribute name="href">#entity_<xsl:value-of select="$entityindex"/>_attribute_<xsl:value-of select="$attributeindex"/></xsl:attribute> </xsl:if>
<xsl:choose> <a data-toggle="tab">
<xsl:when test="references!=''"> <xsl:attribute name="title"><xsl:value-of select="attributeName"/></xsl:attribute>
<xsl:variable name="ref_id" select="references"/> <xsl:attribute name="href">#entity_<xsl:value-of select="$entityindex"/>_attribute_<xsl:value-of select="$attributeindex"/></xsl:attribute>
<xsl:variable name="references" select="$ids[@id=$ref_id]" /> <xsl:choose>
<xsl:for-each select="$references"> <xsl:when test="references!=''">
<xsl:if test="annotation"> <xsl:variable name="ref_id" select="references"/>
<i class="icon icon-ok-circle"></i> <xsl:variable name="references" select="$ids[@id=$ref_id]" />
</xsl:if> <xsl:for-each select="$references">
<xsl:value-of select="attributeName"/> <xsl:value-of select="attributeName"/>
</xsl:for-each> </xsl:for-each>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:if test="annotation"> <xsl:value-of select="attributeName"/>
<i class="icon icon-ok-circle"></i> </xsl:otherwise>
</xsl:if> </xsl:choose>
<xsl:value-of select="attributeName"/> </a>
</xsl:otherwise> </td>
</xsl:choose> </tr>

</xsl:for-each>
</a> </tbody>
</li> </table>
</xsl:for-each>
</ul>
</div> </div>


<div class="tab-content span10"> <div class="tab-content span10">
Expand Down

0 comments on commit 2edb50e

Please sign in to comment.