瀏覽代碼

Merge branch 'develop' of https://gitea.laclic.fr/Laclic/LcShopBundle into develop

develop
Guillaume 3 年之前
父節點
當前提交
cf4e365a57
共有 2 個檔案被更改,包括 11 行新增2 行删除
  1. +2
    -2
      ShopBundle/Resources/views/backend/default/block/macros.html.twig
  2. +9
    -0
      ShopBundle/Resources/views/backend/default/field/status.html.twig

+ 2
- 2
ShopBundle/Resources/views/backend/default/block/macros.html.twig 查看文件

@@ -353,13 +353,13 @@
{{ reductionCredit.value|format_price(false) }}
</td>
<td>
{% include '@EasyAdmin/default/field_boolean.html.twig' with {value: reductionCredit.status} %}
{% include '@LcShop/backend/default/field/status.html.twig' with {value: reductionCredit.status} %}
</td>
<td>
{% include '@EasyAdmin/default/field_boolean.html.twig' with {value: isUsed} %}
</td>
<td>
{% if isUsed == false %}
{% if isUsed == false and reductionCredit.status >=0 %}
{{ _self.button('ReductionCredit', 'edit', reductionCredit.id, 'primary') }}
{% endif %}
</td>

+ 9
- 0
ShopBundle/Resources/views/backend/default/field/status.html.twig 查看文件

@@ -0,0 +1,9 @@
{% trans_default_domain 'EasyAdminBundle' %}

{% if value == 1 %}
<span class="badge badge-success">{{ 'label.true'|trans }}</span>
{% elseif value == 0 %}
<span class="badge badge-danger">{{ 'label.false'|trans }}</span>
{% elseif value == -1 %}
<span class="badge badge-secondary">Supprimé</span>
{% endif %}

Loading…
取消
儲存