copy the pager in the bottom of the index table

remove the with class of the action column
This commit is contained in:
Simon Vieille 2023-11-10 19:28:20 +01:00
parent 2bd6836a7f
commit ee28c9abb7
Signed by: deblan
GPG key ID: 579388D585F70417
2 changed files with 31 additions and 13 deletions

View file

@ -619,7 +619,11 @@ fieldset.form-group {
&-filter {
padding-right: 20px;
padding-bottom: 20px;
padding-bottom: 15px;
.pagination {
margin-bottom: 0;
}
@media screen and (max-width: 769px) {
padding-right: 10px;
@ -650,8 +654,20 @@ fieldset.form-group {
}
}
.table .crud-batch-column {
width: 1%;
.table {
.crud-batch-column {
width: 1%;
}
.crud-action-column {
text-align: right;
white-space: nowrap;
width: 1px;
}
}
.no-wrap {
white-space: nowrap;
}
form {

View file

@ -1,6 +1,7 @@
{% extends '@Core/admin/layout.html.twig' %}
{% set context = context ?? 'index' %}
{% set pager_render = knp_pagination_render(pager) %}
{% block title %}{{ configuration.pageTitle(context)|trans }} {{ parent() ? ('- ' ~ parent()) : '' }}{% endblock %}
@ -67,16 +68,17 @@
<div class="row crud-header-filter">
<div class="col-auto ml-auto {% if pager.getPaginationData.pageCount > 1 %}mr-3{% endif %}">
<button data-modal="{{ path(configuration.pageRoute('filter'), configuration.pageRouteParams('filter')) }}" class="btn btn-sm btn-secondary">
<span class="fa fa-search mr-1"></span>
{{ 'Filter'|trans }} {% if not filters.isEmpty %}({{ 'yes'|trans }}){% endif %}
</button>
</div>
<div class="col-auto">
{{ knp_pagination_render(pager) }}
{{ pager_render|raw }}
</div>
</div>
{% else %}
<div class="crud-header-filter">
{{ knp_pagination_render(pager) }}
{{ pager_render|raw }}
</div>
{% endif %}
{% endblock %}
@ -85,6 +87,7 @@
{% block list %}
{% set isSortable = configuration.isSortableCollection(context) %}
{% set colspan = configuration.fields(context)|length + 1 + (configuration.hasBatchAction(context) ? 1 : 0) %}
<div class="table-responsive">
<table class="table">
@ -144,7 +147,7 @@
{% endblock %}
{% endfor %}
{% if configuration.showActions %}
<th class="crud-action-column miw-100 text-right">
<th class="crud-action-column">
{{ 'Actions'|trans }}
</th>
{% endif %}
@ -223,7 +226,7 @@
{% endfor %}
{% if configuration.showActions %}
<td class="crud-action-column col-2 miw-200 text-right">
<td class="crud-action-column">
{% block list_item_actions %}
{% block list_item_actions_before %}{% endblock %}
@ -281,6 +284,10 @@
</div>
{% endif %}
<div class="float-right mr-2">
{{ pager_render|raw }}
</div>
{% if configuration.hasBatchAction(context) %}
<div class="mb-2">
<form class="form-inline" action="{{ path(configuration.pageRoute('batch'), {
@ -315,13 +322,8 @@
{% endblock %}
{% endif %}
{% else %}
{% set count = configuration.fields(context)|length + 1 %}
{% if configuration.hasBatchAction(context) %}
{% set count = count + 1 %}
{% endif %}
<tr>
<td class="col-12 text-center p-4 text-black-50" colspan="{{ count }}">
<td class="col-12 text-center p-4 text-black-50" colspan="{{ colspan }}">
<div class="display-1">
<span class="fa fa-search"></span>
</div>