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
35
app/views/packages/index-grid.slim
Normal file
35
app/views/packages/index-grid.slim
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
// 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...")
|
||||
|
||||
// Grid view
|
||||
.row
|
||||
.small-9.large-10.columns
|
||||
ul.small-block-grid-1.medium-block-grid-3.large-block-grid-4
|
||||
- if @packages.length>0
|
||||
- @packages.all.each do |pkg|
|
||||
li.thumbnail
|
||||
= render partial: 'packages/grid_thumbnail', locals: { pkg: pkg }
|
||||
|
||||
- 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?
|
||||
|
||||
// Paginator
|
||||
= render '/packages/paginator'
|
||||
|
||||
// Icon sidebar for options and views
|
||||
.small-3.large-2.columns
|
||||
= render 'packages/sidebar'
|
||||
Loading…
Add table
Add a link
Reference in a new issue