added link to the newsletter overview page on newsletters

svn path=/trunk/; revision=20189
This commit is contained in:
nicoulas 2011-04-08 19:47:57 +00:00
parent e0e1d006ec
commit 06897f0a76
2 changed files with 17 additions and 4 deletions

View File

@ -100,7 +100,7 @@
<xsl:template match="h1">
<!-- Apply news page PRE-rules -->
<xsl:if test="string(/buildinfo/document/@newsdate)">
<xsl:if test="string(/buildinfo/document/@newsdate) and /buildinfo/document/@type != 'newsletter'">
<!-- add link to press/press.xx.html -->
<xsl:element name="p">
@ -112,15 +112,24 @@
</xsl:element>
</xsl:if>
<!-- Apply newsletter page PRE-rules -->
<xsl:if test="string(/buildinfo/document/@newsdate) and /buildinfo/document/@type == 'newsletter'">
<xsl:element name="a">
<xsl:attribute name="href">/news/newsletter.<xsl:value-of select="/buildinfo/@language"/>.html</xsl:attribute>
<xsl:call-template name="gettext"><xsl:with-param name="id" select="'newsletter'" /></xsl:call-template>
</xsl:element>
</xsl:if>
<!-- copy original <h1> -->
<xsl:copy>
<xsl:apply-templates select="node()"/>
</xsl:copy>
<!-- Apply news page rules -->
<xsl:if test="string(/buildinfo/document/@newsdate)">
<xsl:if test="string(/buildinfo/document/@newsdate) and /buildinfo/document/@type != 'newsletter'">
<!-- add publishing information (author, date) -->
<xsl:element name="div">

View File

@ -778,9 +778,13 @@ sub clone_document {
}
if ($sourcedoc->documentElement->getAttribute("newsdate")) {
# necessary for xhtml news files
# TODO: find a way to copy all such attributes!
$doc->setAttribute("newsdate", $sourcedoc->documentElement->getAttribute("newsdate"));
}
if ($sourcedoc->documentElement->getAttribute("type")) {
# necessary to differentiate news and newsletter pages
# TODO: find a way to copy all such attributes!
$doc->setAttribute("type", $sourcedoc->documentElement->getAttribute("type"));
}
}
#