Show placeholder image if a package has no screenshots.
This commit is contained in:
parent
b421b9e0f6
commit
96f3de0223
1 changed files with 14 additions and 13 deletions
|
|
@ -11,19 +11,20 @@
|
|||
|
||||
.small-7.medium-7.columns
|
||||
p.subtitle = @package.description
|
||||
|
||||
- @package.screenshots.each do |screenshot|
|
||||
.row.listview
|
||||
.small-12.columns
|
||||
a.black.fancybox href=screenshot.image.url(:large, timestamp: false) rel='fancybox-thumb' title=screenshot.caption
|
||||
= image_tag(screenshot.image.url(:large, timestamp: false), alt: screenshot.caption)
|
||||
.imgcaption =screenshot.caption
|
||||
// TODO: Enable button only if admin or uploader
|
||||
a.button.tiny.alert[
|
||||
href=delete_screenshot_path(@package.name, screenshot.id)
|
||||
onclick="return confirm('Really delete the screenshot?');"
|
||||
] Delete screenshot
|
||||
|
||||
- if @package.screenshots.count > 0
|
||||
- @package.screenshots.each do |screenshot|
|
||||
.row.listview
|
||||
.small-12.columns
|
||||
a.black.fancybox href=screenshot.image.url(:large, timestamp: false) rel='fancybox-thumb' title=screenshot.caption
|
||||
= image_tag(screenshot.image.url(:large, timestamp: false), alt: screenshot.caption)
|
||||
.imgcaption =screenshot.caption
|
||||
// TODO: Enable button only if admin or uploader
|
||||
a.button.tiny.alert[
|
||||
href=delete_screenshot_path(@package.name, screenshot.id)
|
||||
onclick="return confirm('Really delete the screenshot?');"
|
||||
] Delete screenshot
|
||||
- else
|
||||
img src='/images/dummy/no-screenshots-upload-one.svg' width='100%'
|
||||
|
||||
// TODO: Enable comments in a later version
|
||||
// = partial '/package/comments'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue