Added search form on the places index page.

This commit is contained in:
gabrielsandoval
2015-06-21 15:24:07 +08:00
parent 5bb04dc1a4
commit 0e2a5fd205
5 changed files with 12 additions and 7 deletions

View File

@@ -458,3 +458,6 @@ DEPENDENCIES
unicorn
webrat
will_paginate (~> 3.0)
BUNDLED WITH
1.10.3

View File

@@ -0,0 +1,6 @@
%form{:action => search_places_path, :method => :get, :class => 'form-inline', :role => 'form'}
.form-group
= label_tag :new_place, "Change location:", :class => 'sr-only'
= text_field_tag :new_place, '', :class => 'form-control', :placeholder => "New location..."
= submit_tag "Search", :class => 'btn btn-primary'
%br/

View File

@@ -1,4 +1,4 @@
-content_for :title, "#{ENV['GROWSTUFF_SITE_NAME']} Community Map"
= render partial: 'search_form'
%div#placesmap

View File

@@ -1,11 +1,6 @@
-content_for :title, "#{ENV['GROWSTUFF_SITE_NAME']} members near #{@place}"
%form{:action => search_places_path, :method => :get, :class => 'form-inline', :role => 'form'}
.form-group
= label_tag :new_place, "Change location:", :class => 'sr-only'
= text_field_tag :new_place, '', :class => 'form-control', :placeholder => "New location..."
= submit_tag "Search", :class => 'btn btn-primary'
%br/
= render partial: 'search_form'
%div#placesmap{ :style => "height:300px"}

View File

@@ -3,6 +3,7 @@ development:
database: growstuff_dev
host: localhost
user: postgres
password: password
test:
adapter: postgresql