From f4d4dd97987f4e3bcb53c0b72fa5400d34568966 Mon Sep 17 00:00:00 2001 From: Mateusz Zalewski Date: Wed, 28 Aug 2019 13:37:12 +0200 Subject: [PATCH] [DX][Twig] Extract even more templates --- src/Resources/views/_footer.html.twig | 17 ++++++++++++++ src/Resources/views/_navigation.html.twig | 8 +++++++ src/Resources/views/orderRefunds.html.twig | 26 +--------------------- 3 files changed, 26 insertions(+), 25 deletions(-) create mode 100644 src/Resources/views/_footer.html.twig create mode 100644 src/Resources/views/_navigation.html.twig diff --git a/src/Resources/views/_footer.html.twig b/src/Resources/views/_footer.html.twig new file mode 100644 index 00000000..c73f13d1 --- /dev/null +++ b/src/Resources/views/_footer.html.twig @@ -0,0 +1,17 @@ +{% import '@SyliusAdmin/Common/Macro/money.html.twig' as money %} + +
+
+
+ {% include '@SyliusRefundPlugin/_navigation.html.twig' %} +
+
+
+

+ {{ 'sylius_refund.ui.refunded_total'|trans }}: + {{ money.format(order_refunded_total(order.number), order.currencyCode) }} +

+
+
+
+
diff --git a/src/Resources/views/_navigation.html.twig b/src/Resources/views/_navigation.html.twig new file mode 100644 index 00000000..6a2a5ae4 --- /dev/null +++ b/src/Resources/views/_navigation.html.twig @@ -0,0 +1,8 @@ +
+ + + {{ 'sylius.ui.back'|trans }} + +
diff --git a/src/Resources/views/orderRefunds.html.twig b/src/Resources/views/orderRefunds.html.twig index a71e2556..7ab6f343 100644 --- a/src/Resources/views/orderRefunds.html.twig +++ b/src/Resources/views/orderRefunds.html.twig @@ -1,7 +1,5 @@ {% extends 'SyliusAdminBundle::layout.html.twig' %} -{% import '@SyliusAdmin/Common/Macro/money.html.twig' as money %} - {% block title %}{{ 'sylius.ui.order'|trans ~' #'~ order.number }} {{ 'sylius_refund.ui.refunds'|trans }} {{ parent() }}{% endblock %} {% set customer = order.customer %} @@ -38,29 +36,7 @@ {% include '@SyliusRefundPlugin/_paymentMethod.html.twig' %} - -
-
-
-
- - - {{ 'sylius.ui.back'|trans }} - -
-
-
-
-

- {{ 'sylius_refund.ui.refunded_total'|trans }}: - {{ money.format(order_refunded_total(order.number), order.currencyCode) }} -

-
-
-
-
+ {% include '@SyliusRefundPlugin/_footer.html.twig' %}