diff --git a/app/views/packages/_paginator.slim b/app/views/packages/_paginator.slim index a80d5af..0221016 100644 --- a/app/views/packages/_paginator.slim +++ b/app/views/packages/_paginator.slim @@ -1,8 +1,8 @@ -- if @packages.length>0 +- if items.length>0 // Use different pagination navigators depending on the screen width div.show-for-large - =will_paginate @packages, :renderer => FoundationPagination::Rails, :inner_window => 3 + =will_paginate items, :renderer => FoundationPagination::Rails, :inner_window => 3 div.show-for-medium-only - =will_paginate @packages, :renderer => FoundationPagination::Rails, :inner_window => 1 + =will_paginate items, :renderer => FoundationPagination::Rails, :inner_window => 1 div.show-for-small-only - =will_paginate @packages, :renderer => FoundationPagination::Rails, :page_links => false + =will_paginate items, :renderer => FoundationPagination::Rails, :page_links => false diff --git a/app/views/packages/details.slim b/app/views/packages/details.slim index 83a7444..259995b 100644 --- a/app/views/packages/details.slim +++ b/app/views/packages/details.slim @@ -15,6 +15,9 @@ - screenshots_visible_to_user(@package).each_with_index do |screenshot, idx| / Display the first screenshot as a large image - if idx==0 + / TODO: paginator at the top looks ugly. maybe more space? or put it into the box on the right? + = render(partial: 'packages/paginator', locals: {items: @screenshots}) + .small-12.medium-12.cell .margin-bottom-3 = render(partial:'medium_image', locals: {screenshot: screenshot}) @@ -32,6 +35,8 @@ - unless screenshot.approved | (but not public yet) + // Second paginator at the bottom so the user does not have to scroll up again + = render(partial: 'packages/paginator', locals: {items: @screenshots}) // Show detailed information about the screenshot object when in dev mode diff --git a/app/views/packages/list.slim b/app/views/packages/list.slim index 35c34b0..a2749c9 100644 --- a/app/views/packages/list.slim +++ b/app/views/packages/list.slim @@ -2,7 +2,7 @@ .grid-x .small-6.medium-8.large-9.cell // Paginator - = render 'packages/paginator' + = render(partial: 'packages/paginator', locals: {items: @packages}) .small-6.medium-4.large-3.cell // Search form @@ -35,7 +35,7 @@ = pkg.long_description_first_paragraph or 'Sorry - no description available.' // Second paginator at the bottom so the user does not have to scroll up again - = render 'packages/paginator' + = render(partial: 'packages/paginator', locals: {items: @packages}) - else = render 'packages/noresults'