summaryrefslogtreecommitdiff
path: root/addons/website/data/website_demo.xml
blob: 514910ce504e885eb42d6caec699debb2e524192 (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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <record id="bs_debug_view" model="ir.ui.view">
            <field name="name">BS Debug</field>
            <field name="type">qweb</field>
            <field name="key">website.bs_debug_page_view</field>
            <field name="arch" type="xml">
                <t name="Debug" t-name="website.bs_debug_page_view">
                    <t t-call="website.layout">
                        <t t-set="odoo_theme_colors" t-value="[['o-color-1', 'Color 1'], ['o-color-2', 'Color 2'], ['o-color-3', 'Color 3'], ['o-color-4', 'Color 4'], ['o-color-5', 'Color 5']]"/>
                        <t t-set="bs_theme_colors" t-value="[['primary', 'Primary'], ['secondary', 'Secondary'], ['success', 'Success'], ['info', 'Info'], ['warning', 'Warning'], ['danger', 'Danger'], ['light', 'Light'], ['dark', 'Dark']]"/>
                        <t t-set="bs_gray_colors" t-value="[['white', 'White'], ['100', '100'], ['200', '200'], ['300', '300'], ['400', '400'], ['500', '500'], ['600', '600'], ['700', '700'], ['800', '800'], ['900', '900'], ['black', 'Black']]"/>
                        <div id="wrap" class="oe_structure">
                            <section class="py-2">
                                <div class="container">
                                    <h1>Components</h1>
                                    <div class="row">
                                        <div class="col-md">
                                            <h2>Badge</h2>
                                            <t t-foreach="bs_theme_colors" t-as="color">
                                                <span t-attf-class="badge mb-1 badge-#{color[0]}"><t t-esc="color[1]"/></span>
                                            </t>
                                            <h3 class="mt-2 h6">Pill</h3>
                                            <t t-foreach="bs_theme_colors" t-as="color">
                                                <span t-attf-class="badge mb-1 badge-pill badge-#{color[0]}"><t t-esc="color[1]"/></span>
                                            </t>
                                            <h3 class="mt-2 h6">Link</h3>
                                            <t t-foreach="bs_theme_colors" t-as="color">
                                                <a href="#" t-attf-class="badge mb-1 badge-#{color[0]}"><t t-esc="color[1]"/></a>
                                            </t>
                                            <h3 class="mt-2 h6">Autosizing</h3>
                                            <div class="h3">
                                                <t t-foreach="bs_theme_colors" t-as="color">
                                                    <span t-attf-class="badge mb-1 badge-#{color[0]}"><t t-esc="color[1]"/></span>
                                                </t>
                                            </div>

                                            <h2 class="mt-4">Button</h2>
                                            <t t-foreach="bs_theme_colors" t-as="color">
                                                <button type="button" t-attf-class="btn mb-1 btn-#{color[0]}"><t t-esc="color[1]"/></button>
                                            </t>
                                            <h3 class="mt-2 h6">Outline</h3>
                                            <t t-foreach="bs_theme_colors" t-as="color">
                                                <button type="button" t-attf-class="btn mb-1 btn-outline-#{color[0]}"><t t-esc="color[1]"/></button>
                                            </t>
                                            <h3 class="mt-2 h6">Small</h3>
                                            <t t-foreach="bs_theme_colors" t-as="color">
                                                <button type="button" t-attf-class="btn mb-1 btn-sm btn-#{color[0]}"><t t-esc="color[1]"/></button>
                                            </t>
                                            <h3 class="mt-2 h6">Large</h3>
                                            <t t-foreach="bs_theme_colors" t-as="color">
                                                <button type="button" t-attf-class="btn mb-1 btn-lg btn-#{color[0]}"><t t-esc="color[1]"/></button>
                                            </t>

                                            <h2 class="mt-4">Dropdown</h2>
                                            <div class="dropdown">
                                                <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Toggle</button>
                                                <div class="dropdown-menu">
                                                    <div class="dropdown-header">Header</div>
                                                    <a class="dropdown-item" href="#">Action</a>
                                                    <a class="dropdown-item" href="#">Something else here</a>
                                                    <div class="dropdown-divider"/>
                                                    <a class="dropdown-item" href="#">Separated link</a>
                                                </div>
                                            </div>

                                            <h2 class="mt-4">Navbar</h2>
                                            <nav class="navbar navbar-expand-lg navbar-light bg-light">
                                                <a class="navbar-brand" href="#">Navbar</a>
                                                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                                                <span class="navbar-toggler-icon"></span>
                                                </button>

                                                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                                                    <ul class="navbar-nav mr-auto">
                                                        <li class="nav-item active">
                                                            <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
                                                        </li>
                                                        <li class="nav-item">
                                                            <a class="nav-link" href="#">Link</a>
                                                        </li>
                                                        <li class="nav-item">
                                                            <a class="nav-link disabled" href="#">Disabled</a>
                                                        </li>
                                                    </ul>
                                                    <form class="form-inline my-2 my-lg-0">
                                                        <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search"/>
                                                        <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
                                                    </form>
                                                </div>
                                            </nav>

                                            <h2 class="mt-4">Form</h2>
                                            <form>
                                                <div class="form-group">
                                                    <label for="exampleInputEmail1">Email address</label>
                                                    <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email"/>
                                                    <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
                                                </div>
                                            </form>

                                            <h2 class="mt-4">Pagination</h2>
                                            <nav>
                                                <ul class="pagination">
                                                    <li class="page-item disabled">
                                                        <a class="page-link" href="#" tabindex="-1">Previous</a>
                                                    </li>
                                                    <li class="page-item">
                                                        <a class="page-link" href="#">1</a>
                                                    </li>
                                                    <li class="page-item active">
                                                        <a class="page-link" href="#">2 <span class="sr-only">(current)</span></a>
                                                    </li>
                                                    <li class="page-item">
                                                        <a class="page-link" href="#">3</a>
                                                    </li>
                                                    <li class="page-item">
                                                        <a class="page-link" href="#">Next</a>
                                                    </li>
                                                </ul>
                                            </nav>
                                        </div>
                                        <div class="col-md-auto">
                                            <h2>Alert</h2>
                                            <t t-foreach="bs_theme_colors" t-as="color">
                                                <div t-attf-class="alert alert-#{color[0]}">
                                                    This is a "<t t-esc="color[1]"/>" alert with a <a href="#" class="alert-link">link</a>.
                                                </div>
                                            </t>

                                            <h2 class="mt-4">Breadcrumb</h2>
                                            <nav aria-label="breadcrumb">
                                                <ol class="breadcrumb">
                                                    <li class="breadcrumb-item"><a href="#">Home</a></li>
                                                    <li class="breadcrumb-item"><a href="#">Library</a></li>
                                                    <li class="breadcrumb-item active" aria-current="page">Data</li>
                                                </ol>
                                            </nav>

                                            <h2 class="mt-4">Card</h2>
                                            <div class="card">
                                                <div class="card-header">
                                                    Card Header
                                                </div>
                                                <div class="card-body">
                                                    Card Body
                                                </div>
                                                <ul class="list-group list-group-flush">
                                                    <li class="list-group-item">Item 1</li>
                                                    <li class="list-group-item">Item 2</li>
                                                </ul>
                                                <div class="card-footer">
                                                    Card Footer
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </section>
                            <section class="py-2">
                                <div class="container">
                                    <h1>Utilities &amp; Typography</h1>
                                    <div class="row">
                                        <div class="col-md">
                                            <div class="row no-gutters">
                                                <t t-foreach="odoo_theme_colors" t-as="color">
                                                    <div t-attf-class="col-auto bg-#{color[0]}">
                                                        <div class="py-1 px-3"><t t-esc="color[1]"/></div>
                                                    </div>
                                                </t>
                                            </div>
                                            <div class="row no-gutters mt-2">
                                                <t t-foreach="bs_theme_colors" t-as="color">
                                                    <div t-attf-class="col-auto bg-#{color[0]}">
                                                        <div class="py-1 px-3"><t t-esc="color[1]"/></div>
                                                    </div>
                                                </t>
                                            </div>
                                            <div class="row no-gutters mt-2">
                                                <t t-foreach="bs_gray_colors" t-as="color">
                                                    <div t-attf-class="col-auto bg-#{color[0]}">
                                                        <div class="py-1 px-3"><t t-esc="color[1]"/></div>
                                                    </div>
                                                </t>
                                            </div>
                                            <div class="row no-gutters mt-4">
                                                <t t-foreach="odoo_theme_colors" t-as="color">
                                                    <div t-attf-class="col-auto text-#{color[0]}">
                                                        <div class="py-1 px-3"><t t-esc="color[1]"/></div>
                                                    </div>
                                                </t>
                                            </div>
                                            <div class="row no-gutters mt-2">
                                                <t t-foreach="bs_theme_colors" t-as="color">
                                                    <div t-attf-class="col-auto text-#{color[0]}">
                                                        <div class="py-1 px-3"><t t-esc="color[1]"/></div>
                                                    </div>
                                                </t>
                                            </div>
                                            <div class="row no-gutters mt-2">
                                                <t t-foreach="bs_gray_colors" t-as="color">
                                                    <div t-attf-class="col-auto text-#{color[0]}">
                                                        <div class="py-1 px-3"><t t-esc="color[1]"/></div>
                                                    </div>
                                                </t>
                                            </div>
                                        </div>
                                        <div class="col-md-auto">
                                            <h1>Headings 1</h1>
                                            <h2>Headings 2</h2>
                                            <h3>Headings 3</h3>
                                            <h4>Headings 4</h4>
                                            <h5>Headings 5</h5>
                                            <h6>Headings 6</h6>
                                            <p>Paragraph with <strong>bold</strong>, <span class="text-muted">muted</span> and <em>italic</em> texts</p>
                                            <p><a href="#">Link</a></p>
                                            <p><button type="button" class="btn btn-link">Link button</button></p>
                                        </div>
                                    </div>
                                </div>
                            </section>
                        </div>
                    </t>
                </t>
            </field>
        </record>

        <record id="color_combinations_debug_view" model="ir.ui.view">
            <field name="name">Color Combinations Debug</field>
            <field name="type">qweb</field>
            <field name="key">website.color_combinations_debug_page_view</field>
            <field name="arch" type="xml">
                <t name="Debug" t-name="website.color_combinations_debug_page_view">
                    <t t-call="website.layout">
                        <div id="#wrap" class="oe_structure" style="background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAH0lEQVQYV2NkQAL/GRikGGF8KOcZWADGAbEZkTkgAQDXKwcebKRDwQAAAABJRU5ErkJggg==) repeat;">
                            <section class="py-1">
                                <div class="container">
                                    <div class="d-flex mb-3">
                                        <div class="card w-100">
                                            <div class="card-body">
                                                <table class="table table-borderless">
                                                    <tr>
                                                        <th colspan="2" class="align-middle">Theme Colors</th>
                                                        <td t-foreach="[1, 2, 3, 4, 5]" t-as="i">
                                                            <div class="media">
                                                                <span t-attf-class="border p-3 mr-1 bg-o-color-#{i}"></span>
                                                                <div class="media-body align-self-center">
                                                                    <h5 class="m-0">o-color-<t t-esc="i"/></h5>
                                                                </div>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <th colspan="2" class="align-middle">BTS Base Colors</th>
                                                        <td t-foreach="['primary', 'secondary', 'light', 'dark']" t-as="i">
                                                            <div class="media">
                                                                <span t-attf-class="border p-3 mr-1 bg-#{i}"></span>
                                                                <div class="media-body align-self-center">
                                                                    <h5 class="m-0" t-esc="i"></h5>
                                                                </div>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-6 mt-3" t-foreach="[1, 2, 3, 4, 5]" t-as="i">
                                            <div t-attf-class="o_cc o_cc#{i} p-3 border">
                                                <div class="row">
                                                    <div class="col-7">
                                                        <h2>
                                                            Preset <t t-esc="i"/>
                                                        </h2>
                                                        <p>Paragraph text. Lorem <b>ipsum dolor sit amet</b>, consectetur adipiscing elit. <i>Integer posuere erat a ante</i>. <a href="#">Link text</a></p>
                                                        <p class="text-muted">Text muted. Lorem <b>ipsum dolor sit amet</b>, consectetur.</p>
                                                        <p class="small">Small text. Lorem <b>ipsum dolor sit amet</b>, consectetur adipiscing elit. <i>Integer posuere erat a ante</i>.</p>
                                                    </div>
                                                    <div class="col-5 border-left">
                                                        <a href="#" class="mb-3 btn-block btn btn-primary">btn-primary</a>
                                                        <a href="#" class="mb-3 btn-block btn btn-secondary">btn-secondary</a>
                                                        <a href="#" class="mb-3 btn-block btn btn-outline-primary">btn-outline-primary</a>
                                                        <a href="#" class="mb-3 btn-block btn btn-outline-secondary">btn-outline-secondary</a>
                                                    </div>
                                                </div>
                                                <hr class="my-4"/>
                                                <div class="row">
                                                    <div class="col-7">
                                                        <div class="form-group row">
                                                            <label class="col-2 col-form-label">Label</label>
                                                            <div class="col-10">
                                                                <input type="email" class="form-control" placeholder="placeholder"/>
                                                                <small id="emailHelp" class="form-text text-muted">Form field help text</small>
                                                            </div>
                                                        </div>
                                                        <div class="card w-100 mb-3">
                                                        <div class="card-body">
                                                                <h4 class="card-title">H4 Card title</h4>
                                                                <h5 class="card-subtitle mb-2 text-muted">H5 Card subtitle</h5>
                                                                <p class="card-text">Paragraph. <a href="#">text link</a></p>

                                                                <t t-foreach="['primary','secondary', 'info', 'warning', 'danger', 'success']" t-as="btn">
                                                                    <a href="#" t-attf-class="mb-2 btn-sm btn btn-#{btn}" t-esc="'btn-' + btn"/>
                                                                </t>
                                                            </div>
                                                        </div>
                                                        <nav aria-label="breadcrumb">
                                                            <ol class="breadcrumb">
                                                                <li class="breadcrumb-item"><a href="#">Breadcrumb</a></li>
                                                                <li class="breadcrumb-item"><a href="#">Library</a></li>
                                                                <li class="breadcrumb-item active">Data</li>
                                                            </ol>
                                                        </nav>
                                                        <small>TABS</small>
                                                        <ul class="nav nav-tabs mb-3">
                                                            <li class="nav-item">
                                                                <a class="nav-link active" href="#">Active</a>
                                                            </li>
                                                            <li class="nav-item">
                                                                <a class="nav-link" href="#">Link</a>
                                                            </li>
                                                            <li class="nav-item">
                                                                <a class="nav-link disabled" href="#">Disabled</a>
                                                            </li>
                                                        </ul>
                                                        <div class="progress">
                                                            <div class="progress-bar" style="width: 25%;">25%</div>
                                                        </div>
                                                    </div>
                                                    <div class="col-5 border-left">
                                                        <div t-foreach="['info', 'warning', 'danger', 'success']" t-as="btn">
                                                            <a href="#" t-attf-class="mb-2 btn-block btn btn-#{btn}" t-esc="'btn-' + btn"/>
                                                            <a href="#" t-attf-class="mb-3 btn-block btn btn-outline-#{btn}" t-esc="'btn-outline-' + btn"/>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </section>
                        </div>
                    </t>
                </t>
            </field>
        </record>

        <record id="snippets_debug_view" model="ir.ui.view">
            <field name="name">Snippet Debug</field>
            <field name="type">qweb</field>
            <field name="key">website.snippets_debug_page_view</field>
            <field name="arch" type="xml">
                <t name="Debug" t-name="website.snippets_debug_page_view">
                    <t t-call="website.layout">
                        <style>
                            #snippets_menu, #o_scroll > .o_panel > .o_panel_header {
                                display: none !important;
                            }
                            [data-oe-type="snippet"]:not([data-module-id])::before {
                                content: attr(name);
                                display: block;
                                padding: 16px;
                                background-color: lightgray;
                                color: black;
                                font-size: 24px;
                            }
                            [data-oe-type="snippet"]:not([data-module-id])::after {
                                content: "";
                                display: table;
                                clear: both;
                            }
                        </style>
                        <div id="wrap" class="oe_structure">
                            <t t-call="website.snippets"/>
                        </div>
                    </t>
                </t>
            </field>
        </record>
    </data>

    <data noupdate="1">
        <record id="website2" model="website">
            <field name="name">My Website 2</field>
            <field name="domain"></field>
        </record>

        <!-- BS Debug Page -->
        <!-- Showcase all (most?) BS components and utilities -->
        <record id="bs_debug_page" model="website.page">
            <field name="url">/website/demo/bootstrap</field>
            <field name="is_published">False</field>
            <field name="view_id" ref="bs_debug_view"/>
        </record>

        <!-- Presets Debug Page -->
        <record id="color_combinations_debug_page" model="website.page">
            <field name="url">/website/demo/color-combinations</field>
            <field name="is_published">False</field>
            <field name="view_id" ref="color_combinations_debug_view"/>
        </record>

        <!-- Snippet Debug Page -->
        <!-- Showcase all snippets -->
        <record id="snippets_debug_page" model="website.page">
            <field name="url">/website/demo/snippets</field>
            <field name="is_published">False</field>
            <field name="view_id" ref="snippets_debug_view"/>
        </record>
    </data>
</odoo>