more efficient single-column layout in Steps/Trail catalog

This commit is contained in:
Chris Danford
2005-05-24 05:24:09 +00:00
parent 917870294f
commit bae493ea81
2 changed files with 39 additions and 16 deletions
@@ -78,7 +78,7 @@
</xsl:template>
<xsl:template match="Steps | Trail">
<xsl:call-template name="CollapsibleSubSection">
<xsl:call-template name="SubSectionCompact">
<xsl:with-param name="title">
<xsl:apply-templates select="." mode="AttributeTitleGenerator" />
</xsl:with-param>
@@ -87,19 +87,10 @@
<xsl:element name="table" use-attribute-sets="EntityTableAttr">
<xsl:call-template name="DataTableGenerator">
<xsl:with-param name="cols" select="1" />
<xsl:with-param name="nodeset" select="*[text()]" />
<xsl:with-param name="nodeset" select="*[text()] | ./*/*[text()]" />
</xsl:call-template>
</xsl:element>
<hr />
<xsl:for-each select="./*[count(*) &gt; 0]">
<xsl:element name="table" use-attribute-sets="EntityTableAttr">
<xsl:call-template name="DataTableGenerator">
<xsl:with-param name="cols" select="2" />
<xsl:with-param name="nodeset" select="*[text()]" />
</xsl:call-template>
</xsl:element>
</xsl:for-each>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
@@ -16,6 +16,7 @@
</xsl:attribute-set>
<xsl:attribute-set name="DataTableAttr">
<xsl:attribute name="align">left</xsl:attribute>
<xsl:attribute name="cellpadding">2</xsl:attribute>
<xsl:attribute name="cellspacing">0</xsl:attribute>
<xsl:attribute name="border">0</xsl:attribute>
@@ -27,9 +28,18 @@
<xsl:attribute name="border">0</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="CollapsableTableAttr">
<xsl:attribute name="cellpadding">3</xsl:attribute>
<xsl:attribute name="cellspacing">1</xsl:attribute>
<xsl:attribute name="border">0</xsl:attribute>
<xsl:attribute name="width">100%</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="CompactTableAttr">
<xsl:attribute name="cellpadding">0</xsl:attribute>
<xsl:attribute name="cellspacing">0</xsl:attribute>
<xsl:attribute name="align">left</xsl:attribute>
<xsl:attribute name="class">CompactTableAttr</xsl:attribute>
<xsl:attribute name="cellpadding">3</xsl:attribute>
<xsl:attribute name="cellspacing">1</xsl:attribute>
<xsl:attribute name="border">0</xsl:attribute>
</xsl:attribute-set>
@@ -265,6 +275,10 @@ HR {
font-size: 10px;
font-weight: bold;
}
.CompactTableAttr {
margin: 2px 2px 2px 2px;
}
</style>
</head>
@@ -748,7 +762,7 @@ HR {
<xsl:call-template name="CollapsibleSubSection">
<xsl:with-param name="title" select="$title" />
<xsl:with-param name="text">
<xsl:element name="table" use-attribute-sets="EntityTableAttr">
<xsl:element name="table" use-attribute-sets="CollapsableTableAttr">
<tr>
<td>
<xsl:copy-of select="$text" />
@@ -763,7 +777,7 @@ HR {
<xsl:template name="CollapsibleSubSection">
<xsl:param name="title" />
<xsl:param name="text" />
<xsl:element name="table" use-attribute-sets="EntityTableAttr">
<xsl:element name="table" use-attribute-sets="CollapsableTableAttr">
<tr>
<xsl:element name="th" use-attribute-sets="ToggleLinkAttr">
<xsl:attribute name="class">main</xsl:attribute>
@@ -779,6 +793,24 @@ HR {
</xsl:element>
</xsl:template>
<xsl:template name="SubSectionCompact">
<xsl:param name="title" />
<xsl:param name="text" />
<xsl:element name="table" use-attribute-sets="CompactTableAttr">
<tr>
<xsl:element name="th">
<xsl:attribute name="class">main</xsl:attribute>
<xsl:value-of select="$title" />
</xsl:element>
</tr>
<tr name="hide">
<td style="background: #F4F6F7;">
<xsl:copy-of select="$text" />
</td>
</tr>
</xsl:element>
</xsl:template>
<xsl:template name="CollapsibleTopSection">
<xsl:param name="title" />
<xsl:param name="text" />