Skip to content

Commit

Permalink
fix some jinja bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
defrex committed Jun 23, 2014
1 parent 2cc5fe8 commit 0e8bf8f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bootstrap_paginator/templates/bootstrap_paginator/macros.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
{% endif %}

{% set end_page = page.number + ADJACENT_PAGES %}
{% if end_page > page.paginator.num_pages %}
{% set end_page = page.paginator.num_pages %}
{% if end_page > page.paginator.num_pages + 1 %}
{% set end_page = page.paginator.num_pages + 1 %}
{% endif %}

<ul class="pagination pagination-centered pagination-sm">

{% if page.has_previous %}
<li><a href="{{ urlencode_plus(get_args, page=page.previous_page_number) }}">&laquo;</a></li>
{% if page.has_previous() %}
<li><a href="{{ urlencode_plus(get_args, page=page.previous_page_number()) }}">&laquo;</a></li>
{% endif %}

{% if start_page > 1 %}
Expand All @@ -43,8 +43,8 @@
</a></li>
{% endif %}

{% if page.has_next %}
<li><a href="{{ urlencode_plus(get_args, page=page.next_page_number) }}">&raquo;</a></li>
{% if page.has_next() %}
<li><a href="{{ urlencode_plus(get_args, page=page.next_page_number()) }}">&raquo;</a></li>
{% endif %}

</ul>
Expand Down

0 comments on commit 0e8bf8f

Please sign in to comment.