Use bootstrap's pager (instead of pagination) class

This commit is contained in:
Eelco Dolstra 2013-04-26 14:44:43 +02:00
parent 67ed2da50d
commit bbc3e25d5a
3 changed files with 9 additions and 11 deletions

View file

@ -6,7 +6,7 @@
<p>Showing builds [% (page - 1) * resultsPerPage + 1 %] - [% (page - 1) * resultsPerPage + builds.size %] out of [% total %] in order of descending timestamp.</p> <p>Showing builds [% (page - 1) * resultsPerPage + 1 %] - [% (page - 1) * resultsPerPage + builds.size %] out of [% total %] in order of descending timestamp.</p>
[% INCLUDE renderPager %]
[% INCLUDE renderBuildList hideProjectName=project hideJobsetName=jobset hideJobName=job %] [% INCLUDE renderBuildList hideProjectName=project hideJobsetName=jobset hideJobName=job %]
[% INCLUDE renderPager %]
[% END %] [% END %]

View file

@ -385,14 +385,12 @@ BLOCK renderInputDiff; %]
BLOCK renderPager %] BLOCK renderPager %]
<div class="pagination"> <ul class="pager">
<ul> <li [% IF page == 1 %]class="disabled"[% END %]><a href="[% "$baseUri?page=1" %]">&laquo; First</a></li>
<li><a href="[% "$baseUri?page=1" %]">First</a></li> <li [% IF page == 1 %]class="disabled"[% END %]><a href="[% "$baseUri?page="; (page - 1) %]">&lsaquo; Previous</a></li>
<li [% IF page == 1 %]class="disabled"[% END %]><a href="[% "$baseUri?page="; (page - 1) %]">Previous</a></li> <li [% IF page * resultsPerPage >= total %]class="disabled"[% END %]><a href="[% "$baseUri?page="; (page + 1) %]">Next &rsaquo;</a></li>
<li [% IF page * resultsPerPage >= total %]class="disabled"[% END %]><a href="[% "$baseUri?page="; (page + 1) %]">Next</a></li> <li [% IF page * resultsPerPage >= total %]class="disabled"[% END %]><a href="[% "$baseUri?page="; (total - 1) div resultsPerPage + 1 %]">Last &raquo;</a></li>
<li><a href="[% "$baseUri?page="; (total - 1) div resultsPerPage + 1 %]">Last</a></li> </ul>
</ul>
</div>
[% END; [% END;

View file

@ -7,8 +7,8 @@
<p>Showing evaluations [% (page - 1) * resultsPerPage + 1 %] - [% <p>Showing evaluations [% (page - 1) * resultsPerPage + 1 %] - [%
(page - 1) * resultsPerPage + evals.size %] out of [% total %].</p> (page - 1) * resultsPerPage + evals.size %] out of [% total %].</p>
[% INCLUDE renderPager %]
[% INCLUDE renderEvals %] [% INCLUDE renderEvals %]
[% INCLUDE renderPager %]
[% END %] [% END %]