|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
2 |
| -<!-- Sale Order tab content template --> |
3 | 2 | <templates xml:space="preserve">
|
4 | 3 | <t t-name="website_dynamic_snippet.sale_order_snippet">
|
5 |
| - <section class="categories_section my-5"> |
6 |
| - <div class="container"> |
7 |
| - <h3 class="section_heading">Sale Order Details</h3> |
8 |
| - <div class="categories_wrapper"> |
9 |
| - <div class="categories .card_list_wrapper"> |
10 |
| - <table class="table"> |
11 |
| - <thead> |
| 4 | + <div class="container my-5 categories_section"> |
| 5 | + <h3 class="section_heading">Sale Order Details</h3> |
| 6 | + <div class="card_list_wrapper"> |
| 7 | + <t t-if="layout == 'list'"> |
| 8 | + <!-- LIST/TABLE VIEW --> |
| 9 | + <table class="table"> |
| 10 | + <thead> |
| 11 | + <tr> |
| 12 | + <th scope="col">Number</th> |
| 13 | + <th scope="col">Customer Name</th> |
| 14 | + <th scope="col">Status</th> |
| 15 | + </tr> |
| 16 | + </thead> |
| 17 | + <tbody> |
| 18 | + <t t-foreach="result" t-as="sale_order" t-key="sale_order.id"> |
12 | 19 | <tr>
|
13 |
| - <th scope="col">Number</th> |
14 |
| - <th scope="col">Customer Name</th> |
15 |
| - <th scope="col">Status</th> |
| 20 | + <th scope="row"><t t-esc="sale_order.id"/></th> |
| 21 | + <td><t t-esc="sale_order.partner_id[1]"/></td> |
| 22 | + <td><t t-esc="sale_order.state"/></td> |
16 | 23 | </tr>
|
17 |
| - </thead> |
18 |
| - <tbody> |
19 |
| - <t t-foreach="result" t-as="sale_order" t-key="sale_order.id"> |
20 |
| - <tr> |
21 |
| - <th scope="row"> |
22 |
| - <t t-esc="sale_order.id"/> |
23 |
| - </th> |
24 |
| - <td><t t-esc="sale_order.partner_id[1]"/></td> |
25 |
| - <td><t t-esc="sale_order.state"/></td> |
26 |
| - </tr> |
27 |
| - </t> |
28 |
| - </tbody> |
29 |
| - </table> |
30 |
| - |
31 |
| - <div class="text-center mt-3"> |
32 |
| - <button type="button" class="btn btn-primary load-more-button"> |
33 |
| - Load More |
34 |
| - </button> |
35 |
| - </div> |
36 |
| - |
| 24 | + </t> |
| 25 | + </tbody> |
| 26 | + </table> |
| 27 | + </t> |
| 28 | + <t t-else=""> |
| 29 | + <!-- GRID/CARD VIEW --> |
| 30 | + <div class="row"> |
| 31 | + <t t-foreach="result" t-as="sale_order" t-key="sale_order.id"> |
| 32 | + <div class="col-md-4 mb-4"> |
| 33 | + <div class="card h-100"> |
| 34 | + <div class="card-body"> |
| 35 | + <h5 class="card-title">Order #<t t-esc="sale_order.id"/></h5> |
| 36 | + <p class="card-text"><strong>Customer:</strong> <t t-esc="sale_order.partner_id[1]"/></p> |
| 37 | + <p class="card-text"><strong>Status:</strong> <t t-esc="sale_order.state"/></p> |
| 38 | + </div> |
| 39 | + </div> |
| 40 | + </div> |
| 41 | + </t> |
37 | 42 | </div>
|
| 43 | + </t> |
| 44 | + |
| 45 | + <div class="text-center mt-3"> |
| 46 | + <button type="button" class="btn btn-primary load-more-button"> |
| 47 | + Load More |
| 48 | + </button> |
38 | 49 | </div>
|
39 | 50 | </div>
|
40 |
| - </section> |
| 51 | + </div> |
41 | 52 | </t>
|
42 | 53 | </templates>
|
0 commit comments