debshots/app/views/packages/index-list.slim
Christoph Haas fb52ce44db 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.
2015-04-19 23:08:42 +02:00

44 lines
1.6 KiB
Text

// Paginator and search bar
.row
.small-6.medium-8.large-9.columns
// Paginator
= render 'packages/paginator'
.small-6.medium-4.large-3.columns
// Search form
= render 'packages/searchfield'
// Package list
.row
.small-9.medium-10.columns
- if @packages.length>0
- @packages.to_a.each do |pkg|
.row.listview
.small-12.medium-4.columns
a.black href=package_path(name: pkg.name)
.pkgname
=pkg.name
' >
- if pkg.screenshots.any?
// TODO: smarter search for the best screenshot instead of taking the first one
- screenshot = pkg.screenshots.first
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 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"
.small-12.medium-8.columns
= render partial: 'packages/list_details', locals: {pkg: pkg }
// Second paginator at the bottom so the user does not have to scroll up again
= render 'packages/paginator'
- else
= render 'packages/noresults'
// Icon sidebar for options and views
.small-3.medium-2.columns
= render 'packages/sidebar'