Release 2.10 (#4549)

This commit is contained in:
Kevin Papst
2024-01-19 12:05:07 +01:00
committed by GitHub
parent afd60a67f6
commit 46739795ff
52 changed files with 348 additions and 292 deletions

View File

@@ -25,7 +25,7 @@
{% endif %}
<div class="btn-list">
{% if dataTable.hasConfiguration() %}
<a class="btn btn-icon {{ btnClass }}" href="#" data-bs-toggle="modal" data-bs-target="#modal_{{ dataTable.getTableName() }}">
<a class="btn btn-icon {{ btnClass }}" href="#" data-bs-toggle="modal" data-bs-target="#modal_{{ dataTable.getTableName() }}" title="{{ 'modal.columns.title'|trans }}">
{{ icon('columns', true) }}
</a>
{% endif %}
@@ -40,7 +40,7 @@
{% set order = form_widget(form.order) %}
{% set filterCount = dataTable.getQuery().countFilter() %}
<div class="input-group inline-search position-static">
<button type="button" class="btn {{ btnClass }} dropdown-toggle" data-bs-toggle="dropdown" data-bs-auto-close="false" aria-haspopup="true" aria-expanded="false" id="search-dropdown-btn">
<button type="button" class="btn {{ btnClass }} dropdown-toggle" data-bs-toggle="dropdown" data-bs-auto-close="false" aria-haspopup="true" aria-expanded="false" id="search-dropdown-btn" title="{{ 'search_filter'|trans }}">
{{ icon('filter', true) }}
{% if filterCount > 0 %}<span class="badge badge-pill bg-blue ms-1 d-none d-md-inline">{{ filterCount }}</span>{% endif %}
</button>
@@ -230,7 +230,7 @@
{% else %}
{% if headerOptions.batchUpdate is defined %}
<input type="checkbox" id="multi_update_all" class="multiupdater form-check-input m-0 align-middle">
<input type="checkbox" id="multi_update_all" class="multiupdater form-check-input m-0 align-middle" title="{{ 'batch_table_checkbox_all'|trans }}">
{% endif %}
{{ headerTitle }}
{% if headerOptions.html_after is defined %}
@@ -285,5 +285,5 @@
{% endmacro %}
{% macro datatable_multiupdate_row(id) %}
<input type="checkbox" name="id" value="{{ id }}" class="multi_update_single multiupdater form-check-input m-0 align-middle">
<input type="checkbox" name="id" value="{{ id }}" class="multi_update_single multiupdater form-check-input m-0 align-middle" title="{{ 'batch_table_checkbox'|trans }}">
{% endmacro %}

View File

@@ -1,5 +1,4 @@
{%- macro page_actions(actions) -%}
{% set large = true %}
{% set btnClasses = 'btn-primary' %}
{% set helpClasses = '' %}
{% if tabler_bundle.isNavbarOverlapping() %}
@@ -11,30 +10,7 @@
{% set help = null %}
<div class="page-actions">
<div class="pa-desktop d-none d-sm-inline-flex btn-list">
{%- for icon, values in actions %}
{% if 'help' in icon %}
{% set help = values %}
{% elseif 'divider' in icon and values is null %}
{# what to do here ? #}
{% else %}
{% if values.children is defined and values.children|length > 0 %}
<div class="dropdown">
<button type="button" class="btn {{ btnClasses}} dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ icon(icon, true) }}{% if large %} {{ values.title is defined ? values.title|trans : icon|trans({}, 'actions') }}{% endif %}
</button>
<div class="dropdown-menu">
{%- for icon, values in values.children %}
{% set values = values|merge({class: 'dropdown-item action-' ~ icon ~ ' ' ~ (values.class|default(''))}) %}
{{ _self.action_button(false, values, false) }}
{% endfor %}
</div>
</div>
{% else %}
{% set values = values|merge({combined: large, class: btnClasses ~ ' action-' ~ icon ~ ' ' ~ (values.class|default(''))}) %}
{{ _self.action_button(icon, values) }}
{% endif %}
{% endif %}
{% endfor -%}
{{ _self.actions(actions, {large: true, button_class: btnClasses}) }}
{% if help is not null %}
{% set help = help|merge({class: helpClasses ~ ' action-help ' ~ (help.class|default(''))}) %}
{{ _self.action_button('help', help) }}
@@ -52,6 +28,35 @@
</div>
{%- endmacro -%}
{%- macro actions(actions, options) -%}
{% set large = options.large ?? true %}
{% set btnClasses = options.button_class ?? 'btn-primary' %}
{%- for icon, values in actions %}
{% if 'help' in icon %}
{% set help = values %}
{% elseif 'divider' in icon and values is null %}
{# what to do here ? #}
{% else %}
{% if values.children is defined and values.children|length > 0 %}
<div class="dropdown">
<button type="button" class="btn {{ btnClasses }} dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ icon(icon, true) }}{% if large %} {{ values.title is defined ? values.title|trans : icon|trans({}, 'actions') }}{% endif %}
</button>
<div class="dropdown-menu">
{%- for icon, values in values.children %}
{% set values = values|merge({class: 'dropdown-item action-' ~ icon ~ ' ' ~ (values.class|default(''))}) %}
{{ _self.action_button(false, values, false) }}
{% endfor %}
</div>
</div>
{% else %}
{% set values = values|merge({combined: large, class: btnClasses ~ ' action-' ~ icon ~ ' ' ~ (values.class|default(''))}) %}
{{ _self.action_button(icon, values) }}
{% endif %}
{% endif %}
{% endfor -%}
{%- endmacro -%}
{% macro page_header(title) %}
<h2 class="page-header">{{ title|trans }}</h2>
{% endmacro %}