Zeige menschenlesbare Größenabgabe bei <resource/> (Podcasts), funktioniert auch für DS-Audio-News
"(Ogg)" aus Mitschnitt-News-Resource entfernt git-svn-id: svn://svn.c3d2.de/c3d2-web/trunk@595 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
parent
40dc7511df
commit
217e2e7c10
|
@ -5,5 +5,5 @@
|
|||
<p>
|
||||
Heute abend, am 13. März, gibts auf der Frequenz von <link href="http://www.coloradio.org/">Coloradio</link> wieder <em>Pentaradio24</em>, dieses Mal mit dem Thema <em>"Anonym durchs Internet"</em>.
|
||||
</p>
|
||||
<resource title="pentaradio24 vom 13. März 2007 (Ogg)" size="47217160" type="application/ogg">ftp://ftp.c3d2.de/pentaradio/pentaradio24-20070313.ogg</resource>
|
||||
<resource title="pentaradio24 vom 13. März 2007" size="47217160" type="application/ogg">ftp://ftp.c3d2.de/pentaradio/pentaradio24-20070313.ogg</resource>
|
||||
</item>
|
||||
|
|
|
@ -241,4 +241,28 @@
|
|||
</dl>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="format-filesize">
|
||||
<xsl:param name="value"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$value > 1024 * 1024 * 1024">
|
||||
<xsl:value-of select="format-number($value div (1024 * 1024 * 1024), '0.00')"/>
|
||||
<xsl:text> GB</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$value > 1024 * 1024">
|
||||
<xsl:value-of select="format-number($value div (1024 * 1024), '0.00')"/>
|
||||
<xsl:text> MB</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$value > 1024">
|
||||
<xsl:value-of select="format-number($value div (1024), '0.00')"/>
|
||||
<xsl:text> KB</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$value"/>
|
||||
<xsl:text> Bytes</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
|
@ -260,6 +260,12 @@
|
|||
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</a>
|
||||
|
||||
<xsl:if test="@size">
|
||||
(<xsl:call-template name="format-filesize">
|
||||
<xsl:with-param name="value" select="@size"/>
|
||||
</xsl:call-template>)
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
|
@ -276,6 +282,12 @@
|
|||
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</a>
|
||||
|
||||
<xsl:if test="@size">
|
||||
(<xsl:call-template name="format-filesize">
|
||||
<xsl:with-param name="value" select="@size"/>
|
||||
</xsl:call-template>)
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue