-
Notifications
You must be signed in to change notification settings - Fork 252
Expand file tree
/
Copy pathcommerce-order--admin.html.twig
More file actions
90 lines (87 loc) · 2.58 KB
/
commerce-order--admin.html.twig
File metadata and controls
90 lines (87 loc) · 2.58 KB
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
{#
/**
* @file
* Order template used on the admin order page.
*
* Available variables:
* - attributes: HTML attributes for the wrapper.
* - order: The rendered order fields.
* Use 'order' to print them all, or print a subset such as
* 'order.order_number'. Use the following code to exclude the
* printing of a given field:
* @code
* {{ order|without('order_number') }}
* @endcode
* - order_entity: The order entity.
*
* @ingroup themeable
*/
#}
{{ attach_library('commerce_order/form') }}
{% set order_state = order_entity.getState.getLabel %}
<div class="layout-order-form clearfix">
<div class="layout-region layout-region-order-main">
{{ order.order_items }}
{{ order.total_price }}
{% if order.activity|render|striptags|trim is not empty %}
<h2>{% trans %}Order activity{% endtrans %}</h2>
{{ order.activity }}
{% endif %}
</div>
<div class="layout-region layout-region-order-secondary">
<div class="entity-meta">
<div class="entity-meta__header">
<h3 class="entity-meta__title">
{{ order_state }}
</h3>
{% for key in ['completed', 'placed', 'changed'] %}
{% if order[key] %}
<div class="form-item">
{{ order[key] }}
</div>
{% endif %}
{% endfor %}
</div>
<details open>
<summary role="button">
{{ 'Customer Information'|t }}
</summary>
<div class="details-wrapper">
{% for key in ['uid', 'mail', 'ip_address'] %}
{% if order[key] %}
<div class="form-item">
{{ order[key] }}
</div>
{% endif %}
{% endfor %}
</div>
</details>
{% if order.billing_information %}
<details open>
<summary role="button">
{{ 'Billing information'|t }}
</summary>
<div class="details-wrapper">
{{ order.billing_information }}
</div>
</details>
{% endif %}
{% if order.shipping_information %}
<details open>
<summary role="button">
{{ 'Shipping information'|t }}
</summary>
<div class="details-wrapper">
{{ order.shipping_information }}
</div>
</details>
{% endif %}
{# If the order has possible transitions, render the field for transition buttons. #}
{% if order_entity.getState.getTransitions is not empty %}
<div class="entity-meta__header">
{{ order.state }}
</div>
{% endif %}
</div>
</div>
</div>