Skip to content

Commit

Permalink
[DX][Twig] Extract even more templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Zales0123 committed Aug 28, 2019
1 parent f7712ac commit d4fb72f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
17 changes: 17 additions & 0 deletions src/Resources/views/_footer.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% import '@SyliusAdmin/Common/Macro/money.html.twig' as money %}

<div class="ui stackable grid">
<div class="two column row">
<div class="column">
{% include '@SyliusRefundPlugin/_navigation.html.twig' %}
</div>
<div class="column">
<div class="ui right aligned basic segment">
<h3 id="refunded-total">
{{ 'sylius_refund.ui.refunded_total'|trans }}:
{{ money.format(order_refunded_total(order.number), order.currencyCode) }}
</h3>
</div>
</div>
</div>
</div>
8 changes: 8 additions & 0 deletions src/Resources/views/_navigation.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="ui buttons">
<button id="page-button" class="ui labeled icon primary button" type="submit">
<i class="check icon"></i>{{ 'sylius.ui.refund'|trans }}
</button>
<a id="back" href="{{ path('sylius_admin_order_show', {'id': order.id}) }}" class="ui button">
{{ 'sylius.ui.back'|trans }}
</a>
</div>
26 changes: 1 addition & 25 deletions src/Resources/views/orderRefunds.html.twig
Original file line number Diff line number Diff line change
@@ -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 %}
Expand Down Expand Up @@ -34,29 +32,7 @@
</table>

{% include '@SyliusRefundPlugin/_paymentMethod.html.twig' %}

<div class="ui stackable grid">
<div class="two column row">
<div class="column">
<div class="ui buttons">
<button id="page-button" class="ui labeled icon primary button" type="submit">
<i class="check icon"></i>{{ 'sylius.ui.refund'|trans }}
</button>
<a id="back" href="{{ path('sylius_admin_order_show', {'id': order.id}) }}" class="ui button">
{{ 'sylius.ui.back'|trans }}
</a>
</div>
</div>
<div class="column">
<div class="ui right aligned basic segment">
<h3 id="refunded-total">
{{ 'sylius_refund.ui.refunded_total'|trans }}:
{{ money.format(order_refunded_total(order.number), order.currencyCode) }}
</h3>
</div>
</div>
</div>
</div>
{% include '@SyliusRefundPlugin/_footer.html.twig' %}
<div class="ui hidden divider"></div>
</form>
</div>
Expand Down

0 comments on commit d4fb72f

Please sign in to comment.