[MERGE] Merged with main addons.
[odoo/odoo.git] / addons / web_dashboard / static / src / xml / web_dashboard.xml
1 <template>
2 <t t-name="DashBoard">
3     <div class="oe-dashboard-links">
4         <button type="button" class="button oe-dashboard-link-reset" title="Reset Layout.." t-att-style="view.fields_view.custom_view_id ? null : 'display: none'">
5             <img src="/web_dashboard/static/src/img/layout_2-1.png" width="16" height="16"/>
6             <span> Reset </span>
7         </button>
8         <button type="button" class="button oe-dashboard-link-change_layout" title="Change Layout..">
9             <img src="/web_dashboard/static/src/img/layout_1-1-1.png" width="16" height="16"/>
10             <span> Change Layout </span>
11         </button>
12     </div>
13     <table t-att-data-layout="node.attrs.style" t-attf-class="oe-dashboard oe-dashboard-layout_#{node.attrs.style}" cellspacing="0" cellpadding="0" border="0">
14     <tr>
15         <td t-foreach="node.children" t-as="column" t-if="column.tag == 'column'"
16              t-att-id="view.element_id + '_column_' + column_index" t-attf-class="oe-dashboard-column index_#{column_index}">
17
18             <t t-foreach="column.children" t-as="action" t-if="action.tag == 'action'" t-call="DashBoard.action"/>
19         </td>
20     </tr>
21     </table>
22 </t>
23 <t t-name="DashBoard.action">
24     <div t-att-data-id="action.attrs.name" class="oe-dashboard-action">
25         <h2 t-attf-class="oe-dashboard-action-header #{action.attrs.string ? '' : 'oe-dashboard-action-header-empty'}">
26             <t t-esc="action.attrs.string"/>
27             <t t-if="!action.attrs.string">&amp;nbsp;</t>
28             <button t-if="action.attrs.creatable and action.attrs.creatable !== 'false'" class="oe_button oe_dashboard_button_create">Create</button>
29             <span class='ui-icon ui-icon-closethick'></span>
30             <span class='ui-icon ui-icon-minusthick oe-dashboard-fold' t-if="!action.attrs.fold"></span>
31             <span class='ui-icon ui-icon-plusthick oe-dashboard-fold' t-if="action.attrs.fold"></span>
32         </h2>
33         <div t-attf-id="#{view.element_id}_action_#{column_index}_#{action_index}" class="oe-dashboard-action-content" t-att-style="action.attrs.fold ? 'display: none' : null"></div>
34     </div>
35 </t>
36 <t t-name="DashBoard.layouts">
37     <div class="oe-dashboard-layout-selector">
38         <p>
39             <strong>Choose dashboard layout</strong>
40         </p>
41         <ul>
42             <li t-foreach="'1 1-1 1-1-1 1-2 2-1'.split(' ')" t-as="layout" t-att-data-layout="layout">
43                 <img t-attf-src="/web_dashboard/static/src/img/layout_#{layout}.png"/>
44                 <img t-if="layout == current_layout"
45                     src="/web/static/src/img/icons/gtk-apply.png" width="16" height="16" class="oe-selected-layout"/>
46             </li>
47         </ul>
48     </div>
49 </t>
50 <t t-name="DashBoard.xml">
51     <form t-att-string="form_title">
52         <board t-att-style="style">
53             <column t-foreach="columns" t-as="column">
54                 <action t-foreach="column" t-as="action" t-att="action"/>
55             </column>
56         </board>
57     </form>
58 </t>
59 <div t-name="HomeWidget" class="oe-dashboard-home-widget"/>
60 <t t-name="HomeWidget.content">
61     <h3><t t-esc="widget.title"/></h3>
62     <iframe width="100%" frameborder="0" t-att-src="url"/>
63 </t>
64 </template>