Disgusting implemention of flexible endings for the website.
This commit is contained in:
parent
6bedb03e6e
commit
13163a8686
14
xsl/ics.xsl
14
xsl/ics.xsl
|
@ -20,7 +20,6 @@ END:VCALENDAR
|
|||
<xsl:template name="eventitem">
|
||||
<xsl:variable name="room" select="@room" />
|
||||
<xsl:variable name="start" select="csc:ical-datetime(@date, @time)" />
|
||||
<xsl:variable name="end" select="csc:ical-datetime(@date, @time, 60)" />
|
||||
<xsl:variable name="title" select="csc:ical-escape(@title)" />
|
||||
<xsl:variable name="short" select="csc:ical-escape(string(short))" />
|
||||
<xsl:variable name="abstract" select="csc:ical-escape(string(abstract))" />
|
||||
|
@ -30,7 +29,20 @@ DTSTAMP:20060912T200708Z
|
|||
UID:<xsl:value-of select="$start" />@csclub.uwaterloo.ca
|
||||
SEQUENCE:11
|
||||
DTSTART:<xsl:value-of select="$start" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="@edate and @etime">
|
||||
<xsl:variable name="end" select="csc:ical-datetime(@edate, @etime)" />
|
||||
DTEND:<xsl:value-of select="$end" />
|
||||
</xsl:when>
|
||||
<xsl:when test="string(@etime)">
|
||||
<xsl:variable name="end" select="csc:ical-datetime(@date, @etime)" />
|
||||
DTEND:<xsl:value-of select="$end" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:variable name="end" select="csc:ical-datetime(@date, @time, 60)" />
|
||||
DTEND:<xsl:value-of select="$end" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
SUMMARY:<xsl:value-of select="$title" /><xsl:if test="$short != ''"> -- <xsl:value-of select="$short" /></xsl:if>
|
||||
DESCRIPTION:<xsl:value-of select="$abstract" />
|
||||
END:VEVENT
|
||||
|
|
Loading…
Reference in New Issue