Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EZP-28661: Add pagination to the Draft under edit #283

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/bundle/Resources/views/content/tab/versions/tab.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
}) }}
{% include '@EzPlatformAdminUi/parts/table_header.html.twig' with { headerText: 'tab.versions.draft_under_edit'|trans()|desc('Draft under edit'), tools: tab.table_header_tools(form_version_remove_draft) } %}
{% if draft_pager.currentPageResults is not empty %}
{{ include('@EzPlatformAdminUi/content/tab/versions/table.html.twig', { 'versions': draft_pager.currentPageResults, 'is_draft': true, 'form': form_version_remove_draft }) }}
{{ include('@EzPlatformAdminUi/content/tab/versions/table.html.twig', {
'versions': draft_pager.currentPageResults,
'is_draft': true,
'form': form_version_remove_draft,
'haveToPaginate': draft_pager.haveToPaginate
}) }}
{% else %}
<p class="ez-relations-box-list-no-content">
{{ 'tab.versions.no_permission'|trans()|desc('You don\'t have access to view the content item\'s versions') }}
Expand All @@ -29,7 +34,7 @@
'%total%': draft_pager.nbResults}, 'pagination')|desc('Viewing <strong>%viewing%</strong> out of <strong>%total%</strong> items')|raw }}
</span>
</div>
<div class="row justify-content-center align-items-center">
<div class="row justify-content-center align-items-center mb-3">
{{ pagerfanta(draft_pager, 'ez',{
'routeName': draft_pagination_params.route_name,
'routeParams': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% set is_draft = is_draft is defined and is_draft %}
{% set is_archived = is_archived is defined and is_archived %}

<table class="table">
<table class="table {% if is_draft and haveToPaginate %} mb-3 {% endif %}">
<thead>
<tr>
{% if form is defined %}
Expand Down