<xsl:import href="common.xsl"/>
-<xsl:output method="html"/>
+<xsl:output method="xml"/>
+
+<xsl:param name="events-class" select="''"/>
+<xsl:param name="today"/>
<xsl:template match="/">
<html>
<head>
- <title>Events</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="../style/mowgli.css" type="text/css"/>
+ <title>
+ <xsl:value-of select="$events-class"/>
+ <xsl:text> Events</xsl:text>
+ </title>
</head>
<body>
- <xsl:call-template name="head">
- <xsl:with-param name="path_to_top" select="'.'"/>
- </xsl:call-template>
- <h1>Mowgli Events</h1>
+ <h1>
+ <xsl:value-of select="$events-class"/>
+ <xsl:text> Events</xsl:text>
+ </h1>
+ <xsl:if test="$events-class = 'Other'">
+ [Sorted by event date] [<a href="deadlines.html">Sorted by deadline</a>]
+ <br /><br />
+ <hr />
+ </xsl:if>
+ <dl>
+ <xsl:apply-templates select="events/event[when/begin >= $today]">
+ <xsl:sort select="when/begin" data-type="number"/>
+ </xsl:apply-templates>
+ </dl>
<hr />
- <h1>Events Related to Mowgli</h1>
+ <h1>Past Events</h1>
<dl>
- <xsl:apply-templates/>
+ <xsl:apply-templates select="events/event[when/begin < $today]">
+ <xsl:sort select="when/begin" data-type="number"/>
+ </xsl:apply-templates>
</dl>
- <xsl:call-template name="foot">
- <xsl:with-param name="path_to_top" select="'.'"/>
- </xsl:call-template>
</body>
</html>
</xsl:template>
<xsl:text> </xsl:text>
</xsl:if>
<xsl:if test="when">
- <b><xsl:value-of select="when"/></b>
+ <b>
+ <xsl:call-template name="print_interval">
+ <xsl:with-param name="begin" select="when/begin/text()"/>
+ <xsl:with-param name="end" select="when/end/text()"/>
+ </xsl:call-template>
+ </b>
<br />
</xsl:if>
<xsl:if test="description">
<xsl:template match="deadline">
<li>
- <b><xsl:value-of select="date"/></b>
+ <xsl:variable name="kind">
+ <xsl:call-template name="color_of_deadline_kind">
+ <xsl:with-param name="kind" select="@kind"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <b>
+ <span style="color: {$kind}">
+ <xsl:call-template name="print_date">
+ <xsl:with-param name="date" select="date/text()"/>
+ </xsl:call-template>
+ </span>
+ </b>
<xsl:text> </xsl:text>
<xsl:value-of select="description"/>
</li>