Permalink
Browse files

Added homepage and results page

  • Loading branch information...
1 parent 05b97d7 commit 2fe1cfce3f5496519b7c0345644d70849e2a3f2e @joshmcarthur committed Aug 9, 2011
Showing with 26 additions and 0 deletions.
  1. +10 −0 views/index.haml
  2. +16 −0 views/results.haml
View
@@ -0,0 +1,10 @@
+%h1 Geocoder
+
+%form{:action => '/geocode', :method => 'post', :enctype => "multipart/form-data"}
+ %label Upload addresses
+ %input{:type => 'file', :name => 'file_to_geocode', :id => 'file_to_geocode'}
+ %input{:type => 'submit', :value => 'Geocode'}
+ %small.note
+ %strong File guidelines:
+ The file must be a CSV (comma seperated values), and must have no additional columns beyond address data. Special characters can be a problem, and so it is recommended that you export data from Excel in 'ASCII' encoding.
+
View
@@ -0,0 +1,16 @@
+%h1 Results
+%table{:width => "100%"}
+ %thead
+ %tr
+ %th Address
+ %th Latitude
+ %th Longitude
+ %tbody
+ - @geocoded_data.each do |key, value|
+ %tr
+ %td
+ = key
+ %td
+ = value[:lat]
+ %td
+ = value[:long]

0 comments on commit 2fe1cfc

Please sign in to comment.