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

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

Fixed #2003

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    <metal:view_macro use-macro="python:path(macro_mapping.get(piece_type, 'here/piece_macros/macros/download_only'))" />
21
22    <tal:is_source define="source context/getSourceFile" condition="source"><br />
23        <div>
24            <span i18n:translate="label_download_source_file">Download source file</span>:
25            <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>
26        </div>
27    </tal:is_source>
28    <tal:is_desc condition="context/getDescription"><br />
29    <div><label><tal:block i18n:domain="plone" i18n:translate="label_description">Description</tal:block>:</label> <br />
30<metal:fieldMacro use-macro="python:here.widget('description', mode='view')"/>
31    </div>
32    </tal:is_desc>
33    <tal:is_tags condition="context/getTags"><br />
34    <div><label><tal:block i18n:translate="label_tags">Tags</tal:block>:</label> <br />
35<metal:fieldMacro use-macro="python:here.widget('tags',mode='view')"/>
36    </div>
37    </tal:is_tags>
38<tal:referenced_by define="resources python: here.getResourcesUsingPiece(return_objects=True)">
39    <div tal:condition="resources"><br /><label><tal:block i18n:translate="label_resources_using_this_piece">Used in</tal:block>:</label> <br />
40    <ul>
41    <tal:loop repeat="res resources">
42    <li tal:condition="python:res"><a href="" tal:content="res/Title" tal:attributes="href python:'%s/view' %res.absolute_url()" /></li>
43    </tal:loop>
44    </ul>       
45</div>
46</tal:referenced_by>
47    <br />
48    <div><label><tal:block i18n:translate="label_license">License</tal:block>:</label> <br />
49<metal:fieldMacro use-macro="python:here.widget('rights',mode='view')"/>
50</div>
51    </metal:body>                       
52</metal:main>
53</body>
54</html>
Note: See TracBrowser for help on using the repository browser.