Fixed views to use Paperclip

This commit is contained in:
Christoph Haas 2015-01-12 00:18:57 +01:00
parent 165f6f166d
commit 351d42ccbb
2 changed files with 6 additions and 4 deletions

View file

@ -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…