Browse Source

- quotes now link to /donate/donate.html

- quotes are now sorted using the "pos" attribute of quotes

svn path=/branches/test/; revision=22350
pull/8/head
nicoulas 9 years ago
parent
commit
710077f52a
3 changed files with 33 additions and 23 deletions
  1. +3
    -3
      tools/texts-content-de.xml
  2. +3
    -3
      tools/texts-content-en.xml
  3. +27
    -17
      tools/xsltsl/quotes.xsl

+ 3
- 3
tools/texts-content-de.xml View File

@ -36,7 +36,7 @@
<!-- quotes to be displayed in a rotating box -->
<quotes>
<quote id="brunke" tag="donors">
<quote id="brunke" tag="donors" pos="3">
<photo>/donate/brunke.jpg</photo>
<txt>
Sinnvolles Lifecyclemanagement statt herstellerbestimmte
@ -47,7 +47,7 @@
</txt>
<author>Carsten Brunke - Inmedias.it</author>
</quote>
<quote id="wiesemann" tag="donors">
<quote id="wiesemann" tag="donors" pos="1">
<photo>/donate/wiesemann.jpg</photo>
<txt>
Eine virtuelle Welt ohne Freie Software ist wie eine Stadt, in der
@ -56,7 +56,7 @@
</txt>
<author>Reinhard Wiesemann - Linuxhotel</author>
</quote>
<quote id="ganten" tag="donors">
<quote id="ganten" tag="donors" pos="2">
<photo>/donate/ganten.jpg</photo>
<txt>
Freie Software ist das stabile Fundament unserer Unternehmenslösungen,


+ 3
- 3
tools/texts-content-en.xml View File

@ -40,7 +40,7 @@
<!-- quotes to be displayed in a rotating box -->
<quotes>
<quote id="brunke" tag="donors">
<quote id="brunke" tag="donors" pos="3">
<photo>/donate/brunke.jpg</photo>
<txt>Reasonable Lifecycle management instead of product cycles, being
determined by the manufacturer; integration across systems and
@ -51,7 +51,7 @@
</txt>
<author>Carsten Brunke - Inmedias.it</author>
</quote>
<quote id="wiesemann" tag="donors">
<quote id="wiesemann" tag="donors" pos="1">
<photo>/donate/wiesemann.jpg</photo>
<txt>
A virtual world without Free Software is like a city in which you are
@ -60,7 +60,7 @@
</txt>
<author>Reinhard Wiesemann - Linuxhotel</author>
</quote>
<quote id="ganten" tag="donors">
<quote id="ganten" tag="donors" pos="2">
<photo>/donate/ganten.jpg</photo>
<txt>
Free Software is the solid grounding of our enterprise


+ 27
- 17
tools/xsltsl/quotes.xsl View File

@ -44,9 +44,11 @@
index = (index+1)%quotes.length;
var newContent =
"&lt;a href='/donate/donate.html'&gt;"
"&lt;img src='"+quotes[index]['photo']+"' /&gt;" +
"&lt;p&gt;"+quotes[index]['text']+"&lt;br/&gt;"+
"&lt;strong&gt;"+quotes[index]['author']+"&lt;/strong&gt;&lt;/p&gt;";
"&lt;strong&gt;"+quotes[index]['author']+"&lt;/strong&gt;&lt;/p&gt;"+
"&lt;/a&gt;";
$('#cb1-front').html($('#cb1-back').html());
$('#cb1-front').fadeIn(0);
@ -72,6 +74,7 @@
<xsl:param name="quotes-xpath" />
<xsl:for-each select="$quotes-xpath">
<xsl:sort select="@pos" data-type="number" />
{
'photo': "<xsl:call-template name="get-quote-photo"><xsl:with-param name="id" select="@id" /></xsl:call-template>",
'text': "<xsl:call-template name="get-quote-text"><xsl:with-param name="id" select="@id" /></xsl:call-template>",
@ -105,26 +108,33 @@
<xsl:param name="quotes-xpath" />
<xsl:for-each select="$quotes-xpath">
<xsl:sort select="@pos" data-type="number" />
<xsl:if test="position() = 1">
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:call-template name="get-quote-photo">
<xsl:with-param name="id" select="@id" />
</xsl:call-template>
</xsl:attribute>
</xsl:element>
<p>
<xsl:call-template name="get-quote-text">
<xsl:with-param name="id" select="@id" />
</xsl:call-template>
<br/>
<strong>
<xsl:call-template name="get-quote-author">
<a href="/donate/donate.html">
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:call-template name="get-quote-photo">
<xsl:with-param name="id" select="@id" />
</xsl:call-template>
</xsl:attribute>
</xsl:element>
<p>
<xsl:call-template name="get-quote-text">
<xsl:with-param name="id" select="@id" />
</xsl:call-template>
</strong>
</p>
<br/>
<strong>
<xsl:call-template name="get-quote-author">
<xsl:with-param name="id" select="@id" />
</xsl:call-template>
</strong>
</p>
</a>
</xsl:if>
</xsl:for-each>
</xsl:template>


Loading…
Cancel
Save