Conservation de l'état de déroulement de l'arborescence (seulement pour le déroulement).
[MosaicDocument.git] / default_blocks / action_block_template.pt
1 <html xmlns="http://www.w3.org/1999/xhtml" tal:omit-tag="">
2
3 <head tal:replace="nothing">
4 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
5 <title>tree_block_template</title>
6 </head>
7
8 <body tal:define="here nocall:options/here;
9 block nocall:options/block;
10 slots block/getSlotsDic;
11 displayAction options/displayAction;
12 boxTitle nocall:slots/boxTitle;
13 categories nocall:slots/categories;" tal:omit-tag="" i18n:domain="plinn">
14 <div tal:condition="python:displayAction=='edit'">
15 <h3 i18n:translate="">Action box settings</h3>
16 <form action="." metal:use-macro="here/block_utils/macros/block_form">
17 <table metal:fill-slot="html_block_content">
18 <tr><td i18n:translate="">Box title:</td></tr>
19 <tr>
20 <td tal:content="structure python:boxTitle.callAction(displayAction)">title slot here</td>
21 </tr>
22 <tr><td i18n:translate="">Categories:</td></tr>
23 <tr>
24 <td tal:content="structure python:categories.callAction(displayAction)">categories slot here</td>
25 </tr>
26 </table>
27 </form>
28 </div>
29 <div tal:condition="python:displayAction=='view'">
30 <table cellspacing="0"
31 tal:define="allActions python:here.portal_actions.listFilteredActionsFor( here );
32 filteredActionsList python:[];
33 dummy python:[ filteredActionsList.extend(l) for l in [ allActions.get(key, []) for key in categories.text or allActions.keys() ] ]"
34 tal:condition="filteredActionsList"
35 tal:attributes="class python:'_'.join(categories.text)">
36 <tr>
37 <th tal:content="structure python:boxTitle.callAction(displayAction)">
38 Box title
39 </th>
40 </tr>
41 <tr>
42 <td>
43 <ul>
44 <li tal:repeat="action filteredActionsList"><a href="." tal:content="action/title" tal:attributes="href action/url" i18n:translate="">action</a></li>
45 </ul>
46 </td>
47 </tr>
48 </table>
49 </div>
50
51
52 </body>
53
54 </html>