2007-10-28 03:06:45 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<xsl:stylesheet version="1.0"
|
2008-02-14 22:23:25 +00:00
|
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
|
|
xmlns:cc="http://web.resource.org/cc/"
|
|
|
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
2007-10-28 03:06:45 +00:00
|
|
|
>
|
2007-10-30 10:44:55 +00:00
|
|
|
|
2007-12-16 06:06:59 +00:00
|
|
|
<xsl:template name="results">
|
|
|
|
|
2008-04-25 11:42:50 +00:00
|
|
|
<xsl:for-each select="//page/results">
|
|
|
|
|
|
|
|
<h1>
|
2008-04-27 16:53:38 +00:00
|
|
|
<xsl:value-of select="$lang_strings[@id='results_heading_1']" /> 
|
2008-04-25 11:42:50 +00:00
|
|
|
<xsl:value-of select="//results/@pagesize * (//results/@currentpage - 1) + 1" /> 
|
2008-04-27 16:53:38 +00:00
|
|
|
<xsl:value-of select="$lang_strings[@id='results_heading_2']" /> 
|
2008-04-25 11:42:50 +00:00
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="(//results/@pagesize * //results/@currentpage) < //results/@resultcount">
|
|
|
|
<xsl:value-of select="//results/@pagesize * //results/@currentpage" />
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="//results/@resultcount" />
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose> 
|
2008-04-27 16:53:38 +00:00
|
|
|
<xsl:value-of select="$lang_strings[@id='results_heading_3']" /> 
|
2008-04-25 11:42:50 +00:00
|
|
|
<xsl:value-of select="//results/@resultcount" /> 
|
2008-04-27 16:53:38 +00:00
|
|
|
<xsl:value-of select="$lang_strings[@id='results_heading_4']" />
|
2008-04-25 11:42:50 +00:00
|
|
|
</h1>
|
|
|
|
|
|
|
|
<xsl:call-template name="results-listing"/>
|
|
|
|
|
|
|
|
<xsl:if test="//results/@lastpage > 1">
|
|
|
|
<xsl:call-template name="pagination-arrows"/>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
</xsl:for-each>
|
2007-12-16 06:06:59 +00:00
|
|
|
|
|
|
|
</xsl:template>
|
|
|
|
|
2008-03-24 16:04:46 +00:00
|
|
|
|
|
|
|
<xsl:template name="results-listing">
|
|
|
|
<div class="results">
|
2008-04-25 11:42:50 +00:00
|
|
|
<xsl:for-each select="result">
|
2008-03-24 16:04:46 +00:00
|
|
|
<div class="result">
|
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="rdf:RDF/cc:Work/dc:identifier" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<img>
|
|
|
|
<xsl:attribute name="src">
|
|
|
|
<xsl:value-of select="@thumbnail" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:attribute name="alt">
|
|
|
|
<xsl:value-of select="rdf:RDF/cc:Work/dc:title" />
|
|
|
|
</xsl:attribute>
|
|
|
|
</img>
|
|
|
|
<img class="flag">
|
|
|
|
<xsl:attribute name="src">
|
|
|
|
<xsl:value-of select="concat('/images/flags/', rdf:RDF/cc:Work/dc:language, '.png')" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:attribute name="alt">
|
|
|
|
<xsl:value-of select="rdf:RDF/cc:Work/dc:language" />
|
|
|
|
</xsl:attribute>
|
|
|
|
</img>
|
|
|
|
</a>
|
|
|
|
<br />
|
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="rdf:RDF/cc:Work/dc:identifier" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:value-of select="rdf:RDF/cc:Work/dc:title" />
|
|
|
|
</a>
|
|
|
|
<br />
|
|
|
|
<span class="duration">
|
|
|
|
<xsl:variable name="hours" select="floor(@duration div 3600)" />
|
|
|
|
<xsl:variable name="minutes" select="floor((@duration - $hours*3600) div 60)" />
|
|
|
|
<xsl:variable name="seconds" select="@duration - $minutes*60 - $hours*3600" />
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="$hours=0">
|
|
|
|
<xsl:value-of select="concat(format-number($minutes, '00'), ':', format-number($seconds, '00'))" />
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="concat($hours, ':', format-number($minutes, '00'), ':', format-number($seconds, '00'))" />
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</xsl:for-each>
|
|
|
|
</div>
|
|
|
|
</xsl:template>
|
|
|
|
|
2007-11-25 08:14:30 +00:00
|
|
|
<xsl:template name="pagination-arrows">
|
2008-02-14 22:23:25 +00:00
|
|
|
<xsl:variable name="query_string" select="concat($site_strings[@id='path_results'], //results/@query, '&pagesize=', //results/@pagesize)" />
|
|
|
|
<div>
|
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="concat($query_string, '&page=1')" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:if test="//results/@currentpage<=1">
|
|
|
|
<xsl:attribute name="style">
|
|
|
|
visibility: hidden;
|
|
|
|
</xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<img src="./images/tango/go-first.png" />
|
|
|
|
</a>
|
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="concat($query_string, '&page=', //results/@currentpage - 1)" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:if test="//results/@currentpage<=1">
|
|
|
|
<xsl:attribute name="style">
|
|
|
|
visibility: hidden;
|
|
|
|
</xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<img src="./images/tango/go-previous.png" />
|
|
|
|
</a>
|
2007-12-16 06:06:59 +00:00
|
|
|
|
2008-02-14 22:23:25 +00:00
|
|
|
<div class="page-number">
|
|
|
|
<xsl:value-of select="//results/@currentpage" />
|
|
|
|
</div>
|
2007-12-16 06:06:59 +00:00
|
|
|
|
2008-02-14 22:23:25 +00:00
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="concat($query_string, '&page=', //results/@currentpage + 1)" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:if test="//results/@lastpage<=//results/@currentpage">
|
|
|
|
<xsl:attribute name="style">
|
|
|
|
visibility: hidden;
|
|
|
|
</xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<img src="./images/tango/go-next.png" />
|
|
|
|
</a>
|
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="concat($query_string, '&page=', //results/@lastpage)" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:if test="//results/@lastpage<=//results/@currentpage">
|
|
|
|
<xsl:attribute name="style">
|
|
|
|
visibility: hidden;
|
|
|
|
</xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
<img src="./images/tango/go-last.png" />
|
|
|
|
</a>
|
|
|
|
</div>
|
2007-10-28 03:06:45 +00:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|