mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
minor #17261 [UI] Improve readability of Payment and Shipment states on Order Show (kulczy)
This PR was merged into the 2.0 branch. Discussion ---------- <img width="868" alt="image" src="https://github.com/user-attachments/assets/62ba622c-d07a-42dd-891a-b7f154513909"> <img width="862" alt="image" src="https://github.com/user-attachments/assets/2055b307-e68a-486e-b0d7-aae80c7e37d2"> Commits ------- Improve readability of Payment and Shipment states on Order Show
This commit is contained in:
commit
4af003712a
13 changed files with 29 additions and 21 deletions
|
|
@ -1,5 +1,3 @@
|
|||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{% hook 'header' %}
|
||||
</div>
|
||||
{% hook 'header' %}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
{% set order = hookable_metadata.context.resource %}
|
||||
|
||||
<span class="ms-2" {{ sylius_test_html_attribute('order-payment-state') }}>
|
||||
{{ label(order.paymentState) }}
|
||||
</span>
|
||||
<div class="ms-auto">
|
||||
<span class="ms-2" {{ sylius_test_html_attribute('order-payment-state') }}>
|
||||
{{ label(order.paymentState) }}
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
{{ 'sylius.ui.payments'|trans }}
|
||||
<div class="card-title">
|
||||
{{ 'sylius.ui.payments'|trans }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<td>
|
||||
<td class="w-1">
|
||||
<div class="d-flex gap-1 justify-content-end">
|
||||
{% hook 'actions' %}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<form action="{{ path('sylius_admin_order_payment_complete', {'orderId': order.id, 'id': payment.id}) }}" method="POST" novalidate>
|
||||
<input type="hidden" name="_method" value="PUT">
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token(payment.id) }}" />
|
||||
<button type="submit" class="btn btn-primary" {{ sylius_test_html_attribute('complete-payment', payment.id) }}>
|
||||
<button type="submit" class="btn" {{ sylius_test_html_attribute('complete-payment', payment.id) }}>
|
||||
{{ icon({ icon: 'check' }) }} {{ 'sylius.ui.complete'|trans }}
|
||||
</button>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<form action="{{ path('sylius_admin_order_payment_refund', {'orderId': order.id, 'id': payment.id}) }}" method="POST" novalidate>
|
||||
<input type="hidden" name="_method" value="PUT">
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token(payment.id) }}" />
|
||||
<button type="submit" class="btn btn-yellow" {{ sylius_test_html_attribute('refund-payment', payment.id) }}>
|
||||
<button type="submit" class="btn" {{ sylius_test_html_attribute('refund-payment', payment.id) }}>
|
||||
{{ icon({ icon: 'arrow_back_up_double' }) }} {{ 'sylius.ui.refund'|trans }}
|
||||
</button>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
{% from '@SyliusAdmin/order/macro/order_payment_state_label.html.twig' import label %}
|
||||
|
||||
{% set payment = hookable_metadata.context.payment %}
|
||||
|
||||
<td class="w-1" {{ sylius_test_html_attribute('payment-state') }}>
|
||||
<div class="text-primary strong me-3">{{ ('sylius.ui.' ~ payment.state)|trans|upper }}</div>
|
||||
{{ label(payment.state) }}
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{% hook 'header' %}
|
||||
</div>
|
||||
{% hook 'header' %}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
{% set order = hookable_metadata.context.resource %}
|
||||
|
||||
<span class="ms-2" {{ sylius_test_html_attribute('order-shipping-state') }}>
|
||||
{{ label(order.shippingState) }}
|
||||
</span>
|
||||
<div class="ms-auto">
|
||||
<span class="ms-2" {{ sylius_test_html_attribute('order-shipping-state') }}>
|
||||
{{ label(order.shippingState) }}
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
{{ 'sylius.ui.shipments'|trans }}
|
||||
<div class="card-title">
|
||||
{{ 'sylius.ui.shipments'|trans }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<td>
|
||||
<td class="w-1">
|
||||
<div class="d-flex justify-content-end">
|
||||
{% hook 'actions' %}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
{% from '@SyliusAdmin/order/macro/order_shipping_state_label.html.twig' import label %}
|
||||
|
||||
{% set shipment = hookable_metadata.context.shipment %}
|
||||
|
||||
<td class="w-1" {{ sylius_test_html_attribute('shipment-state') }}>
|
||||
<div class="text-primary strong">{{ ('sylius.ui.' ~ shipment.state)|trans|upper }}</div>
|
||||
{{ label(shipment.state) }}
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<input type="hidden" name="_method" value="PUT">
|
||||
<div class="input-group flex-nowrap">
|
||||
{{ form_widget(form.tracking, sylius_test_form_attribute('shipment-tracking')|sylius_merge_recursive({'attr': {'placeholder': 'sylius.ui.tracking_code'|trans ~ '...', 'style': 'min-width: 130px;'}})) }}
|
||||
<button type="submit" class="btn btn-primary" {{ sylius_test_html_attribute('shipment-ship-button') }}>
|
||||
<button type="submit" class="btn" {{ sylius_test_html_attribute('shipment-ship-button') }}>
|
||||
{{ icon({icon: 'truck'}) }}
|
||||
{{ 'sylius.ui.ship'|trans }}
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue