debshots/app/views/packages/list.slim

45 lines
1.7 KiB
Text

// Paginator and search bar
.grid-x
.small-6.medium-8.large-9.cell
// Paginator
= render 'packages/paginator'
.small-6.medium-4.large-3.cell
// Search form
= render 'packages/searchfield'
// Package list
.grid-x.packagepage
.small-9.medium-10.cell
- if @packages.length>0
- @packages.to_a.each do |pkg|
.grid-x.listview
.small-12.medium-4.cell
- if pkg.screenshots_approved.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.variant("800x600", timestamp: false), alt: screenshot.caption)
/- if pkg.screenshots.length > 1
a.black href=package_path(name: pkg.name)
'and #{pluralize(pkg.screenshots.length-1, 'screenshot')} more…
- else
a href=package_path(name: pkg.name)
img.screenshot src="/images/dummy/no-screenshots-upload-one.svg" width="100%"
.small-12.medium-8.cell
h1
a href=package_path(name: pkg.name)
=pkg.name
.packagedetails
h2 =pkg.description
= pkg.long_description_first_paragraph or 'Sorry - no description available.'
// 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.cell
= render 'packages/sidebar'