Skip to content

Commit

Permalink
Merge pull request #283 from mikadamczyk/ezp-28661-add-pagination-to-…
Browse files Browse the repository at this point in the history
…the-draft-under-edit

EZP-28661: Add pagination to the Draft under edit
  • Loading branch information
Łukasz Serwatka authored Dec 22, 2017
2 parents a1337ad + 22b52bc commit 5444bed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
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

0 comments on commit 5444bed

Please sign in to comment.