Commit 762e74f8
Changed files (7)
app/views/kaminari/_first_page.html.erb
@@ -6,6 +6,8 @@
per_page: number of items to fetch per page
remote: data-remote
-%>
-<span class="first">
+<% unless current_page.first? %>
+<li class="first">
<%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote %>
-</span>
+</li>
+<% end %>
app/views/kaminari/_gap.html.erb
@@ -5,4 +5,4 @@
per_page: number of items to fetch per page
remote: data-remote
-%>
-<span class="page gap"><%= raw(t 'views.pagination.truncate') %></span>
+<li class="page gap disabled"><a href="#" onclick="return false;"><%= raw(t 'views.pagination.truncate') %></a></li>
app/views/kaminari/_last_page.html.erb
@@ -6,6 +6,8 @@
per_page: number of items to fetch per page
remote: data-remote
-%>
-<span class="last">
+<% unless current_page.last? %>
+<li class="last next"><%# "next" class present for border styling in twitter bootstrap %>
<%= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} %>
-</span>
+</li>
+<% end %>
app/views/kaminari/_next_page.html.erb
@@ -6,6 +6,8 @@
per_page: number of items to fetch per page
remote: data-remote
-%>
-<span class="next">
+<% unless current_page.last? %>
+<li class="next_page">
<%= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote %>
-</span>
+</li>
+<% end %>
app/views/kaminari/_page.html.erb
@@ -7,6 +7,6 @@
per_page: number of items to fetch per page
remote: data-remote
-%>
-<span class="page<%= ' current' if page.current? %>">
- <%= link_to_unless page.current?, page, url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
-</span>
+<li class="page<%= ' active' if page.current? %>">
+ <%= link_to page, url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
+</li>
app/views/kaminari/_paginator.html.erb
@@ -7,7 +7,8 @@
paginator: the paginator that renders the pagination tags inside
-%>
<%= paginator.render do -%>
- <nav class="pagination">
+ <div class="pagination">
+ <ul>
<%= first_page_tag unless current_page.first? %>
<%= prev_page_tag unless current_page.first? %>
<% each_page do |page| -%>
@@ -19,18 +20,6 @@
<% end -%>
<%= next_page_tag unless current_page.last? %>
<%= last_page_tag unless current_page.last? %>
- </nav>
+ </ul>
+ </div>
<% end -%>
-
-
- <div class="pagination">
- <ul>
- <li class="prev disabled"><a href="#">← Previous</a></li>
- <li class="active"><a href="#">1</a></li>
- <li><a href="#">2</a></li>
- <li><a href="#">3</a></li>
- <li><a href="#">4</a></li>
- <li><a href="#">5</a></li>
- <li class="next"><a href="#">Next →</a></li>
- </ul>
- </div>
app/views/kaminari/_prev_page.html.erb
@@ -6,6 +6,8 @@
per_page: number of items to fetch per page
remote: data-remote
-%>
-<span class="prev">
+<% unless current_page.first? %>
+<li class="prev">
<%= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote %>
-</span>
+</li>
+<% end %>