Kalender: Pentaradio-Termine (bitte anpassen bei Announcement)

Kalenderlinks dürfen jetzt relativ sein


git-svn-id: svn://svn.c3d2.de/c3d2-web/trunk@965 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
astro 2007-05-18 13:25:53 +00:00
parent 9fdaecdfaf
commit 0845964088
3 changed files with 43 additions and 14 deletions

View File

@ -140,4 +140,12 @@
<start>2007-05-19</start> <start>2007-05-19</start>
<link>http://odd.fritalk.com/de/OpenDiscussionDay</link> <link>http://odd.fritalk.com/de/OpenDiscussionDay</link>
</event> </event>
<event title="Pentaradio">
<start>2007-05-22</start>
<link>radio.html</link>
</event>
<event title="Pentaradio">
<start>2007-06-26</start>
<link>radio.html</link>
</event>
</calendar> </calendar>

View File

@ -101,9 +101,16 @@
</xsl:call-template> </xsl:call-template>
</xsl:variable> </xsl:variable>
<xsl:if test="(date:seconds($start) &lt;= date:seconds($date)) and (date:seconds($date) &lt;= date:seconds($end))"> <xsl:if test="(date:seconds($start) &lt;= date:seconds($date))
and (date:seconds($date) &lt;= date:seconds($end))">
<xsl:variable name="href">
<xsl:call-template name="make-href">
<xsl:with-param name="href" select="link"/>
</xsl:call-template>
</xsl:variable>
<li> <li>
<a href="{link}"> <a href="{$href}">
<xsl:value-of select="title"/> <xsl:value-of select="title"/>
</a> </a>
</li> </li>

View File

@ -60,17 +60,9 @@
<xsl:template match="link"> <xsl:template match="link">
<xsl:variable name="href"> <xsl:variable name="href">
<xsl:choose> <xsl:call-template name="make-href">
<xsl:when test="@href and not(contains(@href, ':'))"> <xsl:with-param name="href" select="@href"/>
<xsl:value-of select="concat($baseurl,@href)"/> </xsl:call-template>
</xsl:when>
<xsl:when test="@href">
<xsl:value-of select="@href"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable> </xsl:variable>
<a href="{$href}"> <a href="{$href}">
@ -78,6 +70,22 @@
</a> </a>
</xsl:template> </xsl:template>
<xsl:template name="make-href">
<xsl:param name="href"/>
<xsl:choose>
<xsl:when test="$href and not(contains($href, ':'))">
<xsl:value-of select="concat($baseurl,$href)"/>
</xsl:when>
<xsl:when test="$href">
<xsl:value-of select="$href"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="em"> <xsl:template match="em">
<em> <em>
<xsl:value-of select="."/> <xsl:value-of select="."/>
@ -171,12 +179,18 @@
<xsl:sort select="date:seconds(start)" data-type="number" order="ascending" /> <xsl:sort select="date:seconds(start)" data-type="number" order="ascending" />
<xsl:if test="position() &lt;= $limit"> <xsl:if test="position() &lt;= $limit">
<xsl:variable name="href">
<xsl:call-template name="make-href">
<xsl:with-param name="href" select="link"/>
</xsl:call-template>
</xsl:variable>
<li> <li>
<xsl:call-template name="datespan-to-human"> <xsl:call-template name="datespan-to-human">
<xsl:with-param name="start" select="start"/> <xsl:with-param name="start" select="start"/>
<xsl:with-param name="end" select="end"/> <xsl:with-param name="end" select="end"/>
</xsl:call-template>: </xsl:call-template>:
<a href="{link}"> <a href="{$href}">
<xsl:value-of select="title"/> <xsl:value-of select="title"/>
</a> </a>
</li> </li>