master
 1<%# The container tag
 2  - available local variables
 3    current_page:  a page object for the currently displayed page
 4    num_pages:     total number of pages
 5    per_page:      number of items to fetch per page
 6    remote:        data-remote
 7    paginator:     the paginator that renders the pagination tags inside
 8-%>
 9<%= paginator.render do -%>
10  <nav>
11    <ul class="pagination justify-content-center">
12    <%= first_page_tag unless current_page.first? %>
13    <%= prev_page_tag unless current_page.first? %>
14    <% each_page do |page| -%>
15      <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
16        <%= page_tag page %>
17      <% elsif !page.was_truncated? -%>
18        <%= gap_tag %>
19      <% end -%>
20    <% end -%>
21    <%= next_page_tag unless current_page.last? %>
22    <%= last_page_tag unless current_page.last? %>
23    </ul>
24  </nav>
25<% end -%>