From 0f0a8bf61c07b5fd3dce3b7d6fa963807a2c89c7 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 30 Nov 2014 23:59:52 +0100 Subject: [PATCH] Pagination uses renderer that works with Zurb Foundation --- Gemfile | 2 ++ Gemfile.lock | 8 ++++++++ app/views/packages/_paginator.slim | 6 +++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index d4e4763..bb920bf 100644 --- a/Gemfile +++ b/Gemfile @@ -67,6 +67,8 @@ gem 'foundation-rails' # Pagination gem 'will_paginate' +#gem 'foundation-will_paginate', :github => 'acrogenesis/will_paginate-foundation' +gem 'will_paginate-foundation', :github => 'acrogenesis/will_paginate-foundation' # Lightbox image viewer for full-sized images gem 'fancybox2-rails', '~> 0.2.4' diff --git a/Gemfile.lock b/Gemfile.lock index 1a8a3ad..358b7ee 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,10 @@ +GIT + remote: git://github.com/acrogenesis/will_paginate-foundation.git + revision: a67a198423c61b07f0cf0c61faa9c5d7c4644fed + specs: + will_paginate-foundation (5.3.3) + will_paginate (>= 3.0.3) + GEM remote: https://rubygems.org/ specs: @@ -155,3 +162,4 @@ DEPENDENCIES slim-rails uglifier (>= 1.3.0) will_paginate + will_paginate-foundation! diff --git a/app/views/packages/_paginator.slim b/app/views/packages/_paginator.slim index 7b4778f..934febb 100644 --- a/app/views/packages/_paginator.slim +++ b/app/views/packages/_paginator.slim @@ -1,8 +1,8 @@ - if @packages.length>0 // Use different pagination navigators depending on the screen width div.show-for-large-up - =will_paginate @packages, :inner_window => 3 + =will_paginate @packages, renderer: FoundationPagination::Rails, :inner_window => 3 div.show-for-medium-only - =will_paginate @packages, :inner_window => 1 + =will_paginate @packages, renderer: FoundationPagination::Rails, :inner_window => 1 div.show-for-small-only - =will_paginate @packages, :page_links => false + =will_paginate @packages, renderer: FoundationPagination::Rails, :page_links => false