Paginator can handle both screenshots and packages now

This commit is contained in:
Christoph Haas 2020-10-25 02:20:49 +02:00
parent 109354dbf6
commit f323f94582
3 changed files with 11 additions and 6 deletions

View file

@ -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