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

Revision 3093, 2.6 KB checked in by jukka, 9 years ago (diff)

Modified embedded blocks to use safer oEmbed-format.

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    <metal:header define-macro="header">
9     <h1 tal:content="object_title" class="documentFirstHeading">PLACEHOLDER</h1>
10    </metal:header>
11    <metal:body define-macro="body" tal:define="piece_type context/getPiece_type | nothing;
12    piece nocall:context;
13    piece_url here_url;
14    macro_mapping python:{'image':'here/piece_macros/macros/image_with_download',
15    'audio':'here/piece_macros/macros/audioplayer_with_download',
16    'flash':'here/piece_macros/macros/swf_macro',
17    'flv-video':'here/macros_flowplayer/macros/flowplayer_piece',
18    'kml':'here/piece_macros/macros/kml_macro_with_download',
19    'unknown':'here/piece_macros/macros/download_only'};
20    piece_type test(piece_type in macro_mapping, piece_type, 'unknown');">
21    <metal:view_macro use-macro="python:path(macro_mapping[piece_type])" />
22
23    <tal:is_source define="source context/getSourceFile" condition="source"><br />
24        <div>
25            <span i18n:translate="label_download_source_file">Download source file</span>:
26            <a tal:attributes="href string:${here_url}/at_download/source" tal:content="python: '%s (%s KB)' % (source.filename, source.get_size()/1024)" >filename.png (500 KB)</a>
27        </div>
28    </tal:is_source>
29    <tal:is_desc condition="context/getDescription"><br />
30    <div><label><tal:block i18n:domain="plone" i18n:translate="label_description">Description</tal:block>:</label> <br />
31<metal:fieldMacro use-macro="python:here.widget('description', mode='view')"/>
32    </div>
33    </tal:is_desc>
34    <tal:is_tags condition="context/getTags"><br />
35    <div><label><tal:block i18n:translate="label_tags">Tags</tal:block>:</label> <br />
36<metal:fieldMacro use-macro="python:here.widget('tags',mode='view')"/>
37    </div>
38    </tal:is_tags>
39<tal:referenced_by define="resources python: here.getResourcesUsingPiece(return_objects=True)">
40    <div tal:condition="resources"><br /><label><tal:block i18n:translate="label_resources_using_this_piece">Used in</tal:block>:</label> <br />
41    <ul>
42    <tal:loop repeat="res resources">
43    <li tal:condition="python:res"><a href="" tal:content="res/Title" tal:attributes="href python:'%s/view' %res.absolute_url()" /></li>
44    </tal:loop>
45    </ul>       
46</div>
47</tal:referenced_by>
48    <br />
49    <div><label><tal:block i18n:translate="label_license">License</tal:block>:</label> <br />
50<metal:fieldMacro use-macro="python:here.widget('rights',mode='view')"/>
51</div>
52    </metal:body>                       
53</metal:main>
54</body>
55</html>
Note: See TracBrowser for help on using the repository browser.