Calendar: Support dates spanning multiple days
git-svn-id: svn://svn.c3d2.de/c3d2-web/trunk@548 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
parent
e3b6b406cf
commit
581b4f7dbf
|
@ -27,4 +27,10 @@
|
|||
<location>global</location>
|
||||
<link>http://de.wikipedia.org/wiki/Kauf-Nix-Tag</link>
|
||||
</event>
|
||||
<event title="23C3">
|
||||
<start>2006-12-27</start>
|
||||
<end>2006-12-30</end>
|
||||
<location>Berlin</location>
|
||||
<link>http://www.ccc.de/congress/</link>
|
||||
</event>
|
||||
</calendar>
|
||||
|
|
|
@ -39,7 +39,17 @@
|
|||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</title>
|
||||
<date><xsl:value-of select="start"/></date>
|
||||
<start><xsl:value-of select="start"/></start>
|
||||
<end>
|
||||
<xsl:choose>
|
||||
<xsl:when test="end">
|
||||
<xsl:value-of select="end"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="start"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</end>
|
||||
<location><xsl:value-of select="location"/></location>
|
||||
<link>
|
||||
<xsl:choose>
|
||||
|
|
|
@ -73,8 +73,13 @@
|
|||
</span>
|
||||
<ul>
|
||||
<xsl:for-each select="event">
|
||||
<xsl:sort select="date"/>
|
||||
<xsl:if test="concat(date:year($date),'-',date:month-in-year($date),'-',date:day-in-month($date)) = concat(date:year(date),'-',date:month-in-year(date),'-',date:day-in-month(date))">
|
||||
<xsl:sort select="start"/>
|
||||
|
||||
<xsl:variable name="start" select="concat(format-number(date:year(start),'00'),format-number(date:month-in-year(start),'00'),format-number(date:day-in-month(start),'00'))"/>
|
||||
<xsl:variable name="end" select="concat(format-number(date:year(end),'00'),format-number(date:month-in-year(end),'00'),format-number(date:day-in-month(end),'00'))"/>
|
||||
<xsl:variable name="date" select="concat(format-number(date:year($date),'00'),format-number(date:month-in-year($date),'00'),format-number(date:day-in-month($date),'00'))"/>
|
||||
|
||||
<xsl:if test="($start <= $date) and ($date <= $end)">
|
||||
<li>
|
||||
<a href="{link}">
|
||||
<xsl:value-of select="title"/>
|
||||
|
|
Loading…
Reference in New Issue