Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Added search form on the places index page.
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielSandoval committed Jun 21, 2015
1 parent 5bb04dc commit 0e2a5fd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -458,3 +458,6 @@ DEPENDENCIES
unicorn
webrat
will_paginate (~> 3.0)

BUNDLED WITH
1.10.3
6 changes: 6 additions & 0 deletions app/views/places/_search_form.html.haml
Original file line number Diff line number Diff line change
@@ -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/
2 changes: 1 addition & 1 deletion app/views/places/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-content_for :title, "#{ENV['GROWSTUFF_SITE_NAME']} Community Map"

= render partial: 'search_form'
%div#placesmap

7 changes: 1 addition & 6 deletions app/views/places/show.html.haml
Original file line number Diff line number Diff line change
@@ -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"}

Expand Down
1 change: 1 addition & 0 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ development:
database: growstuff_dev
host: localhost
user: postgres
password: password

test:
adapter: postgresql
Expand Down

0 comments on commit 0e2a5fd

Please sign in to comment.