Dealing with empty/nil version/description fields properly.
This commit is contained in:
parent
197c0a8b10
commit
7914d09676
2 changed files with 10 additions and 19 deletions
|
|
@ -11,7 +11,11 @@
|
|||
.text-center
|
||||
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
|
||||
- if screenshot.description
|
||||
.imgcaption =screenshot.description
|
||||
- if screenshot.version.present?
|
||||
em.imgcaption
|
||||
'(from version #{screenshot.version})
|
||||
- if user_signed_in?
|
||||
em.imgcaption =screenshot.adminstatus
|
||||
|
||||
|
|
@ -36,15 +40,18 @@
|
|||
.bigpanel
|
||||
p.subtitle Description
|
||||
// TODO: split long_description by <p> tags
|
||||
- if @package.long_description
|
||||
- if @package.long_description.present?
|
||||
p =@package.long_description
|
||||
- else
|
||||
p Sorry - no more information available.
|
||||
- if @package.homepage
|
||||
- if @package.homepage.present?
|
||||
hr
|
||||
p.subtitle Homepage
|
||||
p
|
||||
= link_to @package.homepage, @package.homepage, target: '_blank'
|
||||
/ hr
|
||||
/ p.subtitle Newest known version
|
||||
/ p =@package.version
|
||||
|
||||
a.button.round.expand data-open="upload-modal" Upload more screenshots for #{@package.name}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue