source: trunk/skins/lemill/piece_view.pt @ 1374

Revision 1374, 3.7 KB checked in by laszlo, 13 years ago (diff)

fixed #1142 spent: 12h

Line 
1<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
2      lang="en"
3      metal:use-macro="here/main_template/macros/master"
4      i18n:domain="lemill">
5<body>
6
7<metal:main fill-slot="main">
8        <!-- header, H1 with title in it -->
9        <metal:header define-macro="header">
10        <h1 tal:content="object_title" class="documentFirstHeading">
11            PLACEHOLDER
12        </h1>
13        </metal:header>
14       
15        <!-- body macro where all the fields are -->
16        <metal:body define-macro="body" tal:define="image context/isImage;
17                        mp3 python:context.file.getContentType()=='audio/mpeg'">
18               
19    <tal:block tal:condition="image">
20    <img src="" alt=""
21        tal:attributes="src python:context.absolute_url()+'/file/image_large';
22                alt context/Title;
23                title context/Title;" class="media_piece" />
24    <p><a i18n:translate="label_download_hires" tal:attributes="href python:context.absolute_url()+'/at_download/file'">Download high resolution version (<tal:block i18n:name="size" tal:content="python:context.file.get_size()/1024">500</tal:block> kB)</a></p>
25    </tal:block>
26    <tal:noimageblock tal:condition="not:image">
27
28    <tal:mp3block condition="mp3">
29        <img tal:condition="context/isAudio"
30             src="images/default_soundclip.png"/>
31        <div>&nbsp;</div>
32        <metal:audioplayer use-macro="here/macros_audioplayer/macros/audioplayer_plain"/>
33<a class="discreet" tal:attributes="href python:'%s/at_download/file' % context.absolute_url()">(<tal:block i18n:domain="plone" i18n:translate="Download">Download</tal:block>)</a>
34    </tal:mp3block>
35
36    <tal:flvblock condition="context/isFLVVideo">
37        <object type="application/x-shockwave-flash" data="FlowPlayer.swf" width="320" height="200" id="FlowPlayer">
38            <param name="allowScriptAccess" value="sameDomain" />
39            <param name="movie" value="FlowPlayer.swf" />
40            <param name="quality" value="high" />
41            <param name="scale" value="noScale" />
42            <param name="wmode" value="transparent" />
43            <param name="flashvars" tal:attributes="value python:'config={videoFile: \'%s/at_download/file\'}' % context.absolute_url()"/>
44        </object>
45    </tal:flvblock>
46
47    <div tal:condition="python:(not mp3) and (not context.isFLVVideo())"><tal:block i18n:domain="plone" i18n:translate="">Download</tal:block>: <metal:fieldMacro use-macro="python:here.widget('file',mode='view')"/></div>
48   
49    <div tal:condition="mp3"><tal:block i18n:translate="label_playing_time">Playing time</tal:block>: <span tal:replace="python:DateTime(context.getLength()).strftime('%M:%S')">3:20</span></div>
50
51    </tal:noimageblock>
52
53        <div><label><tal:block i18n:domain="plone" i18n:translate="label_description">Description</tal:block>:</label> <br />
54    <metal:fieldMacro use-macro="python:here.widget('description', mode='view')"/>
55    </div>
56
57        <div><label><tal:block i18n:translate="label_tags">Tags</tal:block>:</label> <br />
58    <metal:fieldMacro use-macro="python:here.widget('tags',mode='view')"/>
59    </div>
60
61        <div><label><tal:block i18n:translate="label_license">License</tal:block>:</label> <br />
62    <metal:fieldMacro use-macro="python:here.widget('rights',mode='view')"/>
63    </div>
64
65        <div metal:use-macro="here/document_relateditems/macros/relatedItems">
66            show related items if they exist
67        </div>
68
69        <div metal:use-macro="here/wcag/macros/wcag_logo">
70            Show WCAG logo
71        </div>
72
73        </metal:body>
74       
75        <!-- folderlisting that shows sub-objects if there are any -->
76        <metal:folderlisting define-macro="folderlisting">
77               
78               
79        </metal:folderlisting>
80       
81        <!-- footer, by line created date etc. -->
82        <metal:footer define-macro="footer">
83        </metal:footer>
84       
85</metal:main>
86</body>
87</html>
Note: See TracBrowser for help on using the repository browser.