denny/ShinyCMS

View on GitHub
root/includes/pager.tt

Summary

Maintainability
Test Coverage
[%- count_param = '&count=' _ c.request.param('count') IF c.request.param('count') -%]
<p>
    [%- UNLESS pager.current_page == pager.last_page %]
    <a href="/[% c.request.path %]?page=[% pager.current_page + 1 %][% count_param %]">&laquo; Older</a>
    [%- END %]
    [%- UNLESS pager.current_page == 1 %]
    <a class="right" href="/[% c.request.path %]?page=[% pager.current_page - 1 %][% count_param %]">Newer &raquo;</a>
    [%- END %]
</p>