Properly show screenshots visible to the user
This commit is contained in:
parent
427cdf87d7
commit
7788025cf7
1 changed files with 1 additions and 21 deletions
|
|
@ -1,27 +1,7 @@
|
|||
// TODO: Handle packages with multiple screenshots
|
||||
a.black href=package_path(name: pkg.name)
|
||||
/ div.grid-thumbnail
|
||||
/ - if pkg.screenshots_approved.any?
|
||||
/ // TODO: smarter selection of the most useful screenshot instead of taking the first one
|
||||
/ - screenshot = pkg.screenshots.first
|
||||
/ = small_img(screenshot)
|
||||
/ - else
|
||||
/ img.screenshot.thumbnail src="/images/dummy/no-screenshots-upload-one.svg"
|
||||
/ div
|
||||
/ .pkgname
|
||||
/ = pkg.name
|
||||
/ .pkgdescription
|
||||
/ = pkg.description
|
||||
|
||||
.image
|
||||
= small_img(pkg.screenshots_approved.first, cls: '')
|
||||
= small_img(screenshots_visible_to_user(pkg, session).first, cls: '')
|
||||
.text.pkgname
|
||||
= pkg.name
|
||||
.text
|
||||
= pkg.description
|
||||
|
||||
/ .card.callout
|
||||
/ .card-divider = pkg.name
|
||||
/ = small_img(pkg.screenshots.first, cls: 'float-center')
|
||||
/ .card-section
|
||||
/ = pkg.description
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue