Updated placement of pagination and added some extra css classes for ease of styling

This commit is contained in:
NewKind
2017-08-15 10:02:25 +02:00
parent 1f9eaa2c56
commit fad61b2c0c
6 changed files with 55 additions and 45 deletions
@@ -26,11 +26,6 @@
{% set pages = collection.slice(start, limit.total) %}
{% block particle %}
{% if total > limit.total and display.prevnext_buttons %}
<button class="button float-left contentarray-button" data-id="{{ id }}" data-start="{{ max(0, start - limit.total) }}"{{ start - limit.total < 0 ? ' disabled' }}>Prev</button>
<button class="button float-right contentarray-button" data-id="{{ id }}" data-start="{{ start + limit.total }}"{{ start + limit.total >= total ? ' disabled' }}>Next</button>
<div class="clearfix"></div>
{% endif %}
{# All pages #}
<div class="g-content-array g-grav-pages{% if particle.css.class %} {{ particle.css.class }}{% endif %}" {% if particle.extra %}{{ attr_extra|raw }}{% endif %}>
@@ -132,12 +127,20 @@
{% endfor %}
</div>
{% endfor %}
{% if total > limit.total and display.pagination_buttons %}
<div class="g-content-array-pagination">
<button class="button float-left contentarray-button pagination-button pagination-button-prev" data-id="{{ id }}" data-start="{{ max(0, start - limit.total) }}"{{ start - limit.total < 0 ? ' disabled' }}>Prev</button>
<button class="button float-right contentarray-button pagination-button pagination-button-next" data-id="{{ id }}" data-start="{{ start + limit.total }}"{{ start + limit.total >= total ? ' disabled' }}>Next</button>
<div class="clearfix"></div>
</div>
{% endif %}
</div>
{% endblock %}
{% block javascript_footer %}
{% if total > limit.total and display.prevnext_buttons %}
{% if total > limit.total and display.pagination_buttons %}
{% do gantry.load('jquery') %}
<script>
(function ($) {
@@ -32,6 +32,15 @@ form:
pattern: '\d{1,2}'
overridable: false
article.display.pagination_buttons:
type: select.select
label: Pagination
description: Select if the pagination buttons should be shown to allow users to see more articles.
default: ''
options:
show: Show
'': Hide
article.limit.columns:
type: select.select
label: Number of columns
@@ -90,6 +99,7 @@ form:
intro: Intro
full: Full
'': None
article.display.text.type:
type: select.select
label: Article Text
@@ -186,15 +196,6 @@ form:
label: Button CSS Classes
description: CSS class name for the 'Read More' button.
article.display.prevnext_buttons:
type: select.select
label: Prev/Next Buttons
description: Select if the Prev and Next buttons should be shown to allow users to see more articles.
default: ''
options:
show: Show
'': Hide
_tab_extras:
label: Extras
fields:
@@ -40,11 +40,6 @@
{% set articles = article_finder.find() %}
{% block particle %}
{% if total > limit.total and display.prevnext_buttons %}
<button class="button float-left contentarray-button" data-id="{{ id }}" data-start="{{ max(0, start - limit.total) }}"{{ start - limit.total < 0 ? ' disabled' }}>Prev</button>
<button class="button float-right contentarray-button" data-id="{{ id }}" data-start="{{ start + limit.total }}"{{ start + limit.total >= total ? ' disabled' }}>Next</button>
<div class="clearfix"></div>
{% endif %}
{# All Articles #}
<div class="g-content-array g-joomla-articles{% if particle.css.class %} {{ particle.css.class }}{% endif %}" {% if particle.extra %}{{ attr_extra|raw }}{% endif %}>
@@ -150,11 +145,19 @@
{% endfor %}
</div>
{% endfor %}
{% if total > limit.total and display.pagination_buttons %}
<div class="g-content-array-pagination">
<button class="button float-left contentarray-button pagination-button pagination-button-prev" data-id="{{ id }}" data-start="{{ max(0, start - limit.total) }}"{{ start - limit.total < 0 ? ' disabled' }}>Prev</button>
<button class="button float-right contentarray-button pagination-button pagination-button-next" data-id="{{ id }}" data-start="{{ start + limit.total }}"{{ start + limit.total >= total ? ' disabled' }}>Next</button>
<div class="clearfix"></div>
</div>
{% endif %}
</div>
{% endblock %}
{% block javascript_footer %}
{% if total > limit.total and display.prevnext_buttons %}
{% if total > limit.total and display.pagination_buttons %}
{% do gantry.load('jquery') %}
<script>
(function ($) {
@@ -49,6 +49,15 @@ form:
pattern: '\d{1,2}'
overridable: false
article.display.pagination_buttons:
type: select.select
label: Pagination
description: Select if the pagination buttons should be shown to allow users to see more articles.
default: ''
options:
show: Show
'': Hide
article.limit.columns:
type: select.select
label: Number of columns
@@ -205,15 +214,6 @@ form:
label: Button CSS Classes
description: CSS class name for the 'Read More' button.
article.display.prevnext_buttons:
type: select.select
label: Prev/Next Buttons
description: Select if the Prev and Next buttons should be shown to allow users to see more articles.
default: ''
options:
show: Show
'': Hide
_tab_extras:
label: Extras
fields:
@@ -33,11 +33,6 @@
{% set total = posts.get_pagination([]).total %}
{% block particle %}
{% if total > limit.total and display.prevnext_buttons %}
<button class="button float-left contentarray-button" data-id="{{ id }}" data-start="{{ max(0, start - limit.total) }}"{{ start - limit.total < 0 ? ' disabled' }}>Prev</button>
<button class="button float-right contentarray-button" data-id="{{ id }}" data-start="{{ start + limit.total }}"{{ start + limit.total >= total ? ' disabled' }}>Next</button>
<div class="clearfix"></div>
{% endif %}
{# All Posts #}
<div class="g-content-array g-wordpress-posts{% if particle.css.class %} {{ particle.css.class }}{% endif %}" {% if particle.extra %}{{ attr_extra|raw }}{% endif %}>
@@ -148,12 +143,20 @@
{% endfor %}
</div>
{% endfor %}
{% if total > limit.total and display.pagination_buttons %}
<div class="g-content-array-pagination">
<button class="button float-left contentarray-button pagination-button pagination-button-prev" data-id="{{ id }}" data-start="{{ max(0, start - limit.total) }}"{{ start - limit.total < 0 ? ' disabled' }}>Prev</button>
<button class="button float-right contentarray-button pagination-button pagination-button-next" data-id="{{ id }}" data-start="{{ start + limit.total }}"{{ start + limit.total >= total ? ' disabled' }}>Next</button>
<div class="clearfix"></div>
</div>
{% endif %}
</div>
{% endblock %}
{% block javascript_footer %}
{% if total > limit.total and display.prevnext_buttons %}
{% if total > limit.total and display.pagination_buttons %}
{% do gantry.load('jquery') %}
<script>
(function ($) {
@@ -42,6 +42,15 @@ form:
pattern: '-?\d{1,2}'
overridable: false
post.display.pagination_buttons:
type: select.select
label: Pagination
description: Select if the pagination buttons should be shown to allow users to see more posts.
default: ''
options:
show: Show
'': Hide
post.limit.columns:
type: select.select
label: Number of columns
@@ -174,15 +183,6 @@ form:
label: Button CSS Classes
description: CSS class name for the 'Read More' button.
post.display.prevnext_buttons:
type: select.select
label: Prev/Next Buttons
description: Select if the Prev and Next buttons should be shown to allow users to see more posts.
default: ''
options:
show: Show
'': Hide
_tab_extras:
label: Extras
fields: