diff --git a/app/helpers/global_helpers.rb b/app/helpers/global_helpers.rb
index 8f00616..d070668 100644
--- a/app/helpers/global_helpers.rb
+++ b/app/helpers/global_helpers.rb
@@ -41,7 +41,7 @@ module Merb
def pagination(div_name, base_url)
@pagination_block = div_name
@base_pagination_url = base_url
- partial 'home/pagination_script'
+ partial 'home/pagination'
end
end
end
diff --git a/app/views/favorites/show.html.haml b/app/views/favorites/show.html.haml
index dbc1819..e294bee 100644
--- a/app/views/favorites/show.html.haml
+++ b/app/views/favorites/show.html.haml
@@ -1,8 +1,6 @@
%h1 Your favorite photos
-= pagination 'photo_browser', url(:favorites, :id => current_user.user_name)
-
-#browser_container.centered
- = partial 'home/pagination_navigation'
+#photo_browser_container
+ = pagination 'photo_browser', url(:favorites, :id => current_user.user_name)
#photo_browser
= partial 'photos/photo_browser'
diff --git a/app/views/home/_pagination_script.html.haml b/app/views/home/_pagination.html.haml
similarity index 52%
rename from app/views/home/_pagination_script.html.haml
rename to app/views/home/_pagination.html.haml
index 8565004..2413718 100644
--- a/app/views/home/_pagination_script.html.haml
+++ b/app/views/home/_pagination.html.haml
@@ -18,3 +18,15 @@
page = newpage;
new Ajax.Updater('#{@pagination_block}', '#{@base_pagination_url}#{@base_pagination_url =~ /\?/ ? '&' : '?'}page=' + page, { method: 'get', onComplete: function(){ new Effect.Appear($('inner_#{@pagination_block}')); }, onSuccess: function(){ $('pagenum').innerHTML = parseInt(page) + 1; } });
}
+
+#pagination_navigation
+ %p
+ %a{ :href => '#', :onclick => "scroll_box(0); return false;", :title => 'First page' }
+ %img{ :src => '/images/go-first.png' }
+ %a{ :href => '#', :onclick => "scroll_box(page - 1); return false;", :title => 'Previous page' }
+ %img{ :src => '/images/go-previous.png' }
+ == #{@page + 1} / #{@page_count}
+ %a{ :href => '#', :onclick => "scroll_box(page + 1); return false;", :title => 'Next page' }
+ %img{ :src => '/images/go-next.png' }
+ %a{ :href => '#', :onclick => "scroll_box(page_count - 1); return false;", :title => 'Next page' }
+ %img{ :src => '/images/go-last.png' }
\ No newline at end of file
diff --git a/app/views/home/_pagination_navigation.html.haml b/app/views/home/_pagination_navigation.html.haml
deleted file mode 100644
index cc07521..0000000
--- a/app/views/home/_pagination_navigation.html.haml
+++ /dev/null
@@ -1,11 +0,0 @@
-#pagination_navigation
- %p
- %a{ :href => '#', :onclick => "scroll_box(0); return false;", :title => 'First page' }
- %img{ :src => '/images/go-first.png' }
- %a{ :href => '#', :onclick => "scroll_box(page - 1); return false;", :title => 'Previous page' }
- %img{ :src => '/images/go-previous.png' }
- == #{@page + 1} / #{@page_count}
- %a{ :href => '#', :onclick => "scroll_box(page + 1); return false;", :title => 'Next page' }
- %img{ :src => '/images/go-next.png' }
- %a{ :href => '#', :onclick => "scroll_box(page_count - 1); return false;", :title => 'Next page' }
- %img{ :src => '/images/go-last.png' }
\ No newline at end of file
diff --git a/app/views/photos/index.html.haml b/app/views/photos/index.html.haml
index 561440d..9a2d92e 100644
--- a/app/views/photos/index.html.haml
+++ b/app/views/photos/index.html.haml
@@ -1,8 +1,6 @@
%h1 Photos of oneness
-= pagination 'photo_browser', url(:photos)
-
-#browser_container.centered
- = partial 'home/pagination_navigation'
+#photo_browser_container
+ = pagination 'photo_browser', url(:photos)
#photo_browser
= partial 'photos/photo_browser'
diff --git a/app/views/votes/show.html.haml b/app/views/votes/show.html.haml
index dbe4cfe..4a0800e 100644
--- a/app/views/votes/show.html.haml
+++ b/app/views/votes/show.html.haml
@@ -1,7 +1,5 @@
-= pagination 'scrolling_photo_block', url(:vote, :id => @user.user_name)
-
#scrolling_photo_block_container
- = partial 'home/pagination_navigation'
+ = pagination 'scrolling_photo_block', url(:vote, :id => @user.user_name)
#scrolling_photo_block
= partial 'votes/stats_for_user'