diff --git a/app/views/packages/_details_rightbox.slim b/app/views/packages/_details_rightbox.slim new file mode 100644 index 0000000..a58325d --- /dev/null +++ b/app/views/packages/_details_rightbox.slim @@ -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 + diff --git a/app/views/packages/details.slim b/app/views/packages/details.slim index 5326497..9b909bb 100644 --- a/app/views/packages/details.slim +++ b/app/views/packages/details.slim @@ -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