Skip to content

Instantly share code, notes, and snippets.

@abcnever
Created September 13, 2015 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abcnever/137b7e7c4dfcb7d12fe0 to your computer and use it in GitHub Desktop.
Save abcnever/137b7e7c4dfcb7d12fe0 to your computer and use it in GitHub Desktop.
commented out code. may need
/ .container
/ .search-panel
/ = form_tag '', method: :get do
/ .row.form-group
/ .col-xs-4
/ = text_field_tag 'query', params[:query], {class: 'form-control', placeholder: "Enter search terms ..."}
/ .row.form-group
/ .col-xs-2
/ .input-group
/ = text_field_tag 'distance', params[:distance], {class: 'form-control', placeholder: "Distance ..."}
/ .input-group-addon km
/ .col-xs-2
/ = select_tag :order, "<option value='_geo_distance*desc'>Closest to you</option><option value='_geo_distance*asc'>Farthest to you</option>".html_safe, class: 'form-control', prompt: 'Sort By...'
/ .row.form-group
/ .col-xs-3
/ = submit_tag 'Search', class: "btn btn-default"
/ - if can? :create, Project
/ = link_to 'New Project', new_project_path, class: "btn btn-success"
/ #pagination
/ = will_paginate @projects, renderer: BootstrapPagination::Rails
/ - @projects.each_with_index do |project, i|
/ .col-lg-2.col-md-3.col-sm-4
/ = render partial: 'projects/project_card', locals: {project: project}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment