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 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="" |
---|
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="" 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 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" |
---|
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="" 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="" |
---|
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 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="" 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 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 href="TODO">Translate</a></li> |
---|
70 | <!-- li displayed for all users --> |
---|
71 | <li><a 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 href="javascript:toggleFullScreenMode();">Fullscreen view</a></li> |
---|
80 | <li><a 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 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="" 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 | |
---|