Mostly fixed the packages list, grid and detail views
This commit is contained in:
parent
43a8ea9dd3
commit
1c59a5ac74
7 changed files with 206 additions and 1 deletions
48
app/views/packages/index-list.slim
Normal file
48
app/views/packages/index-list.slim
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
// 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
|
||||
= form_tag packages_path, :method=>'GET'
|
||||
= text_field_tag(:search, params[:search], placeholder: "Search...")
|
||||
|
||||
// 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?
|
||||
a.black.fancybox title=pkg.screenshots.first.caption rel='fancybox-group' href=pkg.screenshots.first.url('large')
|
||||
img.screenshot src=pkg.screenshots.first.url('large')
|
||||
- if pkg.screenshots.length > 1
|
||||
.text-center More screenshots
|
||||
- else
|
||||
a href=upload_package_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
|
||||
div.panel.callout.radius
|
||||
' Sorry. I couldn't find any software package like that.
|
||||
' Would you like to view
|
||||
'
|
||||
a href=url(:package, :index) all packages
|
||||
'
|
||||
' instead?
|
||||
|
||||
// Icon sidebar for options and views
|
||||
.small-3.medium-2.columns
|
||||
= render 'packages/sidebar'
|
||||
Loading…
Add table
Add a link
Reference in a new issue