Linking to package details page from list view.

Previously a Fancybox zoomed into the images. Now the link is more
consistent and leads to the package's detail package.
This commit is contained in:
Christoph Haas 2015-04-19 23:08:42 +02:00
parent 57b5df0a1c
commit fb52ce44db

View file

@ -20,13 +20,13 @@
=pkg.name =pkg.name
' > ' >
- if pkg.screenshots.any? - if pkg.screenshots.any?
// TODO: smarter search for the beste screenshot instead of taking the first one // TODO: smarter search for the best screenshot instead of taking the first one
- screenshot = pkg.screenshots.first - screenshot = pkg.screenshots.first
a.black.fancybox title=screenshot.caption rel=pkg.id href=screenshot.image.url(:large, timestamp: false) a.black title=screenshot.caption href=package_path(name: pkg.name)
= image_tag(screenshot.image.url(:large, timestamp: false), alt: screenshot.caption) = image_tag(screenshot.image.url(:large, timestamp: false), alt: screenshot.caption)
- if pkg.screenshots.length > 1 - if pkg.screenshots.length > 1
a.black href=package_path(name: pkg.name) a.black href=package_path(name: pkg.name)
.text-center More screenshots .text-center and #{pluralize(pkg.screenshots.length-1, 'screenshot')} more
- else - else
a href=upload_package_by_name_path(name: pkg.name) a href=upload_package_by_name_path(name: pkg.name)
img.screenshot src="/images/dummy/no-screenshots-upload-one.svg" img.screenshot src="/images/dummy/no-screenshots-upload-one.svg"