rosa-build/app/views/search/index.html.slim

43 lines
1.1 KiB
Plaintext
Raw Normal View History

2014-11-17 21:17:03 +00:00
.row
.col-md-3.col-md-offset-1
h3
= t('.advanced')
2015-02-06 15:49:06 +00:00
.col-md-7.offset10
2014-11-17 21:17:03 +00:00
= simple_form_for @search, url: search_index_path, method: :get do |f|
.row
.col-md-6
=hidden_field_tag :type, @type
= f.input :query, label: false, input_html: { name: 'query' }
.col-md-6
= f.button :submit, t('.submit')
|  
= t('layout.or')
|  
a href=search_index_path
= t('layout.clear')
.row
.col-md-3.col-md-offset-1
.panel.panel-default
.panel-body
ul.nav.nav-pills.nav-stacked
- t('.types').each do |k, v|
li class=('active' if k.to_s == @type)
a href=search_index_path(params.merge(type: k, page: 1))
span.badge.pull-right
= @search.send(k).count
= v
.col-md-7
table.table.table-striped
thead
tr
th
tbody
- @collection.each do |c|
tr
td= render @type.singularize, @type.singularize.to_sym => c
= will_paginate @collection