summaryrefslogtreecommitdiff
path: root/addons/website/views/snippets/s_product_catalog.xml
blob: 91821f7cf425cce5eb91ee5af8cdeb64c51133ea (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
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<template id="s_product_catalog" name="Pricelist">
    <section class="s_product_catalog oe_img_bg oe_custom_bg pt48 pb32"
             style="background-image: url('/web/image/website.s_product_catalog_default_image');"
             data-vcss="001">
        <div class="container">
            <h2>Menu</h2>
            <p>Add a menu description.</p>
            <div class="row">
                <div class="col-lg-6 pt16 pb16">
                    <h3>Starter</h3>
                    <ul class="list-unstyled my-3">
                        <t t-call="website.s_product_catalog_dish">
                            <t t-set="name">Cheese Onion Rings</t>
                            <t t-set="price">$9.00</t>
                        </t>
                        <t t-call="website.s_product_catalog_dish">
                            <t t-set="name">Chefs Fresh Soup of the Day</t>
                            <t t-set="price">$7.50</t>
                        </t>
                        <t t-call="website.s_product_catalog_dish">
                            <t t-set="name">Beef Carpaccio</t>
                            <t t-set="price">$10.50</t>
                        </t>
                    </ul>
                </div>
                <div class="col-lg-6 pt16 pb16">
                    <h3>Main Course</h3>
                    <ul class="list-unstyled my-3">
                        <t t-call="website.s_product_catalog_dish">
                            <t t-set="name">Filet Mignon 8oz</t>
                            <t t-set="price">$15.50</t>
                        </t>
                        <t t-call="website.s_product_catalog_dish">
                            <t t-set="name">Farm Friendly Chicken Supreme</t>
                            <t t-set="price">$15.50</t>
                        </t>
                        <t t-call="website.s_product_catalog_dish">
                            <t t-set="name">Tuna and Salmon Burger</t>
                            <t t-set="price">$12.00</t>
                        </t>
                    </ul>
                </div>
            </div>
        </div>
    </section>
</template>

<template id="s_product_catalog_dish">
    <li class="s_product_catalog_dish" data-name="Product">
        <p class="s_product_catalog_dish_title d-flex align-items-baseline pb-2">
            <span t-esc="name" class="s_product_catalog_dish_name"/>
            <span t-esc="price" class="s_product_catalog_dish_price ml-auto pl-2"/>
        </p>
        <p class="s_product_catalog_dish_description border-top text-muted pt-1"><i>Add a description here</i></p>
    </li>
</template>

<template id="s_product_catalog_options" inherit_id="website.snippet_options">
    <xpath expr="." position="inside">
        <div data-js="ProductCatalog" data-selector=".s_product_catalog">
            <we-checkbox string="Descriptions" data-toggle-description="true"
                         data-no-preview="true"/>
            <t t-call="website.snippet_options_border_line_widgets">
                <t t-set="label">⌙ Separator</t>
                <t t-set="direction" t-value="'top'"/>
                <t t-set="apply_to" t-value="'.s_product_catalog_dish_description'"/>
                <!-- Note: no need of extra dependency thanks to the apply-to -->
            </t>
        </div>
        <div data-selector=".s_product_catalog_dish"/>
    </xpath>
    <xpath expr="//div[@data-js='SnippetMove']" position="attributes">
        <attribute name="data-selector" add=".s_product_catalog_dish" separator=","/>
        <attribute name="data-drop-near" add=".s_product_catalog_dish" separator=","/>
    </xpath>
</template>

<template id="assets_snippet_s_product_catalog_css_001" inherit_id="website.assets_frontend">
    <xpath expr="//link[last()]" position="after">
        <link rel="stylesheet" type="text/scss" href="/website/static/src/snippets/s_product_catalog/001.scss"/>
    </xpath>
</template>

</odoo>