summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/xml/snippets.xml
blob: 0d8333338501310f6aff8a0debceb8b260a5014b (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
<?xml version="1.0" encoding="utf-8"?>
<templates id="template" xml:space="preserve">
    <t t-name="web_editor.snippet_overlay">
        <div class="oe_overlay">
            <div class="o_handles">
                <!-- Visible overlay borders + allow to resize when not readonly -->
                <div class="o_handle n readonly"/>
                <div class="o_handle e readonly"/>
                <div class="o_handle w readonly"/>
                <div class="o_handle s readonly"/>

                <div class="o_overlay_options_wrap">
                    <!-- Overlay move specific section -->
                    <div class="o_overlay_move_options">
                        <!-- Button-like handle to drag and drop -->
                        <div class="o_move_handle"/>
                    </div>
                    <button type="button" class="oe_snippet_remove fa fa-trash"/>
                </div>
            </div>
        </div>
    </t>
    <t t-name="web_editor.customize_block_options_section">
        <we-customizeblock-options>
            <we-title>
                <span t-esc="name"/>
                <we-top-button-group>
                    <we-button class="fa fa-fw fa-clone oe_snippet_clone o_we_link o_we_hover_success"
                                title="Duplicate Container"
                                aria-label="Duplicate Container"/>
                    <we-button class="fa fa-fw fa-trash oe_snippet_remove o_we_link o_we_hover_danger"
                                title="Remove Block"
                                aria-label="Remove Block"/>
                </we-top-button-group>
            </we-title>
        </we-customizeblock-options>
    </t>
    <t t-name="web_editor.outdated_block_message">
        <we-alert>
            <we-title>This block is outdated</we-title>
            <span>To make changes, drop this block and use the new options in the last version.</span>
        </we-alert>
    </t>

    <!-- options -->
    <div t-name="web_editor.snippet.option.colorpicker" class="colorpicker">
        <div class="o_we_colorpicker_switch_panel d-flex justify-content-end px-2">
            <t t-if="widget.withCombinations">
                <button type="button" tabindex="1" class="o_we_colorpicker_switch_pane_btn active" data-target="color-combinations">
                    <span>Combinations</span>
                </button>
                <button type="button" tabindex="2" t-attf-class="o_we_colorpicker_switch_pane_btn #{widget.withCombinations ? '' : 'active'}" data-target="theme-colors">
                    <span>Custom</span>
                </button>
            </t>
            <button t-if="widget.resetButton" type="button" class="my-1 ml-auto o_we_color_btn o_colorpicker_reset">
                <t t-if="widget.withCombinations">None</t>
                <t t-else="">Reset</t>
            </button>
        </div>
        <div t-attf-class="o_colorpicker_sections #{widget.withCombinations ? '' : 'd-none'} pt-2 px-2 pb-3 bg-black-25" data-color-tab="color-combinations">
            <!-- List all Presets -->
            <t t-foreach="5" t-as="i">
                <t t-call="web_editor.colorpalette.combination.btn">
                    <t t-set="number" t-value="i + 1"/>
                </t>
            </t>
        </div>
        <div t-attf-class="o_colorpicker_sections #{widget.withCombinations ? 'd-none' : ''} py-3 px-2 bg-black-25" data-color-tab="theme-colors"/>
    </div>
    <t t-name="web_editor.colorpalette.combination.btn">
        <button type="button" class="o_we_color_btn o_we_color_combination_btn"
                t-att-data-color="number" t-attf-title="Preset #{number}">
            <t t-call="web_editor.color.combination.preview"/>
        </button>
    </t>
    <t t-name="web_editor.color.combination.preview">
        <div class="o_we_cc_preview_wrapper d-flex justify-content-between">
            <h1 class="o_we_color_combination_btn_title">Title</h1>
            <p class="o_we_color_combination_btn_text flex-grow-1">Text</p>
            <span class="o_we_color_combination_btn_btn btn btn-sm btn-primary o_btn_preview mr-1"><small>Button</small></span>
            <span class="o_we_color_combination_btn_btn btn btn-sm btn-secondary o_btn_preview"><small>Button</small></span>
        </div>
    </t>

    <t t-name="web_editor.many2one.button">
        <div class="btn-group">
            <a role="button" href="#" class="btn btn-secondary dropdown-toggle d-none" data-toggle="dropdown" data-hover="dropdown" title="Search Contact" aria-label="Search Contact">
                <i class="fa fa-search"></i>
            </a>
            <ul class="dropdown-menu contact_menu d-block list-group list-group-flush mx-1" role="menu">
                <li class="px-1"><a role="menuitem" class="dropdown-item pl-1 pr-2"><i class="fa fa-search"></i><input href="#" type="email" placeholder="Search" class="ml-2" autocomplete="off"/></a></li>
            </ul>
        </div>
    </t>

    <t t-name="web_editor.many2one.search">
        <t t-foreach="contacts" t-as="item">
            <li class="list-group-item px-2"><a role="menuitem" href="#" t-att-data-id="item.id" t-att-data-name="item.display_name"><t t-esc="item.display_name"/> <t t-if="item.city or item.country_id"><small class="text-muted">(<t t-esc="item.city"/> <t t-esc="item.country_id and item.country_id[1]"/>)</small></t></a></li>
        </t>
    </t>
</templates>