From 279ffa4df1df6ebf111273e9b599ca5b18f2e57e Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Sun, 14 Jul 2013 23:45:11 -0400 Subject: [PATCH] pull pagination if randomizing --- views/browse.erb | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/views/browse.erb b/views/browse.erb index eea0e93d..27e6aeb5 100644 --- a/views/browse.erb +++ b/views/browse.erb @@ -49,19 +49,21 @@ <% end %> - <% if @page_count > 1 %> -
- <% if @current_page != 1 %> -   - <% end %> + <% if params[:sort_by] != 'random' %> + <% if @page_count > 1 %> +
+ <% if @current_page != 1 %> +   + <% end %> - <% 1.upto(@page_count) do |num| %> - "><%= num %>  - <% end %> + <% 1.upto(@page_count) do |num| %> + "><%= num %>  + <% end %> - <% if @current_page != @page_count %> - - <% end %> -
+ <% if @current_page != @page_count %> + + <% end %> +
+ <% end %> <% end %> \ No newline at end of file