source: trunk/skins/lemill/portlet_blogpost_actions.pt @ 411

Revision 411, 2.5 KB checked in by jukka, 13 years ago (diff)

Worked #440, spent 40min. Group portlet has links to group members but separate page for displaying > 40 members is yet to be done. Testing it will be a pain...

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-blogpost-actions"
6    tal:define="blogobj here/getBlog;
7        blogurl blogobj/absolute_url;
8        blogtitle blogobj/title;
9        isMember python:here.isMember(member.id);
10        poster here/Creator;
11        poster_home python:mtool.getHomeFolder(poster);
12        poster_url poster_home/absolute_url;
13        postername poster_home/NiceName;
14        isAuthor python:poster==member.getId();
15        isManager python:here.amIManager()">
16
17<div class="tb-portlet">
18    <div class="portlet-title">
19    <a href="#" tal:attributes="href blogurl;" class="linkonbackground" tal:content="string:in group $blogtitle">in blog name</a>
20    </div>
21</div>
22
23<div class="tb-portlet" tal:condition="python: not isMember and not isAnon">
24    <div class="portlet-title">
25    <a href="#" tal:attributes="href string:$blogurl/join_group" class="linkonbackground"><img src="placeholder_24x24.png" alt="" class="smallicon" border="0" /> Join this group</a>
26    </div>
27</div>
28
29<div class="tb-portlet" tal:condition="isAnon">
30    <div class="portlet-title">
31    <a href="#" tal:attributes="href string:$blogurl/join_form" class="linkonbackground"><img src="placeholder_24x24.png" alt="" class="smallicon" border="0" /> Join this group</a>
32    </div>
33</div>
34
35
36
37<div class="tb-portlet" metal:define-macro="image_div">
38    <a href="#" tal:attributes="href poster_url">
39    <img src="default.png" tal:attributes="src here/getCoverImageURL" height="120" width="160" style="padding: 10px 19px"/>
40    </a>
41    <center>
42    <a href="#" tal:attributes="href poster_url" tal:content="python: test(isAuthor, 'You', postername)">name</a>
43     wrote:
44    </center>
45    <ul tal:condition="python: (isAuthor or isManager) and wf_state!='hidden'" >
46        <li>
47           <a href="" tal:attributes="href string:${here_url}/hide_post">Hide this post</a>
48        </li>
49    </ul>   
50    <ul tal:condition="python: (isAuthor or isManager) and wf_state=='hidden'" >
51        <li>
52           <a href="" tal:attributes="href string:${here_url}/bring_back_post">Make post visible</a>
53        </li>
54    </ul>   
55
56
57
58</div>
59
60<div class="tb-portlet" tal:condition="isMember">
61    <div class="portlet-title">
62    <a href="#" tal:attributes="href string:$blogurl/createObject?type_name=BlogPost" class="linkonbackground"><img src="placeholder_24x24.png" alt="" class="smallicon" border="0" /> New post</a>
63    </div>
64</div>
65
66
67</div>
68</body>
69</html>
70
71
Note: See TracBrowser for help on using the repository browser.