source: trunk/skins/lemill/macros_audioplayer.pt @ 1242

Revision 1242, 3.7 KB checked in by jukka, 13 years ago (diff)

Fixed #1045, spent 2h.

Line 
1<html xmlns="http://www.w3.org/1999/xhtml"
2      xmlns:tal="http://xml.zope.org/namespaces/tal"
3      xmlns:metal="http://xml.zope.org/namespaces/metal"
4      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5      i18n:domain="lemill">
6
7  <head><title></title></head>
8
9  <body>
10
11<!-- Flashplayer with link to original piece and download link-->
12
13
14<metal:define define-macro="audioplayer" tal:define="attributestring python:'file=%s/file?.mp3' % piece.absolute_url()">
15    <a href="" tal:content="piece/title_or_id" tal:attributes="href piece/absolute_url" /><br/>
16    <tal:lengthies tal:define="length python:field.getLength(piece);">
17        <span i18n:translate="audio_length">Audio clip length:</span>
18        <span tal:condition="length/hour"><tal:hour replace="length/hour"/>:</span><span tal:replace="length/minute"/>:<span tal:replace="length/second"/><br/>
19    </tal:lengthies>
20    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="20"
21        codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
22        <param name="movie" value="mp3player.swf" />
23        <param name="flashvars" tal:attributes="value attributestring" />
24        <embed src="mp3player.swf" width="300" height="20" tal:attributes="flashvars attributestring"
25        type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
26    </object>
27    <a class="discreet" tal:attributes="href python:'%s/at_download/file' % piece.absolute_url()">(<tal:block i18n:domain="plone" i18n:translate="Download">Download</tal:block>)</a>
28</metal:define>
29
30<!-- Plain flashplayer -->
31
32<metal:define define-macro="audioplayer_plain"
33    tal:define="pieceurl piece/absolute_url | here/absolute_url;
34                attributestring python:'file=%s/file?.mp3' % pieceurl">
35    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="20"
36            codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
37        <param name="movie" value="mp3player.swf" />
38        <param name="flashvars" tal:attributes="value attributestring" />
39        <embed src="mp3player.swf" width="300" height="20" tal:attributes="flashvars attributestring"
40            type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
41    </object>
42</metal:define>
43
44<!-- flashplayer that uses file-field as a source -->
45
46<metal:define define-macro="audioplayer_file"
47    tal:define="fileurl here/absolute_url;
48                attributestring python:'file=%s/at_download/%s?.mp3' % (fileurl, fieldName)">
49
50<p tal:define="length python:field.getLength(here);">
51<span i18n:translate="audio_length">Audio clip length:</span>
52<span tal:condition="length/hour"><tal:hour replace="length/hour"/>:</span><span tal:replace="length/minute"/>:<span tal:replace="length/second"/>
53</p>
54
55    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="20"
56            codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
57        <param name="movie" value="mp3player.swf" />
58        <param name="flashvars" tal:attributes="value attributestring" />
59        <embed src="mp3player.swf" width="300" height="20" tal:attributes="flashvars attributestring"
60            type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
61    </object>
62<a class="discreet" tal:attributes="href python:'%s/at_download/%s' % (fileurl, fieldName)">(<tal:block i18n:domain="plone" i18n:translate="Download">Download</tal:block>)</a>
63
64     <div style="height:20px" class="visualClear">&nbsp;</div>
65
66
67
68</metal:define>
69
70
71
72
73
74  </body>
75
76</html>
Note: See TracBrowser for help on using the repository browser.