source: trunk/skins/lemill/portlet_material_actions.pt @ 469

Revision 469, 5.0 KB checked in by tarmo, 13 years ago (diff)

All strings in ZPTs are now i18n'd. Refs #524, spent 90m,
30m remaining. Need to fix i18n:domains still.

Line 
1<html xmlns:tal="http://xml.zope.org/namespaces/tal"
2      xmlns:metal="http://xml.zope.org/namespaces/metal"
3      i18n:domain="lemill">
4<body>
5<div metal:define-macro="portlet" id="portlet-material-actions">
6
7<div class="tb-portlet" metal:define-macro="image_div">    
8    <img src="default.png" tal:attributes="src here/getCoverImageURL" height="120" width="160" style="padding: 10px 19px"/>
9    <!-- ul displayed for a group -->
10    <ul>
11        <!-- assuming that grou has modify portal content permission -->
12        <li tal:condition="is_editable"><a i18n:translate="link_change_cover_image" href="" tal:attributes="href string:${context/absolute_url}/change_coverimage">Change cover image</a></li>
13    </ul>
14</div>
15
16<div class="tb-portlet" metal:define-macro="edit_div">
17    <ul>
18        <!-- 2 li's displayed for logged in and anonymous users. In order to edit,
19        anonymous users have to join LeMill and a group. Logged in users who are
20        not in a group that owns the material have to join the group. Wikipedia
21        also has edit link always visible... -->
22        <li>
23            <a href="" i18n:translate="link_edit"
24                tal:attributes="href python:test(is_editable, context.absolute_url()+'/edit',
25                    test(isAnon, 'join_form', 'join_a_group'))">Edit</a>
26        </li>
27        <li><a href="" i18n:translate="link_view_history" tal:attributes="href string:${context/absolute_url}/history_view">View older versions</a></li>
28        <!-- 2 li's displayed for a chief editor -->
29        <li tal:condition="context/amIOwner"><a i18n:translate="link_invite_group" href="TODO">Invite group to edit</a></li>
30
31    <tal:block metal:define-macro="state_controls" tal:condition="context/amIOwner">
32        <li tal:condition="python:wf_state=='draft'">
33        <a href="content_status_modify?workflow_action=publish" i18n:translate="link_publish"
34            tal:define="self_url context/absolute_url" tal:attributes="href string:$self_url/content_status_modify?workflow_action=publish">Publish</a>
35        </li>
36    </tal:block>
37    </ul>
38</div>
39
40<div class="tb-portlet" metal:define-macro="collections_div">
41    <ul>
42    <tal:macro metal:define-macro="collection_actions">
43        <!-- li displayed for logged in users -->
44        <li tal:condition="not:isAnon"><a href="" i18n:translate="link_add_to_collection" tal:attributes="href python:str(here.absolute_url())+'/collection_add'">Add to collection</a></li>
45        <!-- 2 li's displayed for all users -->
46        <li tal:condition="colls" tal:define="userfolder python:mtool.getHomeFolder(str(member));
47                                              colls userfolder/getCollectionsFolder | nothing;">
48            <a href=""  i18n:translate="link_view_collections"
49                tal:attributes="href string:${colls/absolute_url}?obj_id=${context/UID}">
50                View collections</a>
51            <span tal:replace="python:'('+str(len(colls.getCollections(context.UID())))+')'">(1)</span>
52        </li>
53    </tal:macro>
54        <!-- need page listing all stories. overwise this li should not be displayed? -->
55        <li><a i18n:translate="link_read_tips" href="TODO">Read tips for use</a></li>       
56    </ul>
57</div>
58
59<div class="tb-portlet" tal:condition="python:wf_state=='public'">
60    <ul>
61        <!-- li displayed for logged in users -->
62        <li tal:condition="not:isAnon">
63            <a href="" i18n:translate="link_copy_and_edit" tal:define="self_url context/absolute_url" tal:attributes="href python:self_url+'/start_new_version?objId='+utool.getRelativeContentURL(context)">Copy and edit</a>
64        </li>
65        <!-- li displayed for all users -->
66        <li><a i18n:translate="link_view_copies" href="TODO">View copies</a></li>
67        <!-- li displayed for logged in users -->
68    <tal:macro metal:define-macro="translate_actions">
69        <li tal:condition="not:isAnon"><a i18n:translate="link_translate" href="TODO">Translate</a></li>       
70        <!-- li displayed for all users -->
71        <li><a i18n:translate="link_view_translation" href="TODO">View translations</a></li>
72    </tal:macro>
73    </ul>
74</div>
75
76<div class="tb-portlet" metal:define-macro="view_div">
77    <ul>
78        <!-- 2 li's displayed for all users -->
79        <li tal:replace="nothing"><a  i18n:translate="link_fullscreen_view" href="javascript:toggleFullScreenMode();">Fullscreen view</a></li>
80        <li><a i18n:translate="link_print_view" href="TODO">Print view</a></li>
81    </ul>
82</div>
83
84<!-- div displayed for a main editor -->
85<div class="tb-portlet" tal:condition="python:context.amIOwner() or here.amIManager()" metal:define-macro="owner_div">
86    <ul>
87        <li><a i18n:translate="link_change_main_editor" href="TODO">Change main editor</a></li>
88        <li metal:define-macro="hide_action" tal:condition="python:context.amIOwner() or here.amIManager()" >
89           <a href="" i18n:translate="link_hide" tal:define="self_url context/absolute_url" tal:attributes="href string:${self_url}/hideContent?obj_id=${context/getId}">Hide</a>
90        </li>
91    </ul>
92</div>
93
94</div>
95</body>
96</html>
97
Note: See TracBrowser for help on using the repository browser.