-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
_shipment.html.twig
40 lines (37 loc) · 1.8 KB
/
_shipment.html.twig
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
{% import '@SyliusUi/Macro/labels.html.twig' as label %}
{% set shipped = constant('Sylius\\Component\\Shipping\\Model\\Shipment::STATE_SHIPPED') %}
<div class="item">
<div class="right floated content">
{% include '@SyliusAdmin/Common/Label/shipmentState.html.twig' with {'data': shipment.state} %}
</div>
<i class="large truck icon"></i>
<div class="content">
<div class="header">
{{ shipment.method }}
</div>
<div>
{% include "@SetonoSyliusPickupPointPlugin/Shop/Label/Shipment/pickupPoint.html.twig" %}
</div>
<div class="description">
<i class="globe icon"></i>{{ shipment.method.zone }}
</div>
{% if shipment.shippedAt is not empty %}
{{ 'sylius.ui.shipped_at'|trans }}: <span class="shipped-at-date">{{ shipment.shippedAt|date('d-m-Y H:i:s') }}</span>
{% endif %}
</div>
{% if sm_can(shipment, 'ship', 'sylius_shipment') %}
{{ render(path('sylius_admin_partial_shipment_ship', {'orderId': order.id, 'id': shipment.id})) }}
{% endif %}
{% if shipment.tracking is not empty %}
<div class="ui segment">
<span class="ui top attached icon label"><i class="plane icon"></i> {{ 'sylius.ui.tracking_code'|trans|upper }}</span>
<p>{{ shipment.tracking }}</p>
</div>
{% endif %}
{% if shipment.state == shipped %}
{% set path = path('sylius_admin_shipment_resend_confirmation_email', {'id': shipment.id, '_csrf_token': csrf_token(shipment.id)}) %}
<a href="{{ path }}" class="ui icon labeled tiny fluid button" {{ sylius_test_html_attribute('resend-shipment-confirmation-email') }}>
<i class="send icon"></i> {{ 'sylius.ui.resend_the_shipment_confirmation_email'|trans }}
</a>
{% endif %}
</div>