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:otherwise>3</xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:attribute> </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:attribute name="id">
<xsl:value-of select="concat(date:month-in-year($date), '-', date:day-in-month($date))"/> <xsl:value-of select="concat(date:month-in-year($date), '-', date:day-in-month($date))"/>
</xsl:attribute> </xsl:attribute>

View File

@ -235,24 +235,41 @@
</xsl:variable> </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> <a>
<xsl:if test="string-length($href) &gt; 0"> <xsl:if test="string-length($href) &gt; 0">
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:value-of select="$href"/> <xsl:value-of select="$href"/>
</xsl:attribute> </xsl:attribute>
</xsl:if> </xsl:if>
<xsl:if test="string-length(location) &gt; 0"> <!-- vv01f: added link to a specific date in calndar //-->
<xsl:attribute name="title"> <xsl:if test="string-length($href) = 0">
<xsl:value-of select="concat('Ort: ', location)"/> <xsl:attribute name="href">
</xsl:attribute> <xsl:value-of select="concat('calendar.html#',concat(date:month-in-year(start), '-'), date:day-in-month(start))"/>
</xsl:if> </xsl:attribute>
<xsl:value-of select="title"/> </xsl:if>
</a>
<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> </li>
</xsl:if> </xsl:if>
</xsl:for-each> </xsl:for-each>
</ul> </ul>