source: trunk/skins/lemill/portlet_piece_actions.pt @ 1345

Revision 1345, 1.4 KB checked in by jukka, 13 years ago (diff)

Fixed #1128, refactored portlets with sane condition-statements.

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-material-actions"
6        tal:define="path_end python:here.REQUEST['URL'].split('/')[-1];
7                    is_History python:path_end=='history_view' or here.REQUEST.get('version',0);
8                    is_Translation python:path_end=='show_translations';
9                    is_owner here/amIOwner;
10                    can_moderate here/canIModerate;">
11<tal:visible condition="python:wf_state!='deleted'">
12    <div class="tb-portlet" metal:use-macro="here/portlet_activity_actions/macros/image_div">
13        <tal:block metal:fill-slot="image_edit"></tal:block>
14    </div>
15
16    <tal:history condition="is_History">
17    <div class="tb-portlet" metal:use-macro="here/portlet_material_actions/macros/history_div"/>
18    </tal:history>
19
20    <tal:hide condition="not:is_History">
21    <div class="tb-portlet" metal:use-macro="here/portlet_material_actions/macros/edit_div"/>
22    <div class="tb-portlet" metal:use-macro="here/portlet_material_actions/macros/collections_div"/>
23
24    </tal:hide>
25</tal:visible>
26<tal:deleted condition="python:wf_state=='deleted'">
27    <div class="tb-portlet" metal:use-macro="here/portlet_material_actions/macros/restore_div"/>
28</tal:deleted>
29</div>
30</body>
31</html>
32
Note: See TracBrowser for help on using the repository browser.