Browse Source

all necessary files and modifications for donors quotes on front page

svn path=/trunk/; revision=22358
pull/8/head
nicoulas 9 years ago
parent
commit
052a856d57
42 changed files with 356 additions and 40 deletions
  1. BIN
      donate/brunke.jpg
  2. BIN
      donate/ganten.jpg
  3. BIN
      donate/ganten08.JPG
  4. BIN
      donate/inmedias-carsten-brunke.jpg
  5. BIN
      donate/linuxhotel-reinhard-wiesemann.jpg
  6. BIN
      donate/wiesemann.jpg
  7. +2
    -1
      index.ar.xhtml
  8. +2
    -1
      index.bg.xhtml
  9. +2
    -1
      index.ca.xhtml
  10. +2
    -1
      index.cs.xhtml
  11. +2
    -1
      index.da.xhtml
  12. +2
    -1
      index.de.xhtml
  13. +2
    -1
      index.el.xhtml
  14. +2
    -1
      index.en.xhtml
  15. +2
    -1
      index.es.xhtml
  16. +2
    -1
      index.et.xhtml
  17. +2
    -1
      index.fi.xhtml
  18. +2
    -1
      index.fr.xhtml
  19. +2
    -1
      index.hr.xhtml
  20. +2
    -1
      index.hu.xhtml
  21. +2
    -1
      index.it.xhtml
  22. +2
    -1
      index.ku.xhtml
  23. +2
    -1
      index.mk.xhtml
  24. +2
    -1
      index.nb.xhtml
  25. +2
    -1
      index.nl.xhtml
  26. +2
    -1
      index.nn.xhtml
  27. +2
    -1
      index.pl.xhtml
  28. +2
    -1
      index.pt.xhtml
  29. +2
    -1
      index.ro.xhtml
  30. +2
    -1
      index.ru.xhtml
  31. +2
    -1
      index.sk.xhtml
  32. +2
    -1
      index.sl.xhtml
  33. +2
    -1
      index.sq.xhtml
  34. +2
    -1
      index.sr.xhtml
  35. +2
    -1
      index.sv.xhtml
  36. +2
    -1
      index.tr.xhtml
  37. +16
    -3
      index.xsl
  38. +24
    -6
      look/generic.css
  39. +34
    -1
      tools/texts-content-de.xml
  40. +35
    -0
      tools/texts-content-en.xml
  41. +142
    -0
      tools/xsltsl/quotes.xsl
  42. +45
    -0
      tools/xsltsl/translations.xsl

BIN
donate/brunke.jpg View File

Before After
Width: 166  |  Height: 166  |  Size: 7.0 KiB

BIN
donate/ganten.jpg View File

Before After
Width: 166  |  Height: 166  |  Size: 16 KiB

BIN
donate/ganten08.JPG View File

Before After
Width: 166  |  Height: 250  |  Size: 18 KiB

BIN
donate/inmedias-carsten-brunke.jpg View File

Before After
Width: 250  |  Height: 166  |  Size: 32 KiB

BIN
donate/linuxhotel-reinhard-wiesemann.jpg View File

Before After
Width: 250  |  Height: 166  |  Size: 27 KiB

BIN
donate/wiesemann.jpg View File

Before After
Width: 166  |  Height: 166  |  Size: 5.3 KiB

+ 2
- 1
index.ar.xhtml View File

@ -6,7 +6,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.bg.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.ca.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.cs.xhtml View File

@ -6,7 +6,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.da.xhtml View File

@ -11,7 +11,8 @@
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Stil spørgsmål til dine kandidater</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.de.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.el.xhtml View File

@ -8,7 +8,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ρωτήστε τους υποψηφίους σας</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.en.xhtml View File

@ -10,7 +10,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.es.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.et.xhtml View File

@ -10,7 +10,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Küsi oma kandidaadilt</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.fi.xhtml View File

@ -11,7 +11,8 @@
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Kysy ehdokkailtasi</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.fr.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Demandez à vos candidats</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.hr.xhtml View File

@ -10,7 +10,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Pitajte svoje kandidate</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.hu.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.it.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Chiedi ai tuoi candidati</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.ku.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.mk.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.nb.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.nl.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.nn.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.pl.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.pt.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.ro.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.ru.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Спроси своих кандидатов</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.sk.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Opýtajte sa svojich kandidátov</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.sl.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.sq.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.sr.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.sv.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 2
- 1
index.tr.xhtml View File

@ -7,7 +7,8 @@
<body>
<div id="campaigns-boxes">
<div id="campaign-box-1">
<h3><a href="/campaigns/askyourcandidates/askyourcandidates.html">Ask your candidates</a></h3>
<quote-box tag="donors" />
<a id="our-work" href="/donate/letter-2011.html"><label-ourwork2011/></a>
</div>
<div id="campaign-box-2">


+ 16
- 3
index.xsl View File

@ -9,6 +9,7 @@
<xsl:import href="tools/xsltsl/tagging.xsl" />
<xsl:import href="tools/xsltsl/translations.xsl" />
<xsl:import href="tools/xsltsl/static-elements.xsl" />
<xsl:import href="tools/xsltsl/quotes.xsl" />
<xsl:output method="xml" encoding="UTF-8" indent="yes" />
@ -20,11 +21,23 @@
<xsl:template match="/html/body">
<xsl:copy>
<div id="frontpage">
<xsl:apply-templates />
<xsl:apply-templates />
</div>
</xsl:copy>
</xsl:template>
<xsl:template match="quote-box">
<xsl:call-template name="quote-box">
<xsl:with-param name="tag" select="@tag" />
</xsl:call-template>
</xsl:template>
<xsl:template match="label-ourwork2011">
<xsl:call-template name="gettext">
<xsl:with-param name="id" select="'ourwork2011'" />
</xsl:call-template>
</xsl:template>
<!--display dynamic list of news items-->
<xsl:template match="all-news">
<xsl:call-template name="fetch-news">
@ -173,7 +186,7 @@
</xsl:template>
<!-- Do not copy <set> or <text> to output at all -->
<xsl:template match="set | tags"/>
<xsl:template match="set | tags | text"/>
<!-- For all other nodes, copy verbatim -->
<xsl:template match="@* | node()" priority="-1">


+ 24
- 6
look/generic.css View File

@ -1180,14 +1180,32 @@ a.fn {
}
#campaign-box-1 {
width: 65.5%;
height: 200px;
border: 2px solid #AFAFAF;
border-radius: 7px;
float: left;
height: 185px;
overflow: hidden;
padding: 5px;
width: 65.5%;
position: relative;
}
#campaign-box-1 img {
float: left;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
background: url("/graphics/ask-candidates.png") no-repeat top right;
margin-right: 10px;
}
#campaign-box-1 p {
margin: 0px;
overflow: hidden;
line-height: 17px;
color: rgb(50,50,50);
}
#campaign-box-1 #our-work {
position: absolute;
bottom: 0;
right: 5px;
}
#campaign-box-1 h3 {


+ 34
- 1
tools/texts-content-de.xml View File

@ -32,6 +32,39 @@
<!-- alt text for missing avatars -->
<text id="no-avatar">Kein Bild</text>
<!-- quotes to be displayed in a rotating box -->
<quotes>
<quote id="brunke" tag="donors" pos="3">
<photo>/donate/brunke.jpg</photo>
<txt>
Sinnvolles Lifecyclemanagement statt herstellerbestimmte
Produktzyklen; Integration über Systemgrenzen hinweg statt
Vendor-Lock-in; Einblick in die Sourcen statt Aktivierungspflicht -
Freie Software erlaubt uns als Systemhaus, unsere Kunden von Zwängen,
die nur den Softwareherstellern nützen, zu befreien.
</txt>
<author>Carsten Brunke - Inmedias.it</author>
</quote>
<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
man für jeden Bürgersteig eine Benutzungslizenz benötigt. Wir brauchen
auch Allgemeingut in der virtuellen Welt.
</txt>
<author>Reinhard Wiesemann - Linuxhotel</author>
</quote>
<quote id="ganten" tag="donors" pos="2">
<photo>/donate/ganten.jpg</photo>
<txt>
Freie Software ist das stabile Fundament unserer Unternehmenslösungen,
die FSFE leistet einen wichtigen Beitrag zur Sicherung dieses
Fundaments. Deswegen unterstützen wir die FSFE.
</txt>
<author>Peter Ganten - Univention</author>
</quote>
</quotes>
</textset-content>

+ 35
- 0
tools/texts-content-en.xml View File

@ -30,10 +30,45 @@
<text id="campaign4link">Show your love to Free Software!</text>
<text id="join">Join</text>
<text id="ourwork2011">Our work in 2011</text>
<text id="subscribe">Subscribe</text>
<!-- alt text for missing avatars -->
<text id="no-avatar">No Picture</text>
<!-- quotes to be displayed in a rotating box -->
<quotes>
<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
borders instead of vendor lock-in; insight into the sources instead
of mandatory activation - As a systems house, Free Software
allows us to liberate our costumers from constraints that only
benefit the manufacturer itself.
</txt>
<author>Carsten Brunke - Inmedias.it</author>
</quote>
<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
obliged to have a usage license for every pavement. We also need
commons in the virtual world.
</txt>
<author>Reinhard Wiesemann - Linuxhotel</author>
</quote>
<quote id="ganten" tag="donors" pos="2">
<photo>/donate/ganten.jpg</photo>
<txt>
Free Software is the solid grounding of our enterprise
solutions. The FSFE provides an important contribution to secure this
grounding, therefore we support the FSFE.
</txt>
<author>Peter Ganten - Univention</author>
</quote>
</quotes>
</textset-content>

+ 142
- 0
tools/xsltsl/quotes.xsl View File

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="translations.xsl" />
<xsl:output method="xml" encoding="UTF-8" indent="yes" />
<xsl:template name="quote-box">
<xsl:param name="tag" select="''"/> <!-- if left empty, all quotes will be selected -->
<div id="cb1-back">
<xsl:call-template name="first-quote">
<xsl:with-param name="tag" select="$tag" />
</xsl:call-template>
</div>
<div id="cb1-front">
<!-- -->
</div>
<!-- javascript code for rotating quotes -->
<script type="text/javascript">
var quotes = [
<xsl:choose>
<xsl:when test="/html/set/textset-content/quotes/quote[@tag=$tag or $tag='']">
<xsl:call-template name="get-js-quotes">
<xsl:with-param name="quotes-xpath" select="/html/set/textset-content/quotes/quote[@tag=$tag or $tag='']" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="get-js-quotes">
<xsl:with-param name="quotes-xpath" select="/html/set/textset-content-backup/quotes/quote[@tag=$tag or $tag='']" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
];
var index = 0;
function changeImage () {
var oldIndex = index;
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;/a&gt;";
$('#cb1-front').html($('#cb1-back').html());
$('#cb1-front').fadeIn(0);
$('#cb1-back').fadeOut(0);
$('#cb1-back').html(newContent);
$('#cb1-front').fadeOut('slow', function() {
$('#cb1-back').fadeIn('slow', function() {});
});
setTimeout("changeImage();",10000);
}
setTimeout("changeImage();",10000);
</script>
</xsl:template>
<xsl:template name="get-js-quotes">
<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>",
'author': "<xsl:call-template name="get-quote-author"><xsl:with-param name="id" select="@id" /></xsl:call-template>"
},
</xsl:for-each>
</xsl:template>
<xsl:template name="first-quote">
<xsl:param name="tag" />
<xsl:choose>
<xsl:when test="/html/set/textset-content/quotes/quote[@tag=$tag or $tag='']">
<xsl:call-template name="display-first-quote">
<xsl:with-param name="quotes-xpath" select="/html/set/textset-content/quotes/quote[@tag=$tag or $tag='']" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise >
<xsl:call-template name="display-first-quote">
<xsl:with-param name="quotes-xpath" select="/html/set/textset-content-backup/quotes/quote[@tag=$tag or $tag='']" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="display-first-quote">
<xsl:param name="quotes-xpath" />
<xsl:for-each select="$quotes-xpath">
<xsl:sort select="@pos" data-type="number" />
<xsl:if test="position() = 1">
<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>
<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>
</xsl:stylesheet>

+ 45
- 0
tools/xsltsl/translations.xsl View File

@ -28,5 +28,50 @@
/html/set/textset-content-backup/text[ @id=$id and not(@id=/html/set/textset-content/text/@id) ]"/>
</xsl:template>
<!-- this template is to be called to get the text of _quotes_ contained in "tools/texts-xx.xml" files -->
<xsl:template name="get-quote-text">
<xsl:param name="id" />
<xsl:choose>
<xsl:when test="/html/set/textset-content/quotes/quote[@id=$id]/txt">
<xsl:value-of select="normalize-space(/html/set/textset-content/quotes/quote[@id=$id]/txt)" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space(/html/set/textset-content-backup/quotes/quote[@id=$id]/txt)" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- this template is to be called to get the image of _quotes_ contained in "tools/texts-xx.xml" files -->
<xsl:template name="get-quote-photo">
<xsl:param name="id" />
<xsl:choose>
<xsl:when test="/html/set/textset-content/quotes/quote[@id=$id]/photo">
<xsl:value-of select="normalize-space(/html/set/textset-content/quotes/quote[@id=$id]/photo)" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space(/html/set/textset-content-backup/quotes/quote[@id=$id]/photo)" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- this template is to be called to get the author's nam of _quotes_ contained in "tools/texts-xx.xml" files -->
<xsl:template name="get-quote-author">
<xsl:param name="id" />
<xsl:choose>
<xsl:when test="/html/set/textset-content/quotes/quote[@id=$id]/author">
<xsl:value-of select="normalize-space(/html/set/textset-content/quotes/quote[@id=$id]/author)" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space(/html/set/textset-content-backup/quotes/quote[@id=$id]/author)" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

Loading…
Cancel
Save