diff --git a/src/BootstrapAdminUi/templates/shared/grid/field/boolean.html.twig b/src/BootstrapAdminUi/templates/shared/grid/field/boolean.html.twig new file mode 100644 index 00000000..6143bb37 --- /dev/null +++ b/src/BootstrapAdminUi/templates/shared/grid/field/boolean.html.twig @@ -0,0 +1,3 @@ +{% import "@SyliusBootstrapAdminUi/shared/helper/field/boolean.html.twig" as boolean %} + +{{ boolean.default(data) }} diff --git a/src/BootstrapAdminUi/templates/shared/helper/field/boolean.html.twig b/src/BootstrapAdminUi/templates/shared/helper/field/boolean.html.twig new file mode 100644 index 00000000..c0c47e06 --- /dev/null +++ b/src/BootstrapAdminUi/templates/shared/helper/field/boolean.html.twig @@ -0,0 +1,7 @@ +{% macro default(data) %} + {% if true == data %} +
{{ ux_icon('tabler:check', {'class': 'icon text-green'}) }}
+ {% else %} +
{{ ux_icon('tabler:x', {'class': 'icon icon-sm text-secondary'}) }}
+ {% endif %} +{% endmacro %}