Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added theme for Zurb Foundation #14

Merged
merged 1 commit into from
@dmitry-ilyashevich

Works well with Foundation 4. Thanks! :+1:

@jbhannah jbhannah referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@jbhannah

+1 for this working well. I can supply Slim templates to add in once this is merged.

@sylvanknave

Works great!

@robotmay

Also confirmed it works nicely :+1:

@timscott timscott referenced this pull request in amatsuda/kaminari
Closed

Allow specifying the repository for views generator #398

@eduardomartines

thanks! works fine!

@zeroed

Thank you so much!

@equivalent

will this one be added ?

@seuros
Collaborator

:+1:

@1st8

Would be nice to see this merged :+1:

@DaniG2k

Is there a theme for Foundation 5 yet by any chance?

@1st8

The templates from the commit attached to this pull request are working nicely for me with Foundation 5:
linojon@cc5a5bc

I didn't notice any changes to Foundation that would require any change on the templates, or did I miss something?

@seuros
Collaborator

The pagination styles didn't change between Foundation 4 and 5

@pwnall

:+1: works for me on Rails 4.1.5 with Foundation 5.4.3

@amatsuda
Owner

Thank you @linojon, and sorry for ignoring this one for such a long time.
We finally decided to merge this, and let this repo be active again.
Also thank you everyone who've been involved here for patiently waiting :heart:

@amatsuda amatsuda merged commit ef9f76a into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 21, 2013
  1. @linojon
This page is out of date. Refresh to see the latest.
View
2  foundation/DESCRIPTION
@@ -0,0 +1,2 @@
+Pagination for Zurb Foundation
+http://foundation.zurb.com
View
3  foundation/app/views/kaminari/_first_page.html.erb
@@ -0,0 +1,3 @@
+<li>
+ <%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote %>
+</li>
View
2  foundation/app/views/kaminari/_first_page.html.haml
@@ -0,0 +1,2 @@
+%li
+ = link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote
View
3  foundation/app/views/kaminari/_gap.html.erb
@@ -0,0 +1,3 @@
+<li class="unavailable">
+ <%= link_to raw(t 'views.pagination.truncate'), '#' %>
+</li>
View
2  foundation/app/views/kaminari/_gap.html.haml
@@ -0,0 +1,2 @@
+%li.unavailable
+ = link_to raw(t 'views.pagination.truncate'), '#'
View
3  foundation/app/views/kaminari/_last_page.html.erb
@@ -0,0 +1,3 @@
+<li>
+ <%= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} %>
+</li>
View
2  foundation/app/views/kaminari/_last_page.html.haml
@@ -0,0 +1,2 @@
+%li
+ = link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote}
View
3  foundation/app/views/kaminari/_next_page.html.erb
@@ -0,0 +1,3 @@
+<li>
+ <%= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote %>
+</li>
View
2  foundation/app/views/kaminari/_next_page.html.haml
@@ -0,0 +1,2 @@
+%li
+ = link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote
View
3  foundation/app/views/kaminari/_page.html.erb
@@ -0,0 +1,3 @@
+<li class="<%= 'current' if page.current? %>">
+ <%= link_to page, page.current? ? '#' : url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
+</li>
View
2  foundation/app/views/kaminari/_page.html.haml
@@ -0,0 +1,2 @@
+%li{class: "#{'current' if page.current?}"}
+ = link_to page, page.current? ? '#' : url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}
View
17 foundation/app/views/kaminari/_paginator.html.erb
@@ -0,0 +1,17 @@
+<%= paginator.render do -%>
+ <div class="pagination-centered">
+ <ul class="pagination">
+ <%= first_page_tag unless current_page.first? %>
+ <%= prev_page_tag unless current_page.first? %>
+ <% each_page do |page| -%>
+ <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
+ <%= page_tag page %>
+ <% elsif !page.was_truncated? -%>
+ <%= gap_tag %>
+ <% end -%>
+ <% end -%>
+ <%= next_page_tag unless current_page.last? %>
+ <%= last_page_tag unless current_page.last? %>
+ </ul>
+ </div>
+<% end -%>
View
12 foundation/app/views/kaminari/_paginator.html.haml
@@ -0,0 +1,12 @@
+= paginator.render do
+ .pagination-centered
+ %ul.pagination
+ = first_page_tag unless current_page.first?
+ = prev_page_tag unless current_page.first?
+ - each_page do |page|
+ - if page.left_outer? || page.right_outer? || page.inside_window?
+ = page_tag page
+ - elsif !page.was_truncated?
+ = gap_tag
+ = next_page_tag unless current_page.last?
+ = last_page_tag unless current_page.last?
View
3  foundation/app/views/kaminari/_prev_page.html.erb
@@ -0,0 +1,3 @@
+<li>
+ <%= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote %>
+</li>
View
2  foundation/app/views/kaminari/_prev_page.html.haml
@@ -0,0 +1,2 @@
+%li
+ = link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote
Something went wrong with that request. Please try again.