<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>app/views/volunteers/map.html.erb</filename>
    </added>
    <added>
      <filename>config/initializers/geokit_config.rb</filename>
    </added>
    <added>
      <filename>db/migrate/20090218133257_add_lat_lng_to_volunteer.rb</filename>
    </added>
    <added>
      <filename>public/images/apple-circle.gif</filename>
    </added>
    <added>
      <filename>public/images/download_icon.jpg</filename>
    </added>
    <added>
      <filename>public/javascripts/gmaps.js</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/.gitignore</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/MIT-LICENSE</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/README.markdown</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/Rakefile</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/VERSION_HISTORY.txt</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/about.yml</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/assets/api_keys_template</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/init.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/install.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/lib/geokit-rails/acts_as_mappable.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/lib/geokit-rails/defaults.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/lib/geokit-rails/ip_geocode_lookup.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/test/acts_as_mappable_test.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/test/database.yml</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/test/fixtures/companies.yml</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/test/fixtures/custom_locations.yml</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/test/fixtures/locations.yml</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/test/fixtures/stores.yml</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/test/ip_geocode_lookup_test.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/test/schema.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/geokit-rails/test/test_helper.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -11,3 +11,4 @@ system/
 config/database.yml
 mail_processing_command.txt
 collateral
+clean_lists/*</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,7 @@
 Milestone 1
 
-* fix IE css problem with radio buttons
-* finalize copy on welcome page
-* update form fields (e.g. boolean)
+
+
 * add validations for new fields
 * add new field to tests
 
@@ -22,3 +21,9 @@ Milestone 1
 
 Milestone 2
 * Send confirmation email: add email_confirmed
+
+
+# Reporting
+
+
+# Volunteer.find(:all, :origin =&gt; owner, :within =&gt; 1)</diff>
      <filename>TODO.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,20 @@
 class VolunteersController &lt; ApplicationController
   before_filter :authenticate, :except =&gt; [:new, :create]
   
+  def map
+    @volunteers = Volunteer.find(:all)
+    respond_to do |format|
+      format.html {render :layout =&gt; false}
+    end
+  end
+  
   # GET /volunteers
   # GET /volunteers.xml
   def index
-    @volunteers = Volunteer.find(:all)
+    # @volunteers = Volunteer.find(:all)
+    # @volunteers = Volunteer.paginate_by_board_id @board.id, :page =&gt; params[:page], :order =&gt; 'updated_at DESC'
+    @volunteer_count = Volunteer.count
+    @volunteers = Volunteer.paginate :page =&gt; params[:page], :order =&gt; 'created_at DESC'
 
     respond_to do |format|
       format.html # index.html.erb</diff>
      <filename>app/controllers/volunteers_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,6 @@
 module VolunteersHelper
+  
+  def html_info(volunteer)
+    &quot;&lt;strong&gt;#{volunteer.first_name} #{volunteer.last_name} (#{link_to 'details', volunteer})&lt;/strong&gt;&lt;br/&gt;take dogs: #{volunteer.can_keep_dogs}&lt;br/&gt;take cats: #{volunteer.can_keep_cats}&lt;br/&gt;take other: #{volunteer.can_keep_other}&quot;
+  end
 end</diff>
      <filename>app/helpers/volunteers_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 require 'fastercsv'
 class Volunteer &lt; ActiveRecord::Base
+  acts_as_mappable
   validates_presence_of :first_name, :last_name
   wraps_attribute :email_address, EmailAddress
   validates_presence_of :address_1, :suburb
@@ -9,6 +10,16 @@ class Volunteer &lt; ActiveRecord::Base
   wraps_attribute :work_phone,   PhoneNumber, :allow_blank =&gt; true
   validate :must_have_at_least_one_phone_number
   
+  before_validation_on_create :geocode_address
+
+  private
+  def geocode_address
+    geo=Geokit::Geocoders::MultiGeocoder.geocode (address)
+    # errors.add(:address, &quot;Could not Geocode address&quot;) if !geo.success
+    self.lat, self.lng = geo.lat,geo.lng if geo.success
+  end
+  
+  
   CSV_FIELDS = (Volunteer.column_names - [&quot;id&quot;, &quot;created_at&quot;, &quot;updated_at&quot;])
   
   def self.generate_csv(volunteers)
@@ -21,6 +32,9 @@ class Volunteer &lt; ActiveRecord::Base
      end
   end
   
+  def address
+    &quot;#{address_1}, #{address_2}, #{suburb}, #{postcode}&quot;
+  end
   
   def must_have_at_least_one_phone_number
     if mobile_phone.blank? &amp;&amp; home_phone.blank? &amp;&amp; work_phone.blank?</diff>
      <filename>app/models/volunteer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,36 +1,32 @@
-&lt;h1&gt;Listing volunteers&lt;/h1&gt;
+&lt;h1&gt;Listing volunteers (&lt;%= @volunteer_count %&gt; in total)&lt;/h2&gt; &lt;%= link_to 'download csv file', '/volunteers.csv'%&gt;
+
+
+&lt;%= will_paginate @volunteers, :class =&gt; 'apple_pagination' %&gt;
 
 &lt;table&gt;
   &lt;tr&gt;
-    &lt;th&gt;First name&lt;/th&gt;
-    &lt;th&gt;Last name&lt;/th&gt;
-    &lt;th&gt;Address 1&lt;/th&gt;
-    &lt;th&gt;Address 2&lt;/th&gt;
+    &lt;th&gt;Name&lt;/th&gt;
     &lt;th&gt;Suburb&lt;/th&gt;
     &lt;th&gt;Postcode&lt;/th&gt;
-    &lt;th&gt;Mobile phone&lt;/th&gt;
-    &lt;th&gt;Home phone&lt;/th&gt;
-    &lt;th&gt;Work phone&lt;/th&gt;
+    &lt;th&gt;Dog&lt;/th&gt;
+    &lt;th&gt;Cat&lt;/th&gt;
+    &lt;th&gt;Other&lt;/th&gt;
   &lt;/tr&gt;
-
 &lt;% for volunteer in @volunteers %&gt;
   &lt;tr&gt;
-    &lt;td&gt;&lt;%=h volunteer.first_name %&gt;&lt;/td&gt;
-    &lt;td&gt;&lt;%=h volunteer.last_name %&gt;&lt;/td&gt;
-    &lt;td&gt;&lt;%=h volunteer.address_1 %&gt;&lt;/td&gt;
-    &lt;td&gt;&lt;%=h volunteer.address_2 %&gt;&lt;/td&gt;
+    &lt;td&gt;&lt;%=h volunteer.first_name %&gt; &lt;%=h volunteer.last_name %&gt;&lt;/td&gt;
     &lt;td&gt;&lt;%=h volunteer.suburb %&gt;&lt;/td&gt;
     &lt;td&gt;&lt;%=h volunteer.postcode %&gt;&lt;/td&gt;
-    &lt;td&gt;&lt;%=h volunteer.mobile_phone %&gt;&lt;/td&gt;
-    &lt;td&gt;&lt;%=h volunteer.home_phone %&gt;&lt;/td&gt;
-    &lt;td&gt;&lt;%=h volunteer.work_phone %&gt;&lt;/td&gt;
-    &lt;td&gt;&lt;%= link_to 'Show', volunteer %&gt;&lt;/td&gt;
-    &lt;td&gt;&lt;%= link_to 'Edit', edit_volunteer_path(volunteer) %&gt;&lt;/td&gt;
-    &lt;td&gt;&lt;%= link_to 'Destroy', volunteer, :confirm =&gt; 'Are you sure?', :method =&gt; :delete %&gt;&lt;/td&gt;
+    &lt;td&gt;&lt;%=h volunteer.can_keep_dogs %&gt;&lt;/td&gt;
+    &lt;td&gt;&lt;%=h volunteer.can_keep_cats %&gt;&lt;/td&gt;
+    &lt;td&gt;&lt;%=h volunteer.can_keep_other %&gt;&lt;/td&gt;
+    &lt;td&gt;&lt;%#= link_to 'Show', volunteer %&gt;&lt;/td&gt;
+    &lt;td&gt;&lt;%#= link_to 'Edit', edit_volunteer_path(volunteer) %&gt;&lt;/td&gt;
+    &lt;td&gt;&lt;%#= link_to 'Destroy', volunteer, :confirm =&gt; 'Are you sure?', :method =&gt; :delete %&gt;&lt;/td&gt;
   &lt;/tr&gt;
 &lt;% end %&gt;
 &lt;/table&gt;
 
-&lt;br /&gt;
+&lt;%= will_paginate @volunteers, :class =&gt; 'apple_pagination' %&gt;
 
 &lt;%= link_to 'New volunteer', new_volunteer_path %&gt;</diff>
      <filename>app/views/volunteers/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@ set :database_yml_in_scm, false
 set :shared_dirs, 'system'
 
 # set :packages_for_project, %w(libmagick9-dev imagemagick libfreeimage3) # list of packages to be installed
-# set :gems_for_project, %w(rmagick mini_magick image_science) # list of gems to be installed
+set :gems_for_project, %w(fastercsv will_paginate) # list of gems to be installed
 
 # Update these if you're not running everything on one host.
 role :app, domain</diff>
      <filename>config/deploy.rb</filename>
    </modified>
    <modified>
      <diff>@@ -27,6 +27,9 @@ Rails::Initializer.run do |config|
   # config.gem &quot;hpricot&quot;, :version =&gt; '0.6', :source =&gt; &quot;http://code.whytheluckystiff.net&quot;
   # config.gem &quot;sqlite3-ruby&quot;, :lib =&gt; &quot;sqlite3&quot;
   # config.gem &quot;aws-s3&quot;, :lib =&gt; &quot;aws/s3&quot;
+  config.gem 'mislav-will_paginate', :version =&gt; '~&gt; 2.2.3', :lib =&gt; 'will_paginate',  :source =&gt; 'http://gems.github.com'
+  config.gem &quot;andre-geokit&quot;, :lib=&gt;'geokit', :source =&gt; 'http://gems.github.com'
+  
 
   # Only load the plugins named here, in the order given. By default, all plugins 
   # in vendor/plugins are loaded in alphabetical order.</diff>
      <filename>config/environment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 ActionController::Routing::Routes.draw do |map|
-  map.resources :volunteers
+  map.resources :volunteers, :collection =&gt; { :map =&gt; :get }
   map.resources :home
 
   map.root :controller =&gt; &quot;home&quot;</diff>
      <filename>config/routes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@
 #
 # It's strongly recommended to check this file into your version control system.
 
-ActiveRecord::Schema.define(:version =&gt; 20090217061100) do
+ActiveRecord::Schema.define(:version =&gt; 20090218133257) do
 
   create_table &quot;volunteers&quot;, :force =&gt; true do |t|
     t.string   &quot;first_name&quot;
@@ -43,6 +43,8 @@ ActiveRecord::Schema.define(:version =&gt; 20090217061100) do
     t.boolean  &quot;dog_safe_gates&quot;,              :limit =&gt; 255
     t.string   &quot;special_skills&quot;
     t.boolean  &quot;can_administer_medical_care&quot;
+    t.float    &quot;lat&quot;
+    t.float    &quot;lng&quot;
   end
 
 end</diff>
      <filename>db/schema.rb</filename>
    </modified>
    <modified>
      <diff>@@ -58,11 +58,11 @@ h1 {
 	clear: both;
 }
 
-a img {
+/*a img {
 	border: none;
 	float: left;
 	width: 700px;
-}
+}*/
 
 /*TABLES*/
 table, tr, th, td {
@@ -94,3 +94,93 @@ a {
 	font-weight: bold;
 }
 
+.digg_pagination {
+  background: white;
+  /* self-clearing method: */ }
+  .digg_pagination a, .digg_pagination span {
+    padding: .2em .5em;
+    display: block;
+    float: left;
+    margin-right: 1px; }
+  .digg_pagination span.disabled {
+    color: #999;
+    border: 1px solid #DDD; }
+  .digg_pagination span.current {
+    font-weight: bold;
+    background: #2E6AB1;
+    color: white;
+    border: 1px solid #2E6AB1; }
+  .digg_pagination a {
+    text-decoration: none;
+    color: #105CB6;
+    border: 1px solid #9AAFE5; }
+    .digg_pagination a:hover, .digg_pagination a:focus {
+      color: #003;
+      border-color: #003; }
+  .digg_pagination .page_info {
+    background: #2E6AB1;
+    color: white;
+    padding: .4em .6em;
+    width: 22em;
+    margin-bottom: .3em;
+    text-align: center; }
+    .digg_pagination .page_info b {
+      color: #003;
+      background: #6aa6ed;
+      padding: .1em .25em; }
+  .digg_pagination:after {
+    content: &quot;.&quot;;
+    display: block;
+    height: 0;
+    clear: both;
+    visibility: hidden; }
+  * html .digg_pagination {
+    height: 1%; }
+  *:first-child+html .digg_pagination {
+    overflow: hidden; }
+ 
+.apple_pagination {
+  background: #F1F1F1;
+  border: 1px solid #E5E5E5;
+  text-align: center;
+  padding: 1em; }
+  .apple_pagination a, .apple_pagination span {
+    padding: .2em .3em; }
+  .apple_pagination span.disabled {
+    color: #AAA; }
+  .apple_pagination span.current {
+    font-weight: bold;
+    background: transparent url(/images/apple-circle.gif) no-repeat 50% 50%; }
+  .apple_pagination a {
+    text-decoration: none;
+    color: black; }
+    .apple_pagination a:hover, .apple_pagination a:focus {
+      text-decoration: underline; }
+ 
+.flickr_pagination {
+  text-align: center;
+  padding: .3em; }
+  .flickr_pagination a, .flickr_pagination span {
+    padding: .2em .5em; }
+  .flickr_pagination span.disabled {
+    color: #AAA; }
+  .flickr_pagination span.current {
+    font-weight: bold;
+    color: #FF0084; }
+  .flickr_pagination a {
+    border: 1px solid #DDDDDD;
+    color: #0063DC;
+    text-decoration: none; }
+    .flickr_pagination a:hover, .flickr_pagination a:focus {
+      border-color: #003366;
+      background: #0063DC;
+      color: white; }
+  .flickr_pagination .page_info {
+    color: #aaa;
+    padding-top: .8em; }
+  .flickr_pagination .prev_page, .flickr_pagination .next_page {
+    border-width: 2px; }
+  .flickr_pagination .prev_page {
+    margin-right: 1em; }
+  .flickr_pagination .next_page {
+    margin-left: 1em; }</diff>
      <filename>public/stylesheets/application.css</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>031e559280e9146c7ea5dce54e7a2153daac41e9</id>
    </parent>
  </parents>
  <author>
    <name>Mike Bailey</name>
    <email>mike@bailey.net.au</email>
  </author>
  <url>http://github.com/mbailey/fun4paws/commit/8072763ce93a4ac76304fdf35a1183988b6b7392</url>
  <id>8072763ce93a4ac76304fdf35a1183988b6b7392</id>
  <committed-date>2009-02-18T07:21:53-08:00</committed-date>
  <authored-date>2009-02-18T07:21:53-08:00</authored-date>
  <message>Added Geokit and google maps
- find nearest volunteers
Added pagination to volunteer list
Show volunteer count
Added link to CSV download</message>
  <tree>21903c958b4d8ce1cc8ff702073035a93c7c883b</tree>
  <committer>
    <name>Mike Bailey</name>
    <email>mike@bailey.net.au</email>
  </committer>
</commit>
