Part-DB.Part-DB-server/templates/components/history_log_macros.html.twig
Jan Böhmer 7d834ac8d7 Include the query part of the request, when generating the url for the datatables via a custom twig function.
This fixes issue #735, as without this the query gets not passed to the datatable
2024-10-16 23:57:02 +02:00

24 lines
No EOL
1,002 B
Twig

{% macro last_activity_component(datatable) %}
{{ _self.log_component(datatable, 'last_activity') }}
{% endmacro %}
{% macro element_history_component(datatable) %}
{{ _self.log_component(datatable, 'element_history') }}
{% endmacro %}
{% macro system_log_component(datatable) %}
{{ _self.log_component(datatable, 'system_log') }}
{% endmacro %}
{% macro log_component(datatable, tag = null) %}
{% import "components/datatables.macro.html.twig" as datatables %}
<form method="post" action="{{ path("log_undo") }}"
{{ stimulus_controller('elements/delete_btn') }} {{ stimulus_action('elements/delete_btn', "submit", "submit") }}
data-delete-title="{% trans %}log.undo.confirm_title{% endtrans %}"
data-delete-message="{% trans %}log.undo.confirm_message{% endtrans %}">
<input type="hidden" name="redirect_back" value="{{ uri_without_host(app.request) }}">
{{ datatables.logDataTable(datatable, tag) }}
</form>
{% endmacro %}