-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement twig hooks in credit_memos partials
- Loading branch information
1 parent
6c4512f
commit 4011808
Showing
19 changed files
with
119 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,15 @@ | ||
{% import '@SyliusAdmin/shared/helper/money.html.twig' as money %} | ||
|
||
{% if credit_memos|length > 0 %} | ||
<div class="py-3"> | ||
<div class="table-responsive"> | ||
<table class="table table-vcenter table-borderless table-sm card-table" id="credit-memos"> | ||
<tbody> | ||
{% for credit_memo in credit_memos %} | ||
<tr> | ||
<td class="w-1 py-2"> | ||
<div class="d-flex flex-column"> | ||
<strong>{{ credit_memo.issuedAt|date('d-m-Y') }}</strong> | ||
<div class="text-secondary">{{ credit_memo.number }}</div> | ||
</div> | ||
</td> | ||
<td class="text-center">{% include '@SyliusAdmin/shared/grid/field/channel.html.twig' with {'data': credit_memo.channel} %}</td> | ||
<td class="text-end"><strong>{{ money.format(credit_memo.total, credit_memo.currencyCode) }}</strong></td> | ||
<td class="w-1"> | ||
{% hook 'sylius_admin.order.show.content.sections.credit_memos.credit_memos.items.actions' %} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
<div class="py-3"> | ||
<div class="table-responsive"> | ||
<table class="table table-vcenter table-borderless table-sm card-table" id="credit-memos"> | ||
<tbody> | ||
{% for credit_memo in credit_memos %} | ||
<tr> | ||
{% hook 'sylius_admin.order.show.content.sections.credit_memos.list' %} | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<td class="w-1"> | ||
{% hook 'actions' %} | ||
</td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% set credit_memo = hookable_metadata.context.credit_memo %} | ||
|
||
<td class="text-center"> | ||
{% include '@SyliusAdmin/shared/grid/field/channel.html.twig' with {'data': credit_memo.channel} %} | ||
</td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<td class="w-1 py-2"> | ||
<div class="d-flex flex-column"> | ||
{% hook 'details' %} | ||
</div> | ||
</td> |
3 changes: 3 additions & 0 deletions
3
templates/admin/order/credit_memo/list/details/date.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{% set credit_memo = hookable_metadata.context.credit_memo %} | ||
|
||
<strong>{{ credit_memo.issuedAt|date('d-m-Y') }}</strong> |
3 changes: 3 additions & 0 deletions
3
templates/admin/order/credit_memo/list/details/number.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{% set credit_memo = hookable_metadata.context.credit_memo %} | ||
|
||
<div class="text-secondary">{{ credit_memo.number }}</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% import '@SyliusAdmin/shared/helper/money.html.twig' as money %} | ||
|
||
{% set credit_memo = hookable_metadata.context.credit_memo %} | ||
|
||
<td class="text-end"><strong>{{ money.format(credit_memo.total, credit_memo.currencyCode) }}</strong></td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,5 @@ | ||
{% if credit_memos|length > 0 %} | ||
<div class="card border-0 bg-body-tertiary mb-3" id="credit-memos"> | ||
<div class="card-header">{{ 'sylius_refund.ui.credit_memos'|trans }}</div> | ||
<div class="card-body"> | ||
<table class="table align-middle mb-0"> | ||
<tbody> | ||
{% for credit_memo in credit_memos %} | ||
<tr> | ||
<td> | ||
<div class="d-flex flex-column"> | ||
<strong>{{ credit_memo.issuedAt|date('d-m-Y') }}</strong> | ||
<span class="text-body-tertiary">{{ credit_memo.number }}</span> | ||
</div> | ||
</td> | ||
<td class="text-end">{{ credit_memo.total|sylius_format_money(credit_memo.currencyCode, credit_memo.localeCode) }}</td> | ||
<td class="w-1"> | ||
{% hook 'sylius_shop.account.order.show.content.main.credit_memos' %} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
{% hook 'sylius_shop.account.order.show.content.main.credit_memos' with { credit_memos } %} | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div class="card-header">{{ 'sylius_refund.ui.credit_memos'|trans }}</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{% set credit_memos = hookable_metadata.context.credit_memos %} | ||
|
||
<div class="card-body"> | ||
<table class="table align-middle mb-0"> | ||
<tbody> | ||
{% for credit_memo in credit_memos %} | ||
<tr> | ||
{% hook 'list' %} | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<td> | ||
<div class="d-flex flex-column"> | ||
{% hook 'details' %} | ||
</div> | ||
</td> |
3 changes: 3 additions & 0 deletions
3
templates/shop/order/credit_memos/list/details/date.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{% set credit_memo = hookable_metadata.context.credit_memo %} | ||
|
||
<strong>{{ credit_memo.issuedAt|date('d-m-Y') }}</strong> |
3 changes: 3 additions & 0 deletions
3
templates/shop/order/credit_memos/list/details/number.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{% set credit_memo = hookable_metadata.context.credit_memo %} | ||
|
||
<span class="text-body-tertiary">{{ credit_memo.number }}</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<td class="w-1"> | ||
<a href="{{ path('sylius_refund_shop_credit_memo_download', {'id': hookable_metadata.context.credit_memo.id}) }}" {{ sylius_test_html_attribute('download-button') }}> | ||
{{ ux_icon('tabler:download') }} | ||
</a> | ||
</td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{% set credit_memo = hookable_metadata.context.credit_memo %} | ||
|
||
<td class="text-end">{{ credit_memo.total|sylius_format_money(credit_memo.currencyCode, credit_memo.localeCode) }}</td> |
This file was deleted.
Oops, something went wrong.