Support enclosures in XSLT
This commit is contained in:
parent
b3966b61aa
commit
0078e52dcb
Binary file not shown.
After Width: | Height: | Size: 514 B |
|
@ -634,7 +634,7 @@
|
|||
</details>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="category or guid or source or author or comments or slash:comments or (icbm:latitude and icbm:longitude) or (geo:lat and geo:long) or (geourl:latitude and geourl:longitude)">
|
||||
<xsl:if test="guid or comments or slash:comments or category or author or enclosure or source or (icbm:latitude and icbm:longitude) or (geo:lat and geo:long) or (geourl:latitude and geourl:longitude)">
|
||||
<footer>
|
||||
<p>
|
||||
<xsl:if test="guid or comments or slash:comments">
|
||||
|
@ -678,21 +678,43 @@
|
|||
<xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="category and (source or author)">
|
||||
<xsl:text> — </xsl:text>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="author">
|
||||
<xsl:if test="category">
|
||||
<xsl:text> — </xsl:text>
|
||||
</xsl:if>
|
||||
<span class="icon-author" alt="Author" />
|
||||
<address>
|
||||
<xsl:value-of select="author" />
|
||||
</address>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="source">
|
||||
<xsl:if test="enclosure">
|
||||
<xsl:if test="category or author">
|
||||
<br />
|
||||
</xsl:if>
|
||||
<a href="{enclosure/@url}" target="_blank">
|
||||
<span class="icon-enclosure" alt="Enclosure" />
|
||||
<xsl:value-of select="enclosure/@url" />
|
||||
</a>
|
||||
<xsl:if test="enclosure/@type or enclosure/@length">
|
||||
<xsl:text> (</xsl:text>
|
||||
<xsl:value-of select="enclosure/@type" />
|
||||
<xsl:if test="enclosure/@length">
|
||||
<xsl:if test="enclosure/@type">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="enclosure/@length" />
|
||||
<xsl:text> bytes</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>)</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="source">
|
||||
<xsl:if test="category or author or enclosure">
|
||||
<br />
|
||||
</xsl:if>
|
||||
<a href="{source}" target="_blank">
|
||||
<span class="icon-source" alt="Source" />
|
||||
<xsl:value-of select="source" />
|
||||
|
@ -700,21 +722,21 @@
|
|||
</xsl:if>
|
||||
|
||||
<xsl:if test="icbm:latitude and icbm:longitude">
|
||||
<xsl:if test="category or source or author">
|
||||
<xsl:if test="category or author or enclosure or source">
|
||||
<br />
|
||||
</xsl:if>
|
||||
<xsl:call-template name="icbm-link" />
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="geo:lat and geo:long">
|
||||
<xsl:if test="category or source or author or (icbm:latitude and icbm:longitude)">
|
||||
<xsl:if test="category or author or enclosure or source or (icbm:latitude and icbm:longitude)">
|
||||
<br />
|
||||
</xsl:if>
|
||||
<xsl:call-template name="geo-link" />
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="geourl:latitude and geourl:longitude">
|
||||
<xsl:if test="category or source or author or (icbm:latitude and icbm:longitude) or (geo:lat and geo:long)">
|
||||
<xsl:if test="category or author or enclosure or source or (icbm:latitude and icbm:longitude) or (geo:lat and geo:long)">
|
||||
<br />
|
||||
</xsl:if>
|
||||
<xsl:call-template name="geourl-link" />
|
||||
|
@ -722,7 +744,7 @@
|
|||
</p>
|
||||
|
||||
<!-- When there is nothing other than the right section, we need to clear its float: right -->
|
||||
<xsl:if test="(guid or comments or slash:comments) and not(category or source or author or (icbm:latitude and icbm:longitude) or (geo:lat and geo:long) or (geourl:latitude and geourl:longitude))">
|
||||
<xsl:if test="(guid or comments or slash:comments) and not(category or author or enclosure or source or (icbm:latitude and icbm:longitude) or (geo:lat and geo:long) or (geourl:latitude and geourl:longitude))">
|
||||
<div class="clearfix"></div>
|
||||
</xsl:if>
|
||||
</footer>
|
||||
|
|
Loading…
Reference in New Issue