• Fixed bug where labs and tutorials hard-coded the default number of rows to 2 rather than @lectures-per-week.
1 parent 643005e commit 42187382bfd7b7d20ee45177d497c30f327cb8d9
Nigel Stanger authored on 2 Jul 2014
Showing 1 changed file
View
16
modules/paper-calendar.xml
</common>
<common formats="/latex/xelatex/">
<xsl:if test="$numbered = 'yes'">
<xsl:call-template name="generate-number-cell">
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else ancestor::calendar/@lectures-per-week" />
<xsl:with-param name="number" select="1 + count( preceding::laboratory[node()] )" />
</xsl:call-template>
<xsl:call-template name="tabular-column-separator" />
</xsl:if>
<xsl:call-template name="generate-content-cell">
<xsl:with-param name="columns" select="if ( $numbered = 'yes' ) then 1 else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else ancestor::calendar/@lectures-per-week" />
</xsl:call-template>
</common>
<common formats="/html/xhtml/">
<xsl:if test="$numbered = 'yes'">
<xsl:call-template name="generate-number-cell">
<xsl:with-param name="colour">ltblue</xsl:with-param>
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else ancestor::calendar/@lectures-per-week" />
<xsl:with-param name="number" select="1 + count( preceding::laboratory[node()] )" />
</xsl:call-template>
</xsl:if>
 
<xsl:call-template name="generate-content-cell">
<xsl:with-param name="colour">ltblue</xsl:with-param>
<xsl:with-param name="columns" select="if ( $numbered = 'yes' ) then 1 else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else ancestor::calendar/@lectures-per-week" />
</xsl:call-template>
</common>
</template>
 
</common>
<common formats="/latex/xelatex/">
<xsl:if test="$numbered = 'yes'">
<xsl:call-template name="generate-number-cell">
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else ancestor::calendar/@lectures-per-week" />
<xsl:with-param name="number" select="1 + count( preceding::tutorial[node()] )" />
</xsl:call-template>
<xsl:call-template name="tabular-column-separator" />
</xsl:if>
<xsl:call-template name="generate-content-cell">
<xsl:with-param name="columns" select="if ( $numbered = 'yes' ) then 1 else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else ancestor::calendar/@lectures-per-week" />
</xsl:call-template>
</common>
<common formats="/html/xhtml/">
<xsl:if test="$numbered = 'yes'">
<xsl:call-template name="generate-number-cell">
<xsl:with-param name="colour">medgreen</xsl:with-param>
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else ancestor::calendar/@lectures-per-week" />
<xsl:with-param name="number" select="1 + count( preceding::tutorial[node()] )" />
</xsl:call-template>
</xsl:if>
 
<xsl:call-template name="generate-content-cell">
<xsl:with-param name="colour">medgreen</xsl:with-param>
<xsl:with-param name="columns" select="if ( $numbered = 'yes' ) then 1 else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else ancestor::calendar/@lectures-per-week" />
</xsl:call-template>
</common>
</template>