<div class="pull-left">
  <% if total_pages > 1 %>
    <nav>
      <ul class="pagination">
        <% unless pages.first == 1 && current_page == pages.first %>
          <li><%= link_to "First", params.merge(page: 1) %></li>
          <li><%= link_to "«", params.merge(page: current_page - 1) %></li>
        <% end %>
        <% unless pages.first == 1 %>
          <li><a href="#">...</a></li>
        <% end %>
        <% pages.each do |page| %>
          <li class="<%= "active" if page == current_page %>">
            <%= link_to page, params.merge(page: page) %>
          </li>
        <% end %>
        <% unless pages.last == total_pages %>
          <li><a href="#">...</a></li>
        <% end %>
        <% unless pages.last == total_pages && current_page == pages.last %>
          <li><%= link_to "»", params.merge(page: current_page + 1) %></li>
          <li><%= link_to "Last", params.merge(page: total_pages) %></li>
        <% end %>
      </ul>
    </nav>
  <% end %>
</div>
<div class="pull-right">
  <%#= page_entries_info @resources %>
</div>

<div class="pull-left">
  <% if total_pages > 1 %>
    <nav>
      <ul class="pagination">
        <% unless pages.first == 1 && current_page == pages.first %>
          <li><%= link_to "First", params.merge(page: 1) %></li>
          <li><%= link_to "«", params.merge(page: current_page - 1) %></li>
        <% end %>
        <% unless pages.first == 1 %>
          <li class="disabled"><%= link_to "…" %></li>
        <% end %>
        <% pages.each do |page| %>
          <li class="<%= "active" if page == current_page %>">
            <%= link_to page, params.merge(page: page) %>
          </li>
        <% end %>
        <% unless pages.last == total_pages %>
          <li class="disabled"><%= link_to "…" %></li>
        <% end %>
        <% unless pages.last == total_pages && current_page == pages.last %>
          <li><%= link_to "»", params.merge(page: current_page + 1) %></li>
          <li><%= link_to "Last", params.merge(page: total_pages) %></li>
        <% end %>
      </ul>
    </nav>
  <% end %>
</div>
<div class="pull-right">
  <%#= page_entries_info @resources %>
</div>

Use disabled ellipsis for gaps
Use disabled ellipsis for gaps
