diff --git a/src/Resources/views/themes/base.html.twig b/src/Resources/views/themes/base.html.twig index 19c7c1a2..fafa635e 100755 --- a/src/Resources/views/themes/base.html.twig +++ b/src/Resources/views/themes/base.html.twig @@ -580,14 +580,14 @@ {# Action type templates #} -{% block action_value_icon %}{% endblock %} +{% block action_control_icon %}{% endblock %} -{% block action_value %} - {% if icon_attr %}{{ block('action_value_icon', theme, _context) }}{% endif %} +{% block action_control %} + {% if icon_attr %}{{ block('action_control_icon', theme, _context) }}{% endif %} {{- label|trans(translation_parameters, translation_domain) -}} {% endblock %} -{% block action_link_value %} +{% block action_link_control %} {% set attr = { href, target }|filter(v => v != null)|merge(attr|default({})) %} {% if batch %} @@ -595,11 +595,11 @@ {% endif %} - {% with { attr: {} } %}{{- block('action_value', theme, _context) -}}{% endwith %} + {% with { attr: {} } %}{{- block('action_control', theme, _context) -}}{% endwith %} {% endblock %} -{% block action_button_value %} +{% block action_button_control %} {% set attr = { href, target }|filter(v => v != null)|merge(attr|default({})) %} {% if batch %} @@ -607,11 +607,11 @@ {% endif %} - {% with { attr: {} } %}{{- block('action_value', theme, _context) -}}{% endwith %} + {% with { attr: {} } %}{{- block('action_control', theme, _context) -}}{% endwith %} {% endblock %} -{% block action_form_value %} +{% block action_form_control %} {% set attr = { action, method: html_friendly_method }|merge(attr|default({})) %} {% if batch %} @@ -627,7 +627,7 @@ {% set button_tag = button_tag|default('button') %} <{{ button_tag }} {% with { attr: { type: 'submit' }|merge(button_attr) } %}{{- block('attributes') -}}{% endwith %}> - {{- block('action_value', theme, _context) -}} + {{- block('action_control', theme, _context) -}} {% endblock %} diff --git a/src/Resources/views/themes/bootstrap_5.html.twig b/src/Resources/views/themes/bootstrap_5.html.twig index 66d2b0cf..6767e24f 100755 --- a/src/Resources/views/themes/bootstrap_5.html.twig +++ b/src/Resources/views/themes/bootstrap_5.html.twig @@ -577,7 +577,7 @@ {% endblock %} -{% block action_value_icon %} +{% block action_control_icon %} {% endblock %} @@ -642,13 +642,13 @@ {% endblock %} -{% block action_value %} +{% block action_control %}
{{ parent() }}
{% endblock %} -{% block action_link_value %} +{% block action_link_control %} {% set attr = { class: 'text-decoration-none' ~ (label ? ' me-2' : '') }|merge(attr) %} {% if confirmation %} @@ -671,7 +671,7 @@ {{ parent() }} {% endblock %} -{% block action_button_value %} +{% block action_button_control %} {% set attr = { class: 'btn btn-primary' ~ (icon_attr and label is same as false ? ' btn-icon' : ''), }|merge(attr) %} @@ -696,7 +696,7 @@ {{ parent() }} {% endblock %} -{% block action_form_value %} +{% block action_form_control %} {% set attr = { class: 'd-inline-block' }|merge(attr) %} {% set button_attr = { diff --git a/src/Twig/DataTableExtension.php b/src/Twig/DataTableExtension.php index d177c4c7..01d71b8a 100755 --- a/src/Twig/DataTableExtension.php +++ b/src/Twig/DataTableExtension.php @@ -237,7 +237,7 @@ public function renderAction(Environment $environment, ActionView $view, array $ environment: $environment, dataTable: $this->getDecoratedDataTable($view->getDataTable(), $variables), blockName: 'kreyu_data_table_action', - context: $this->getDecoratedViewContext($environment, $view, $variables, 'action', 'value'), + context: $this->getDecoratedViewContext($environment, $view, $variables, 'action', 'control'), ); }