test campaign boxes with copyright and conditional appearance of info fields

svn path=/branches/test/; revision=31498
This commit is contained in:
Max Mehl 2015-07-14 09:26:34 +00:00
parent 497f8910f2
commit 594e5fab5d
2 changed files with 18 additions and 4 deletions

View File

@ -122,6 +122,7 @@
</xsl:template>
<xsl:template match="campaign" mode="slideshow">
<xsl:variable name="id"><xsl:value-of select="@id"/></xsl:variable>
<a href="{link}" class="campaign-box" id="{@id}">
<xsl:if test=" photo != '' ">
<img src="{photo}" alt="" />
@ -129,9 +130,21 @@
<p class="text">
<xsl:value-of select=" text " />
</p>
<span class="author">
<xsl:value-of select=" author " />
</span>
<!-- Test ignoring of empty fields -->
<xsl:if test="/buildinfo/textset/campaigns/campaign[@id=$id]/author != ''">
<span class="author">
<xsl:value-of select=" author " />
</span>
</xsl:if>
<!-- Copyright field -->
<xsl:if test="/buildinfo/textset/campaigns/campaign[@id=$id]/copyright != ''">
<span class="copyright">
<xsl:value-of select=" copyright " />
</span>
</xsl:if>
</a>
</xsl:template>

View File

@ -230,7 +230,7 @@
<link>//documentfreedom.org</link>
</campaign>
<campaign id="wiesemann" tag="donors" pos="1">
<photo>/donate/wiesemann.jpg</photo>
<photo>/donate/wBiesemann.jpg</photo>
<text>
A virtual world without Free Software is like a city in which you are
obliged to have a usage license for every pavement. We also need
@ -254,6 +254,7 @@
Europe.
</text>
<author>Stefano "Zack" Zacchiroli, Former Debian Project Leader</author>
<copyright>Test-License</copyright>
<link>/fellowship/index.html</link>
</campaign>
<campaign id="racketware">