Fixed views to use Paperclip
This commit is contained in:
parent
165f6f166d
commit
351d42ccbb
2 changed files with 6 additions and 4 deletions
|
|
@ -20,8 +20,10 @@
|
|||
=pkg.name
|
||||
' >
|
||||
- if pkg.screenshots.any?
|
||||
a.black.fancybox title=pkg.screenshots.first.caption rel=pkg.id href=pkg.screenshots.first.url('large')
|
||||
img.screenshot src=pkg.screenshots.first.url('large')
|
||||
// TODO: smarter search for the beste screenshot instead of taking the first one
|
||||
- screenshot = pkg.screenshots.first
|
||||
a.black.fancybox title=screenshot.caption rel=pkg.id href=screenshot.image.url(:large, timestamp: false)
|
||||
= image_tag(screenshot.image.url(:large, timestamp: false), alt: screenshot.caption)
|
||||
- if pkg.screenshots.length > 1
|
||||
a.black href=package_path(name: pkg.name)
|
||||
.text-center More screenshots…
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ div.row
|
|||
// TODO: load actual newest upload and cache it
|
||||
// TODO: link to the package page
|
||||
a.black href=package_path(@newest_uploaded_package.name)
|
||||
img src=@newest_uploaded_package.screenshots[0].image_url('large')
|
||||
img src=@newest_uploaded_package.screenshots.first.image.url(:large, timestamp: false)
|
||||
p
|
||||
strong
|
||||
=@newest_uploaded_package.name
|
||||
|
|
@ -43,7 +43,7 @@ div.row
|
|||
// TODO: load actual most popular package and highest-rated screenshot and cache it
|
||||
// TODO: link to the package page
|
||||
a.black href=package_path(@most_popular_package.name)
|
||||
img src=@most_popular_package.screenshots[0].image_url('large')
|
||||
img src=@most_popular_package.screenshots.first.image.url(:large, timestamp: false)
|
||||
p
|
||||
strong
|
||||
=@most_popular_package.name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue