Pagination fixed

This commit is contained in:
Christoph Haas 2020-11-01 23:26:04 +01:00
parent 3ad1dc605b
commit 6ddf9ff48c
2 changed files with 10 additions and 25 deletions

View file

@ -17,24 +17,16 @@
.grid-x.grid-margin-y.grid-margin-x.align-middle
- @screenshots.each_with_index do |screenshot, idx|
/ Display the first screenshot as a large image (on the first page only)
- if idx==0 && @page.to_i<2
.small-12.medium-12.cell
.margin-bottom-3
= render(partial:'medium_image', locals: {screenshot: screenshot})
.small-12.medium-6.cell
.margin-bottom-3
= render(partial:'small_image', locals: {screenshot: screenshot})
/ Display further screenshots as smaller images
- else
.small-12.medium-6.cell
.margin-bottom-3
= render(partial:'medium_image', locals: {screenshot: screenshot})
// Has the unmoderated screenshot been uploaded by the current user?
- if screenshot_uploaded_by_current_user?(screenshot)
span.label.warning
| Uploaded by you
- unless screenshot.approved
| (but not public yet)
// Has the unmoderated screenshot been uploaded by the current user?
- if screenshot_uploaded_by_current_user?(screenshot)
span.label.warning
| Uploaded by you
- unless screenshot.approved
| (but not moderated yet)
// Second paginator at the bottom so the user does not have to scroll up again
= render(partial: 'packages/paginator', locals: {items: @screenshots})