Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forタグにif条件の追加はTwig2.10で非推奨なので修正 #5357

Merged
merged 1 commit into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ file that was distributed with this source code.
</div>

{# エンティティ拡張の自動出力 #}
{% for f in searchForm if f.vars.eccube_form_options.auto_render %}
{% for f in searchForm|filter(f => f.vars.eccube_form_options.auto_render) %}
<div class="row mb-2">
{% if f.vars.eccube_form_options.form_theme %}
{% form_theme f f.vars.eccube_form_options.form_theme %}
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/admin/search_items.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
<ul class="list-inline">
{% for child in form.children if child.vars.name != '_token' and child.vars.data is not empty %}
{% for child in form.children|filter(child => (child.vars.name != '_token' and child.vars.data is not empty)) %}
{% if false == (child.vars.label == 'admin.list.sort.key' or child.vars.label == 'admin.list.sort.type') %}{# ソートの選択結果は表示しない #}
<li class="list-inline-item"><span class="font-weight-bold">{{ child.vars.label|trans }}:&nbsp;</span>
{%- if child.vars.data is iterable -%}
Expand Down
4 changes: 2 additions & 2 deletions src/Eccube/Resource/template/default/Shopping/confirm.twig
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ file that was distributed with this source code.
<div class="ec-select">
<label>{{ 'front.shopping.delivery_provider'|trans }}</label>
{% set delivery_fee = 0 %}
{% for item in shipping.order_items if item.isDeliveryFee %}
{% for item in shipping.order_items|filter(item => item.isDeliveryFee) %}
{% set delivery_fee = item.total_price %}
{% endfor %}
{{ Order.Shippings[idx].Delivery }}({{ delivery_fee|price }})
Expand All @@ -140,7 +140,7 @@ file that was distributed with this source code.
</div>
<div class="ec-blockRadio">
{% set charge = 0 %}
{% for item in Order.order_items if item.isCharge %}
{% for item in Order.order_items|filter(item => item.isCharge) %}
{% set charge = item.total_price %}
{% endfor %}
{{ Order.Payment }}({{ charge|price }})
Expand Down