Sha256: 3cbf6ddbe9dc02c9b91ef1ff87a75087a37fce038c13485f32a995855e61316e
Contents?: true
Size: 938 Bytes
Versions: 9
Compression:
Stored size: 938 Bytes
Contents
<%# The container tag - available local variables current_page: a page object for the currently displayed page total_pages: total number of pages per_page: number of items to fetch per page remote: data-remote paginator: the paginator that renders the pagination tags inside -%> <nav class="pagination"> <%# We're hard coding the URLs with the assumption that the blog will be served at /blog %> <% if @tag %> <%= link_to "Newer", "/blog/tags/#{@tag.slug}?page=#{current_page - 1}", class: "newer" unless current_page.first? %> <%= link_to "Older", "/blog/tags/#{@tag.slug}?page=#{current_page + 1}", class: "older" unless current_page.last? %> <% else %> <%= link_to "Newer", "/blog?page=#{current_page - 1}", class: "newer" unless current_page.first? %> <%= link_to "Older", "/blog?page=#{current_page + 1}", class: "older" unless current_page.last? %> <% end %> </nav>
Version data entries
9 entries across 9 versions & 1 rubygems