Info box on details page refactored into a partial
This commit is contained in:
parent
140756c17f
commit
af578f6622
2 changed files with 46 additions and 43 deletions
45
app/views/packages/_details_rightbox.slim
Normal file
45
app/views/packages/_details_rightbox.slim
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
// Right-side panel on details page to display further information
|
||||
// about a package.
|
||||
.bigpanel
|
||||
// long description
|
||||
p.subtitle
|
||||
= fa_icon 'info-circle'
|
||||
' Description
|
||||
- if pkg.long_description.present?
|
||||
= render(partial: 'long_description', locals: {text: pkg.long_description})
|
||||
- else
|
||||
p Sorry - no more information available.
|
||||
|
||||
hr
|
||||
|
||||
// upload new screenshots
|
||||
p.subtitle
|
||||
a.expand data-open="upload-modal"
|
||||
= fa_icon 'upload'
|
||||
' Upload more screenshots
|
||||
p
|
||||
' Please help extend the collection of screenshots.
|
||||
' Just make a screenshot and upload it here. You don't
|
||||
' need to register or anything.
|
||||
|
||||
// homepage
|
||||
- if pkg.homepage.present?
|
||||
hr
|
||||
p.subtitle
|
||||
= fa_icon 'home'
|
||||
' Homepage
|
||||
p
|
||||
= link_to pkg.homepage, pkg.homepage, target: '_blank'
|
||||
|
||||
// statistics
|
||||
hr
|
||||
p.subtitle
|
||||
= fa_icon 'bar-chart'
|
||||
' Statistics
|
||||
p
|
||||
' #{pkg.visits} other people were interested in this package here.
|
||||
' The newest known version of this software is #{pkg.version}
|
||||
- if pkg.updated_at
|
||||
' (Information last updated #{time_ago_in_words(pkg.updated_at)} ago.)
|
||||
// show which distributions have this package available
|
||||
|
||||
|
|
@ -56,49 +56,7 @@
|
|||
// = partial '/package/comments'
|
||||
|
||||
.small-5.medium-5.columns
|
||||
.bigpanel
|
||||
// long description
|
||||
p.subtitle
|
||||
= fa_icon 'info-circle'
|
||||
' Description
|
||||
- if @package.long_description.present?
|
||||
= render(partial: 'long_description', locals: {text: @package.long_description})
|
||||
- else
|
||||
p Sorry - no more information available.
|
||||
|
||||
hr
|
||||
|
||||
// upload new screenshots
|
||||
p.subtitle
|
||||
a.expand data-open="upload-modal"
|
||||
= fa_icon 'upload'
|
||||
' Upload more screenshots
|
||||
p
|
||||
' Please help extend the collection of screenshots.
|
||||
' Just make a screenshot and upload it here. You don't
|
||||
' need to register or anything.
|
||||
|
||||
// homepage
|
||||
- if @package.homepage.present?
|
||||
hr
|
||||
p.subtitle
|
||||
= fa_icon 'home'
|
||||
' Homepage
|
||||
p
|
||||
= link_to @package.homepage, @package.homepage, target: '_blank'
|
||||
|
||||
// statistics
|
||||
hr
|
||||
p.subtitle
|
||||
= fa_icon 'bar-chart'
|
||||
' Statistics
|
||||
p
|
||||
' #{@package.visits} other people were interested in this package here.
|
||||
' The newest known version of this software is #{@package.version}
|
||||
- if @package.updated_at
|
||||
' (Information last updated #{time_ago_in_words(@package.updated_at)} ago.)
|
||||
// show which distributions have this package available
|
||||
|
||||
= render(partial: 'details_rightbox', locals: {pkg: @package})
|
||||
// Modal upload window
|
||||
#upload-modal.reveal data-reveal=true role='dialog'
|
||||
h1 Upload new screenshots
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue