source: trunk/skins/lemill/portlet_groupblog_actions.pt @ 1774

Revision 1774, 4.7 KB checked in by jukka, 12 years ago (diff)

Fixed #1371. Upgrade_lemill-script also recalculates authors and preference pane has button for doing that in a live site.

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-groupblog-actions"
6    tal:define="blogobj here/getBlog;
7        blogurl blogobj/absolute_url;
8        blogtitle blogobj/title;       
9        isMember python:here.isMember(member.id);
10        isManager python:here.amIManager();
11        canModerate python:here.canIModerate() or isManager;
12        isPost here/isPost | nothing;
13        isAuthor python:isPost and member.id==here.Creator();
14        isOwner python:here.amIOwner()">
15
16<div class="tb-portlet" metal:define-macro="image_div">
17    <p style="text-align: center"><a href="#" tal:attributes="href string:$blogurl">
18        <img src="default.png" tal:attributes="src blogobj/getCoverImageURL; alt python:here.meta_type" style="padding: 39px 0px 29px 0px;"/>
19    </a></p>
20    <ul tal:condition="isMember">
21        <li><a href="" i18n:translate="label_change_cover_image" tal:attributes="href string:$blogurl/change_coverimage">Change cover image</a></li>
22    </ul>
23</div>
24
25<div class="tb-portlet">
26    <div class="portlet-title">
27    <img src="transparent.png" alt="" class="smallicon" />
28    <tal:block i18n:domain="plone" i18n:translate="heading_actions">Actions</tal:block>
29    </div>
30    <ul tal:condition="isMember">       
31       
32        <li tal:condition="python: (isAuthor or isManager) and isPost">
33           <a href="" i18n:translate="label_edit_topic" tal:attributes="href string:${here_url}/edit">Edit this topic</a>
34        </li>       
35        <li tal:condition="python: (isAuthor or canModerate) and isPost and wf_state!='deleted'">
36           <a href="" i18n:translate="label_delete_topic" tal:attributes="href string:${here_url}/delete_post">Delete this topic</a>
37        </li>
38        <li tal:condition="python: (isAuthor or canModerate) and isPost and wf_state=='deleted'" >
39           <a href="" i18n:translate="label_undelete_topic" tal:attributes="href string:${here_url}/undelete_post">Undelete topic</a>
40        </li>
41        <li tal:condition="python: (isOwner or canModerate)"><a i18n:translate="label_manage_members" href="" tal:attributes="href string:$blogurl/edit">Manage group</a></li>
42        <li><a href="" i18n:translate="label_leave_group" tal:attributes="href string:$blogurl/leave_group">Leave group</a></li>
43    </ul>
44    <ul tal:condition="python: not isMember and not isAnon">
45        <li><a href="#" i18n:translate="label_join_group" tal:attributes="href string:$blogurl/join_group">Join this group</a></li>
46    </ul>
47    <ul tal:condition="isAnon">
48        <li><a href="#" i18n:translate="label_join_group" tal:attributes="href string:$blogurl/join_form">Join this group</a></li>
49    </ul>
50</div>
51
52<div class="tb-portlet" metal:define-macro="group_members">
53    <div class="portlet-title">
54    <img src="transparent.png" alt="" class="smallicon" />
55    <tal:block i18n:translate="heading_members">Members</tal:block>
56    </div>
57
58    <ul tal:define="groupmembers blogobj/getGroupMembers;
59        n_mem python:len(groupmembers)">
60        <tal:listing condition="python: n_mem&lt;400" repeat="memberdata groupmembers">
61             <li tal:define="memberroles python:memberdata[1];
62                 membername python:memberdata[0];
63                 member_url python:memberdata[2];">
64                 <a href="#" tal:attributes="href member_url" tal:content="membername">PLACEHOLDER</a>
65             </li>
66        </tal:listing>
67        <tal:toomuch condition="python: n_mem>399">
68             <li>
69                 <a href="#" i18n:translate="label_n_members_in_group" tal:attributes="href list_members"><tal:block i18n:name="amount" tal:replace="n_mem"/>members in this group</a>
70             </li>
71        </tal:toomuch>
72    </ul>
73</div>
74
75            <div class="tb-portlet" tal:define="
76                resources_n python:blogobj.getGroupMaterials(n=True);
77                ">
78                <div class="portlet-title">
79                    <img src="transparent.png" alt="" class="smallicon" />
80                    <tal:block i18n:translate="heading_groups_resources">Group's resources</tal:block>
81                </div>
82
83                <ul>
84                    <li>
85                        <a i18n:translate="" href="portfolio" tal:attributes="href python:'portfolio?getGroupsShared=%s&amp;portal_type=resource' % blogobj.getId()">Content</a>
86                    (<span tal:replace="resources_n" />)
87                    </li>
88                    <li>
89                    <a i18n:translate="label_tag_cloud" href="portfolio" tal:attributes="href python:'portfolio?getGroupsShared=%s' % blogobj.getId()">Tag cloud</a>
90                    </li>
91
92                   
93                </ul>
94           </div>
95
96
97
98</div>
99</body>
100</html>
101
102
Note: See TracBrowser for help on using the repository browser.