summaryrefslogtreecommitdiff
path: root/addons/board/static/src/xml/board.xml
blob: 127c9b3a2f4547236551e2e1b354649aeab672a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?xml version="1.0" encoding="utf-8"?>
<template>
<t t-name="DashBoard">
    <t t-if="isMobile">
        <t t-set="node.attrs.layout" t-value="1"/>
    </t>
    <t t-if="!isMobile">
        <div class="oe_dashboard_links">
            <button type="button" class="button oe_dashboard_link_change_layout btn btn-secondary"
                title="Change Layout..">
                <img src="/board/static/src/img/layout_1-1-1.png" width="16" height="16" alt=""/>
                <span> Change Layout </span>
            </button>
        </div>
    </t>
    <table t-att-data-layout="node.attrs.layout" t-attf-class="oe_dashboard oe_dashboard_layout_#{node.attrs.layout}" cellspacing="0" cellpadding="0" border="0">
    <tr>
        <td t-foreach="node.children" t-as="column" t-if="column.tag == 'column'"
             t-att-id="'column_' + column_index" t-attf-class="oe_dashboard_column index_#{column_index}">

            <t t-foreach="column.children" t-as="action" t-if="action.tag == 'action'" t-call="DashBoard.action"/>
        </td>
    </tr>
    </table>
</t>
<t t-name="DashBoard.action">
    <div t-att-data-id="action.attrs.id" class="oe_action">
        <h2 t-attf-class="oe_header #{action.attrs.string ? '' : 'oe_header_empty'}">
            <span class="oe_header_txt"> <t t-esc="action.attrs.string"/> </span>
            <input class = "oe_header_text" type="text"/>
            <t t-if="!action.attrs.string">&amp;nbsp;</t>
            <span class='oe_icon oe_close'></span>
            <span class='oe_icon oe_minimize oe_fold' t-if="!action.attrs.fold"></span>
            <span class='oe_icon oe_maximize oe_fold' t-if="action.attrs.fold"></span>
        </h2>
        <div t-att-class="'oe_content' + (action.attrs.fold ? ' oe_folded' : '')"/>
    </div>
</t>
<t t-name="DashBoard.layouts">
    <div class="oe_dashboard_layout_selector">
        <p>
            <strong>Choose dashboard layout</strong>
        </p>
        <ul>
            <li t-foreach="'1 1-1 1-1-1 1-2 2-1'.split(' ')" t-as="layout" t-att-data-layout="layout">
                <img t-attf-src="/board/static/src/img/layout_#{layout}.png" alt=""/>
                <i t-if="layout == currentLayout" class="oe_dashboard_selected_layout fa fa-check fa-lg text-success" aria-label='Layout' role="img" title="Layout"/>
            </li>
        </ul>
    </div>
</t>
<t t-name="DashBoard.NoContent">
    <div class="o_view_nocontent">
        <div class="o_nocontent_help">
            <p class="o_view_nocontent_neutral_face">
                Your personal dashboard is empty
            </p><p>
                To add your first report into this dashboard, go to any
                menu, switch to list or graph view, and click <i>"Add to
                Dashboard"</i> in the extended search options.
            </p><p>
                You can filter and group data before inserting into the
                dashboard using the search options.
            </p>
        </div>
    </div>
</t>
<t t-name="DashBoard.xml">
    <form t-att-string="form_title">
        <board t-att-style="style">
            <column t-foreach="columns" t-as="column">
                <action t-foreach="column" t-as="action" t-att="action"/>
            </column>
        </board>
    </form>
</t>
<div t-name="HomeWidget" class="oe_dashboard_home_widget"/>
<t t-name="HomeWidget.content">
    <h3><t t-esc="widget.title"/></h3>
    <iframe width="100%" frameborder="0" t-att-src="url"/>
</t>

<t t-name="AddToBoardMenu" owl="1">
    <li class="o_menu_item o_add_to_board" role="menuitem">
        <button type="button" class="dropdown-item"
            t-ref="fallback-focus"
            t-on-click="state.open = !state.open"
            >
            <t>Add to my dashboard</t>
        </button>
        <t t-if="state.open">
            <div class="dropdown-item-text">
                <input type="text" class="o_input" autofocus=""
                    t-model.trim="state.name"
                    t-on-keydown="_onInputKeydown"
                />
            </div>
            <div class="dropdown-item-text">
                <button type="button" class="btn btn-primary" t-on-click="_addToBoard">Add</button>
            </div>
        </t>
    </li>
</t>

<t t-name="SearchView.addtodashboard">
    <a href="#" class="dropdown-item o_add_to_dashboard_link o_closed_menu">Add to my Dashboard</a>
    <div class="dropdown-item-text o_add_to_dashboard">
        <input class="o_input o_add_to_dashboard_input" type="text"/>
    </div>
    <div class="dropdown-item-text o_add_to_dashboard">
        <button type="button" class="btn btn-primary o_add_to_dashboard_button">Add</button>
    </div>
</t>
</template>