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

Revision 450, 4.5 KB checked in by jukka, 13 years ago (diff)

Fixed #511, spent 2h.

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="" 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    Actions
27    </div>
28    <ul tal:condition="isMember">
29        <li><a href="#" 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="" 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="" 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="" tal:attributes="href string:${here_url}/undelete_post">Undelete post</a>
39        </li>
40        <li><a href="" tal:attributes="href string:$blogurl/edit">Edit group information</a></li>
41        <li><a href="TODO">Edit categories</a></li>
42        <li><a href="TODO">Edit blogroll</a></li>
43        <li><a href="" 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="#" tal:attributes="href string:$blogurl/join_group">Join this group</a></li>
47    </ul>
48    <ul tal:condition="isAnon">
49        <li><a href="#" 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    Archives
57    </div>
58    <ul>
59        <li><a href="TODO">July 2006</li>
60        <li><a href="TODO">June 2006</li>
61        <li><a href="TODO">May 2006</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    Categories
69    </div>
70    <ul>
71        <li><a href="TODO">Blog posts</li>
72        <li><a href="TODO">Collaboration proposals</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    Members
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<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"> name </a>
90             </li>
91        </tal:listing>
92        <tal:toomuch condition="python: n_mem>399">
93             <li>
94                 <a href="#" tal:attributes="href list_members" tal:content="python: '%s members in this group' % n_mem"> n members </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    Blogroll
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    RSS feeds
113    </div>
114    <ul>
115        <li><a href="TODO">Posts</li>
116        <li><a href="TODO">Comments</li>
117    </ul>
118</div>
119
120</div>
121</body>
122</html>
123
124
Note: See TracBrowser for help on using the repository browser.