szurubooru/client/html/manual_pager_nav.tpl

40 lines
1.4 KiB
Smarty
Raw Normal View History

2016-06-05 21:46:57 +02:00
<nav class='buttons'>
2016-04-10 22:13:01 +02:00
<ul>
<li>
2017-02-09 00:48:06 +01:00
<% if (ctx.prevPage !== ctx.currentPage) { %>
<a rel='prev' class='prev' href='<%- ctx.getClientUrlForPage(ctx.pages.get(ctx.prevPage).offset, ctx.pages.get(ctx.prevPage).limit) %>'>
<% } else { %>
<a rel='prev' class='prev disabled'>
<% } %>
2016-04-10 22:13:01 +02:00
<i class='fa fa-chevron-left'></i>
<span class='vim-nav-hint'>&lt; Previous page</span>
2016-04-10 22:13:01 +02:00
</a>
</li>
2017-02-09 00:48:06 +01:00
<% for (let page of ctx.pages.values()) { %>
<% if (page.ellipsis) { %>
2016-04-10 22:13:01 +02:00
<li>&hellip;</li>
<% } else { %>
<% if (page.active) { %>
2016-04-10 22:13:01 +02:00
<li class='active'>
<% } else { %>
2016-04-10 22:13:01 +02:00
<li>
<% } %>
2017-02-09 00:48:06 +01:00
<a href='<%- ctx.getClientUrlForPage(page.offset, page.limit) %>'><%- page.number %></a>
2016-04-10 22:13:01 +02:00
</li>
<% } %>
<% } %>
2016-04-10 22:13:01 +02:00
<li>
2017-02-09 00:48:06 +01:00
<% if (ctx.nextPage !== ctx.currentPage) { %>
<a rel='next' class='next' href='<%- ctx.getClientUrlForPage(ctx.pages.get(ctx.nextPage).offset, ctx.pages.get(ctx.nextPage).limit) %>'>
<% } else { %>
<a rel='next' class='next disabled'>
<% } %>
2016-04-10 22:13:01 +02:00
<i class='fa fa-chevron-right'></i>
<span class='vim-nav-hint'>Next page &gt;</span>
2016-04-10 22:13:01 +02:00
</a>
</li>
</ul>
</nav>