From fb52ce44dbcfe80ad7424f8707e54c7f91607bb4 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 19 Apr 2015 23:08:42 +0200 Subject: [PATCH] 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. --- app/views/packages/index-list.slim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/packages/index-list.slim b/app/views/packages/index-list.slim index 1a4e4c8..3619c3a 100644 --- a/app/views/packages/index-list.slim +++ b/app/views/packages/index-list.slim @@ -20,13 +20,13 @@ =pkg.name ' > - 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 - 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) - if pkg.screenshots.length > 1 a.black href=package_path(name: pkg.name) - .text-center More screenshots… + .text-center and #{pluralize(pkg.screenshots.length-1, 'screenshot')} more… - else a href=upload_package_by_name_path(name: pkg.name) img.screenshot src="/images/dummy/no-screenshots-upload-one.svg"