start/end time and link tocalendar added in common.xsl for portal.html

This commit is contained in:
vv01f 2014-02-28 02:56:00 +01:00
parent 134db6ac98
commit 711beb8e95
2 changed files with 35 additions and 18 deletions

View File

@ -77,7 +77,7 @@
<xsl:otherwise>3</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<!-- vv01f: adding id to jump to a specific date with links and hashtag liek {$month}-{$day} //-->
<!-- vv01f: added id to jump to a specific date with links and hashtag liek {$month}-{$day} //-->
<xsl:attribute name="id">
<xsl:value-of select="concat(date:month-in-year($date), '-', date:day-in-month($date))"/>
</xsl:attribute>

View File

@ -235,24 +235,41 @@
</xsl:variable>
<li>
<xsl:call-template name="datespan-to-human">
<xsl:with-param name="start" select="start"/>
<xsl:with-param name="end" select="end"/>
</xsl:call-template>:
<a>
<xsl:if test="string-length($href) &gt; 0">
<xsl:attribute name="href">
<xsl:value-of select="$href"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="string-length(location) &gt; 0">
<xsl:attribute name="title">
<xsl:value-of select="concat('Ort: ', location)"/>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="title"/>
</a>
<xsl:call-template name="datespan-to-human">
<xsl:with-param name="start" select="start"/>
<xsl:with-param name="end" select="end"/>
</xsl:call-template>:
<a>
<xsl:if test="string-length($href) &gt; 0">
<xsl:attribute name="href">
<xsl:value-of select="$href"/>
</xsl:attribute>
</xsl:if>
<!-- vv01f: added link to a specific date in calndar //-->
<xsl:if test="string-length($href) = 0">
<xsl:attribute name="href">
<xsl:value-of select="concat('calendar.html#',concat(date:month-in-year(start), '-'), date:day-in-month(start))"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="string-length(location) &gt; 0">
<xsl:attribute name="title">
<xsl:value-of select="concat('Ort: ', location)"/>
<xsl:if test="string-length(date:time(start)) &gt; 0 or string-length(date:time(end)) &gt; 0">
<xsl:value-of select="concat('&#xA;', 'Zeit:')" disable-output-escaping="yes"/>
<xsl:if test="string-length(date:time(start)) &gt; 0 and substring(date:time(start),1,5) != ''">
<xsl:value-of select="concat(' ab ', substring(date:time(start),1,5))"/>
</xsl:if>
<xsl:if test="string-length(date:time(end)) &gt; 0 and substring(date:time(end),1,5) != '' and substring(date:time(end),1,5) != substring(date:time(start),1,5)">
<xsl:value-of select="concat('&#160;bis&#160;', substring(date:time(end),1,5))"/>
</xsl:if>
</xsl:if>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="title"/>
</a>
</li>
</xsl:if>
</xsl:for-each>
</ul>