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

Revision 469, 5.4 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-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        isPost here/isPost | nothing;
12        isAuthor python:isPost and member.id==here.Creator()">
13
14<div class="tb-portlet" metal:define-macro="image_div">
15    <a href="#" tal:attributes="href string:$blogurl">
16        <img src="default.png" tal:attributes="src blogobj/getCoverImageURL" height="120" width="160" style="padding: 10px 19px"/>
17    </a>
18    <ul tal:condition="isMember">
19        <li><a href="" i18n:translate="link_change_cover_image" tal:attributes="href string:$blogurl/change_coverimage">Change cover image</a></li>
20    </ul>
21</div>
22
23<div class="tb-portlet">
24    <div class="portlet-title">
25    <img src="transparent.png" alt="" class="smallicon" />
26    <tal:block i18n:translate="heading_actions">Actions</tal:block>
27    </div>
28    <ul tal:condition="isMember">
29        <li><a href="#" i18n:translate="link_new_post" tal:attributes="href string:$blogurl/createObject?type_name=BlogPost">New post</a></li>
30       
31        <li tal:condition="python: isAuthor or isManager">
32           <a href="" i18n:translate="link_edit_post" tal:attributes="href string:${here_url}/edit">Edit this post</a>
33        </li>       
34        <li tal:condition="python: (isAuthor or isManager) and wf_state!='hidden'">
35           <a href="" i18n:translate="link_delete_post" tal:attributes="href string:${here_url}/delete_post">Delete this post</a>
36        </li>
37        <li tal:condition="python: (isAuthor or isManager) and wf_state=='hidden'" >
38           <a href="" i18n:translate="link_undelete_post" tal:attributes="href string:${here_url}/undelete_post">Undelete post</a>
39        </li>
40        <li><a href="" i18n:translate="link_edit_group_info" tal:attributes="href string:$blogurl/edit">Edit group information</a></li>
41        <li><a i18n:translate="link_edit_categories" href="TODO">Edit categories</a></li>
42        <li><a i18n:translate="link_edit_blogroll" href="TODO">Edit blogroll</a></li>
43        <li><a href="" i18n:translate="link_leave_group" tal:attributes="href string:$blogurl/leave_group">Leave group</a></li>
44    </ul>
45    <ul tal:condition="python: not isMember and not isAnon">
46        <li><a href="#" i18n:translate="link_join_group" tal:attributes="href string:$blogurl/join_group">Join this group</a></li>
47    </ul>
48    <ul tal:condition="isAnon">
49        <li><a href="#" i18n:translate="link_join_group" tal:attributes="href string:$blogurl/join_form">Join this group</a></li>
50    </ul>
51</div>
52
53<div class="tb-portlet">
54    <div class="portlet-title">
55    <img src="transparent.png" alt="" class="smallicon" />
56    <tal:block i18n:translate="heading_archives">Archives</tal:block>
57    </div>
58    <ul>
59        <li><a href="TODO">July 2006</a></li>
60        <li><a href="TODO">June 2006</a></li>
61        <li><a href="TODO">May 2006</a></li>
62    </ul>
63</div>
64
65<div class="tb-portlet">
66    <div class="portlet-title">
67    <img src="transparent.png" alt="" class="smallicon" />
68    <tal:block i18n:translate="heading_categories">Categories</tal:block>
69    </div>
70    <ul>
71        <li><a i18n:translate="link_blog_posts" href="TODO">Blog posts</a></li>
72        <li><a i18n:translate="link_collaboration_proposals" href="TODO">Collaboration proposals</a></li>
73    </ul>
74</div>
75
76<div class="tb-portlet" tal:condition="isMember" metal:define-macro="group_members">
77    <div class="portlet-title">
78    <img src="transparent.png" alt="" class="smallicon" />
79    <tal:block i18n:translate="heading_members">Members</tal:block>
80    </div>
81
82    <ul tal:define="group python:here.portal_groups.getGroupById(blogobj.getId());
83        groupmembers group/getGroupMemberIds;
84        n_mem python:len(groupmembers)">
85        <tal:listing condition="python: n_mem&lt;400" repeat="memberid groupmembers">
86             <li tal:define="member python:mtool.getHomeFolder(memberid);
87                 membername member/NiceName | nothing;
88                 member_url member/absolute_url | nothing">
89                 <a href="#" tal:attributes="href member_url" tal:content="membername">PLACEHOLDER</a>
90             </li>
91        </tal:listing>
92        <tal:toomuch condition="python: n_mem>399">
93             <li>
94                 <a href="#" i18n:translate="link_n_members_in_group" tal:attributes="href list_members"><tal:block i18n:name="amount" tal:replace="n_mem"/>members in this group</a>
95             </li>
96        </tal:toomuch>
97    </ul>
98</div>
99
100<div class="tb-portlet" tal:condition="blogobj/links" metal:define-macro="group_links">
101    <div class="portlet-title">
102    <img src="transparent.png" alt="" class="smallicon" />
103    <tal:block i18n:translate="heading_blogroll">Blogroll</tal:block>
104    </div>
105
106    <metal:fieldMacro use-macro="python:blogobj.widget('links',mode='view')"/>
107</div>
108
109<div class="tb-portlet">
110    <div class="portlet-title">
111    <img src="transparent.png" alt="" class="smallicon" />
112    <tal:block i18n:translate="heading_rss_feeds">RSS feeds</tal:block>
113    </div>
114    <ul>
115        <li><a i18n:translate="link_posts" href="TODO">Posts</a></li>
116        <li><a i18n:translate="link_comments" href="TODO">Comments</a></li>
117    </ul>
118</div>
119
120</div>
121</body>
122</html>
123
124
Note: See TracBrowser for help on using the repository browser.