catch up with some xsl code from trunk

svn path=/branches/test/; revision=28735
This commit is contained in:
paul committed 2014-07-07 09:52:58 +00:00
1 parent 0d6a6e0926
commit 005f0f7d3b
4 files changed
+43 -23

No files matched your search

+6 -6
View File
@@ -16,7 +16,7 @@
<div class="cont">
<noscript>
<p class="txt">It is time once and for all to end the pointless
<p class="text txt">It is time once and for all to end the pointless
nonsense of one document sent on one platform being incomprehensible
to the user of another.
</p><p><span class="author">
@@ -33,7 +33,7 @@
var quotes = [
<xsl:for-each select="/buildinfo/textset/quotes/quote[@tag=$tag or $tag='']">
{
'txt': '<xsl:call-template name="escape"><xsl:with-param name="string" select="normalize-space(txt)"/></xsl:call-template>',
'text': '<xsl:call-template name="escape"><xsl:with-param name="string" select="normalize-space(text)"/></xsl:call-template>',
'photo': '<xsl:value-of select="normalize-space(photo)"/>',
'author': '<xsl:call-template name="escape"><xsl:with-param name="string" select="normalize-space(author)"/></xsl:call-template>',
'license': '<xsl:call-template name="escape"><xsl:with-param name="string" select="normalize-space(license)"/></xsl:call-template>',
@@ -47,8 +47,8 @@
$('#quote-box-inner').fadeOut('slow', function() {
$('#quote-box-inner div.img').html('<img src="'+quotes[index]['photo']+'"/>');
$('#quote-box-inner div.cont').html('<p class="txt">'
+ quotes[index]['txt']
$('#quote-box-inner div.cont').html('<p class="text txt">'
+ quotes[index]['text']
+ '</a></p><p><span class="author">'
+ quotes[index]['author']
+ '</span><span class="license">'
@@ -85,8 +85,8 @@
</div>
<div class="cont">
<p class="txt">
<xsl:call-template name="escape"><xsl:with-param name="string" select="normalize-space(txt)"/></xsl:call-template>
<p class="text txt">
<xsl:call-template name="escape"><xsl:with-param name="string" select="normalize-space(text)"/></xsl:call-template>
</p>
<p><span class="author"><xsl:call-template name="escape">
<xsl:with-param name="string" select="normalize-space(author)"/></xsl:call-template>
+7
View File
@@ -147,4 +147,11 @@
</xsl:call-template>
</xsl:template>
<!-- Paris -->
<xsl:template match="paris-members">
<xsl:call-template name="country-people-list">
<xsl:with-param name="team" select="'paris'" />
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>
+29 -16
View File
@@ -98,9 +98,9 @@
<xsl:value-of select="$img-path" />
</xsl:attribute>
<!-- And on error (if previous file does not exist), we load our default image -->
<xsl:attribute name="onerror">
<!-- xsl:attribute name="onerror">
<xsl:text>this.src='/campaigns/valentine/valentine-358x60-en.png';</xsl:text>
</xsl:attribute>
</xsl:attribute -->
<xsl:attribute name="alt"
value="No picture" />
</xsl:element>
@@ -109,23 +109,36 @@
<xsl:template match="campaigns">
<div id="campaigns-boxes" class="cycle-slideshow" data-cycle-pause-on-hover="true" data-cycle-speed="500" data-cycle-timeout="9000" data-cycle-slides="a" data-cycle-fx="scrollHorz" data-cycle-swipe="true">
<div class="cycle-pager"/>
<xsl:for-each select=" /buildinfo/textset/campaigns/campaign[ @id = 'zacchiroli' or @id = 'dfd' or @id = 'ilovefs' ] ">
<a href="{link}" class="campaign-box" id="{@id}">
<img src="{photo}" alt="" />
<p class="text">
<xsl:value-of select=" text " />
</p>
<span class="author">
<xsl:value-of select=" author " />
</span>
</a>
</xsl:for-each>
<div class="cycle-pager"/>
<xsl:for-each select="/buildinfo/textsetbackup/campaigns/campaign[@id='zacchiroli']">
<xsl:choose>
<xsl:when test="count(/buildinfo/textset/campaigns/campaign[@id = current()/@id]) > 0">
<xsl:apply-templates select="/buildinfo/textset/campaigns/campaign[@id = current()/@id]" mode="slideshow" />
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="." mode="slideshow" />
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</div>
</xsl:template>
<xsl:template match="campaign" mode="slideshow">
<a href="{link}" class="campaign-box" id="{@id}">
<xsl:if test=" photo != '' ">
<img src="{photo}" alt="" />
</xsl:if>
<p class="text">
<xsl:value-of select=" text " />
</p>
<span class="author">
<xsl:value-of select=" author " />
</span>
</a>
</xsl:template>
<!-- display campaign box 4 -->
<xsl:template match="campaign-box4">
<!--div id="campaign-box-4"-->
+1 -1
View File
@@ -12,7 +12,7 @@
<div class="cycle-pager"/>
<!--xsl:for-each select=" /buildinfo/textset/campaigns/campaign "-->
<xsl:for-each select=" /buildinfo/textset/campaigns/campaign[ @id = 'zacchiroli' or @id = 'dfd' or @id = 'ilovefs' ] ">
<xsl:for-each select="/buildinfo/textset/campaigns/campaign[@tag='' or @tag='donors' or @id='dfd']">
<!--TODO select only campaigns asked from index.xsl-->
<a href="{link}" class="campaign-box" id="{@id}">