Created
January 5, 2012 04:41
-
-
Save sotarok/1563748 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# | |
# ref: PaginatorBudnel:Pagination:sliding.html.twig | |
# with twitter bootstrap | |
#} | |
{% if pageCount > 1 %} | |
<div class="pagination"> | |
<ul> | |
{% if first is defined and current != first %} | |
<li class="prev"> | |
<a href="{{ path(route, query|merge({'page': first})) }}"><<</a> | |
</li> | |
{% else %} | |
<li class="prev disabled"><a href="{{ path(route, query|merge({'page': first})) }}"><<</a></li> | |
{% endif %} | |
{% if previous is defined %} | |
<li class="prev"> | |
<a href="{{ path(route, query|merge({'page': previous})) }}"><</a> | |
</li> | |
{% endif %} | |
{% for page in pagesInRange %} | |
<li {% if page == current %}class="active"{% endif %}><a href="{{ path(route, query|merge({'page': page})) }}"> {{ page }} </a></li> | |
{% endfor %} | |
{% if next is defined %} | |
<li class="next"> | |
<a href="{{ path(route, query|merge({'page': next})) }}">></a> | |
</li> | |
{% endif %} | |
{% if last is defined and current != last %} | |
<li class="next"> | |
<a href="{{ path(route, query|merge({'page': last})) }}">>></a> | |
</li> | |
{% else %} | |
<li class="next disabled"> | |
<a href="{{ path(route, query|merge({'page': last})) }}">>></a> | |
</li> | |
{% endif %} | |
</ul> | |
</div> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment