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
|
.small-7.medium-7.columns
|
||||||
p.subtitle = @package.description
|
p.subtitle = @package.description
|
||||||
|
- if @package.screenshots.count > 0
|
||||||
- @package.screenshots.each do |screenshot|
|
- @package.screenshots.each do |screenshot|
|
||||||
.row.listview
|
.row.listview
|
||||||
.small-12.columns
|
.small-12.columns
|
||||||
a.black.fancybox href=screenshot.image.url(:large, timestamp: false) rel='fancybox-thumb' title=screenshot.caption
|
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)
|
= image_tag(screenshot.image.url(:large, timestamp: false), alt: screenshot.caption)
|
||||||
.imgcaption =screenshot.caption
|
.imgcaption =screenshot.caption
|
||||||
// TODO: Enable button only if admin or uploader
|
// TODO: Enable button only if admin or uploader
|
||||||
a.button.tiny.alert[
|
a.button.tiny.alert[
|
||||||
href=delete_screenshot_path(@package.name, screenshot.id)
|
href=delete_screenshot_path(@package.name, screenshot.id)
|
||||||
onclick="return confirm('Really delete the screenshot?');"
|
onclick="return confirm('Really delete the screenshot?');"
|
||||||
] Delete screenshot
|
] Delete screenshot
|
||||||
|
- else
|
||||||
|
img src='/images/dummy/no-screenshots-upload-one.svg' width='100%'
|
||||||
|
|
||||||
// TODO: Enable comments in a later version
|
// TODO: Enable comments in a later version
|
||||||
// = partial '/package/comments'
|
// = partial '/package/comments'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue