1 <html xmlns="http://www.w3.org/1999/xhtml" tal:omit-tag="">
3 <head tal:replace="nothing">
4 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
5 <title>tree_block_template</title>
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>
20 <td tal:content="structure python:boxTitle.callAction(displayAction)">title slot here</td>
22 <tr><td i18n:translate="">Categories:</td></tr>
24 <td tal:content="structure python:categories.callAction(displayAction)">categories slot here</td>
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)">
37 <th tal:content="structure python:boxTitle.callAction(displayAction)">
44 <li tal:repeat="action filteredActionsList"><a href="." tal:content="action/title" tal:attributes="href action/url" i18n:translate="">action</a></li>