fix many glitches

This commit is contained in:
Chris Danford
2005-06-14 23:40:13 +00:00
parent 45e66beddf
commit 9ba180f621
@@ -320,6 +320,10 @@
<xsl:template mode="Popularity" match="/Stats/SongScores | /Stats/CourseScores"> <xsl:template mode="Popularity" match="/Stats/SongScores | /Stats/CourseScores">
<xsl:variable name="Type" select="substring-before(name(),'Scores')" /> <xsl:variable name="Type" select="substring-before(name(),'Scores')" />
<xsl:variable name="TypePlural">
<xsl:if test="$Type='Song'">Songs</xsl:if>
<xsl:if test="$Type='Course'">Courses</xsl:if>
</xsl:variable>
<xsl:variable name="SubType"> <xsl:variable name="SubType">
<xsl:if test="$Type='Song'">Steps</xsl:if> <xsl:if test="$Type='Song'">Steps</xsl:if>
<xsl:if test="$Type='Course'">Trail</xsl:if> <xsl:if test="$Type='Course'">Trail</xsl:if>
@@ -367,14 +371,14 @@
<xsl:with-param name="text"> <xsl:with-param name="text">
<xsl:call-template name="PrintVerticalDataTable"> <xsl:call-template name="PrintVerticalDataTable">
<xsl:with-param name="text"> <xsl:with-param name="text">
<xsl:for-each select="$Catalog/*/*[name(.)=$Type]/*[name(.)=$Type]"> <xsl:for-each select="$Catalog/*[name(.)=$TypePlural]/*[name(.)=$Type]">
<xsl:variable name="Dir" select="@Dir" /> <xsl:variable name="Dir" select="@Dir" />
<xsl:variable name="Path" select="@Path" /> <xsl:variable name="Path" select="@Path" />
<xsl:variable name="NumPlays" select="sum($Stats/*/*[@Dir=$Dir or @Path=$Path]/*/HighScoreList/NumTimesPlayed)" /> <xsl:variable name="NumPlays" select="sum($Stats/*/*[@Dir=$Dir or @Path=$Path]/*/HighScoreList/NumTimesPlayed)" />
<xsl:if test="$NumPlays = 0"> <xsl:if test="$NumPlays = 0">
<xsl:call-template name="PrintVerticalDataRow"> <xsl:call-template name="PrintVerticalDataRow">
<xsl:with-param name="name"> <xsl:with-param name="name">
<xsl:apply-templates select="@Dir | @Path"/> <xsl:apply-templates select="." mode="AttributeTitleGenerator" />
</xsl:with-param> </xsl:with-param>
</xsl:call-template> </xsl:call-template>
</xsl:if> </xsl:if>
@@ -411,10 +415,10 @@
<xsl:value-of select="position()" /> <xsl:value-of select="position()" />
</td> </td>
<td> <td>
<xsl:apply-templates select="../@Dir | ../@Path" /> <xsl:apply-templates select=".." />
</td> </td>
<td> <td>
<xsl:apply-templates select="@Difficulty | @CourseDifficulty" /> <xsl:apply-templates select="." mode="AttributeTitleGenerator" />
</td> </td>
<td> <td>
<span class="dyndata"> <span class="dyndata">
@@ -547,7 +551,7 @@
<xsl:call-template name="CollapsibleSubSection"> <xsl:call-template name="CollapsibleSubSection">
<xsl:with-param name="title"> <xsl:with-param name="title">
<xsl:value-of select="$StepsType" /> <xsl:apply-templates select="$StepsType" />
</xsl:with-param> </xsl:with-param>
<xsl:with-param name="text"> <xsl:with-param name="text">
@@ -719,9 +723,6 @@
<xsl:for-each select="HighScoreForASongAndSteps | HighScoreForACourseAndTrail"> <xsl:for-each select="HighScoreForASongAndSteps | HighScoreForACourseAndTrail">
<xsl:sort select="./*/HighScore/DateTime" order="descending" /> <xsl:sort select="./*/HighScore/DateTime" order="descending" />
<xsl:apply-templates select="." /> <xsl:apply-templates select="." />
<xsl:if test="position() != last()">
<hr />
</xsl:if>
</xsl:for-each> </xsl:for-each>
</xsl:with-param> </xsl:with-param>
</xsl:call-template> </xsl:call-template>
@@ -730,27 +731,20 @@
<xsl:template match="HighScoreForASongAndSteps | HighScoreForACourseAndTrail"> <xsl:template match="HighScoreForASongAndSteps | HighScoreForACourseAndTrail">
<xsl:element name="table" use-attribute-sets="EntityTableAttr"> <xsl:call-template name="SubSectionCompact">
<tr> <xsl:with-param name="title">
<td> <xsl:apply-templates select="*" mode="AttributeTitleGenerator" />
<xsl:apply-templates select="*/@Dir | */@Path" /> </xsl:with-param>
</td> <xsl:with-param name="text">
<td>
<xsl:apply-templates select="*/@StepsType" />
</td>
<td>
<xsl:apply-templates select="*/@Difficulty | */@CourseDifficulty" />
</td>
</tr>
</xsl:element>
<xsl:apply-templates select="HighScore" /> <xsl:apply-templates select="HighScore" />
</xsl:with-param>
</xsl:call-template>
</xsl:template> </xsl:template>
<!-- ScreenshotData --> <!-- ScreenshotData -->