Commit Graph
1317 Commits
Author SHA1 Message Date
Skud 7d5643e30d Sort nearby members by distance
Also removed distance/units from the places/show search, since you can
adjust nearness by zooming etc.

At this point the "members near here" stuff at the bottom of the page
exists mostly for accessibility and to give additional detail that we
don't currently show in the popups on the map.

So we're not using distance/units to search for members near here
anymore, but instead are just finding the 30 nearest members to the
specified location, and showing them in order of nearness.
2013-09-11 12:41:01 +10:00
Skud 3cd48f751e Redid places/show using the all-javascript method.
Moved JSON for "what's here?" from members/index to places/index -- we
can improve this later if we want to show things other than members.
2013-09-11 12:14:18 +10:00
Skud f201f357da reinstated map attribution 2013-09-11 10:28:19 +10:00
Skud c02772d219 Spike: use pure javascript and JSON API to draw map 2013-09-09 22:15:47 +10:00
Miles Gould 0bb482d181 Use Leaflet marker clusters.
Doesn't work - clusters don't spiderfy at max zoom, show their
boundaries on hover or split when you get close to them.
2013-09-05 13:40:20 +01:00
Miles Gould d6972da84f Speed up geocoding/deal better with slow geocoding.
- set limit=1
 - set timeout=10s
2013-09-05 13:10:47 +01:00
Miles Gould 67ed1e2170 Set map height in CSS; smaller for phones.
In future we should consider making classes for different sizes of maps.
2013-09-05 12:25:45 +01:00
pozorvlak 3beb2e27f2 Merge pull request #292 from pozorvlak/places2
Added "places" pages to show maps of where members are
2013-08-31 08:12:27 -07:00
Miles Gould 71ea2b0485 Remove "\/" from escaped JavaScript to prevent test errors.
We were getting annoying "couldn't close <p> with </script>" messages
when running tests, because escape_javascript was turning </p> into
<\/p>. We fixed this by gsub'ing \/ to / after calling
escape_javascript. What could possibly go wrong? :-)
2013-08-31 16:07:27 +01:00
Miles Gould 4701bd1b2e Merge branch 'dev' into places2
Conflicts:
	Gemfile.lock
	config/application.rb
	credentials.example
2013-08-31 15:49:30 +01:00
martyhines b49d548240 Escape pop-up text in place/show 2013-08-31 15:43:25 +01:00
pozorvlak fd24680a16 Merge pull request #301 from attlebish/hidecrops
Hidecrops
2013-08-31 06:21:00 -07:00
Miles Gould d9cb1cba89 Merge branch 'bulb' into dev 2013-08-30 12:01:43 +01:00
Miles Gould 087c2c5834 Remove extra whitespace. 2013-08-30 11:59:59 +01:00
pozorvlak b211e34cd6 Merge pull request #302 from Skud/planting-help
added help text/links to planting form
2013-08-30 03:51:32 -07:00
Skud ffeda3007a added help text/links to planting form 2013-08-30 16:37:59 +10:00
Lilly 0c45fde749 Hide members when in mobile view 2013-08-30 15:53:16 +10:00
Lilly 310b40aace Hide crops when in mobile view 2013-08-30 15:47:36 +10:00
Lilly 5c4ee581cc Added 'bulb' as a 'planted_from' option. 2013-08-30 15:08:23 +10:00
Skud b73c4db17a Merge branch 'newsletter' of https://github.com/Skud/growstuff into Skud-newsletter
Conflicts:
	db/schema.rb
	spec/models/member_spec.rb
2013-08-29 00:06:44 +10:00
Miles Gould 2c6e2ee2d7 Merge branch 'dev' into places2
Conflicts:
	app/views/members/_popover.html.haml
2013-08-28 13:02:25 +01:00
Miles Gould ca236ce7fd Improve readability of controllers/places slightly. 2013-08-28 12:24:12 +01:00
Miles Gould 24f306e8ef Set User-Agent in Geocoder requests; delete custom nominatim lib.
Nominatim-the-service's license requires that we identify ourselves.
The custom nominatim lib is no longer required since Geocoder is now
Fast Enough.
2013-08-28 12:08:19 +01:00
Miles Gould c955504ad7 Reinstate Geocoder lookup
Direct Nominatim lookups were playing badly with "nearby" method in
testing. The slowness is largely fixed in the HEAD revision of Geocoder.
2013-08-28 12:00:58 +01:00
Skud 0c5fae1274 Send Growstuff login_name to Mailchimp
This lets us do mail merges with the member's name, as well as letting
us segment mailouts by people who've signed up for Growstuff and those
who came to the newsletter directly without having a Growstuff account.
2013-08-28 10:42:40 +10:00
Miles Gould b30ea755e0 Merge branch 'planting-owner' into dev
Conflicts:
	script/deploy-tasks.sh
2013-08-27 16:35:32 +01:00
pozorvlak 3ffedaac59 Merge pull request #297 from Skud/cropbot-over-enthusiasm
reined in over-enthusiastic rake task
2013-08-27 08:07:36 -07:00
Skud 411c5bcd04 split the difference: pre-checked newsletter signup + friendly text 2013-08-27 23:09:15 +10:00
Skud 1433a51b91 Add text to show we're lovely people and not spammers 2013-08-27 22:54:30 +10:00
Skud f747db7518 newsletter subscription/unsubscription via Mailchimp API 2013-08-27 22:45:18 +10:00
Skud 16f4e153f2 Made admin/newsletter page with list of subscribers 2013-08-27 21:49:54 +10:00
Skud 30bb877537 Added wants_newsletter scope to Member
also cleaned up member tests which were using FG.build instead of
.create
2013-08-27 21:34:30 +10:00
Skud 290535b557 Add newsletter subscription checkbox 2013-08-27 21:22:35 +10:00
Skud 7b307ab907 reined in over-enthusiastic rake task 2013-08-27 11:18:41 +10:00
Skud bf9c147a65 Merge branch 'planting-owner' of github.com:Skud/growstuff into planting-owner 2013-08-26 13:54:57 +10:00
Skud 99bfc704dc Added plantings_count (i.e. counter_cache) to Member
Also removed the superfluous .plantings_count method on Crop, which was
causing some confusion.

A thing we learned today: we should use .size to find the size of
ActiveRecord collections, not .count, because .count doesn't use the
cache (while .size does).
2013-08-26 13:54:09 +10:00
Skud 42e3b5e04e Added plantings_count (i.e. counter_cache) to Member
Also removed the superfluous .plantings_count method on Crop, which was
causing some confusion.

A thing we learned today: we should use .size to find the size of
ActiveRecord collections, not .count, because .count doesn't use the
cache (while .size does).
2013-08-26 13:16:38 +10:00
Skud 73b7897c28 Added rake task to update planting owner
(using planting.garden.owner)
2013-08-26 12:28:01 +10:00
Skud ff2a3cf8b2 Set planting owner automatically in controller 2013-08-26 12:23:41 +10:00
Skud 475a402133 Refactor ALL THE THINGS
Refactored tests to take into account that plantings now have owners
directly, not via gardens. Mostly this was just tweaking FactoryGirl
calls to do the right thing.
2013-08-26 12:17:23 +10:00
Skud 1ad416269d Added owner to planting
Previously we got the owner indirectly, through the garden in which the
planting was planted.  Now we're directly specifying an owner.  This
allows us to let people plant things in each other's gardens.

Tests are probably broken at this point; we're about to refactor ALL THE
THINGS.
2013-08-26 12:17:06 +10:00
Skud af3d6a50a3 Fixed CSS problem with popup tip
The little triangle underneath the popup was looking weird.  Turns out
it was mostly because of some of the leaflet_ie.css stuff, so we made
sure that the non-IE CSS took precedence, and wrote in a little override
for an unwanted border as well.
2013-08-26 11:06:21 +10:00
Skud fa93293ed8 Merge pull request #293 from pozorvlak/rake_dependency
Make "rake" depend on "rake db:test:prepare".
2013-08-23 17:05:19 -07:00
Miles Gould b31bdbb325 Make "rake" depend on "rake db:test:prepare".
This also tests for pending migrations.
2013-08-24 00:00:43 +01:00
Miles Gould bce0fe23c0 Replace string keys with symbols in Nominatim spec.
We're using symbol keys in the actual code, and hence should probably
use test data of the same format.
2013-08-23 17:19:20 +01:00
Miles Gould ef73e712ba Remove nominatum.rb's dependence on Rails
The user_agent and user_agent_email are now set as class instance
variables in config/initializers/nominatim.rb.
2013-08-23 17:00:19 +01:00
Miles Gould aa73a07e5f Add in_testing config option to Nominatum
Checking against Rails.env.test? fails on Travis.
2013-08-23 16:37:43 +01:00
Miles Gould dfa3c410fc Show names of members in popovers in places/ 2013-08-23 14:37:29 +01:00
Miles Gould 60ddc82d9f Credit OpenStreetMap under ODbL.
- broke map attributions into a partial
2013-08-23 14:36:30 +01:00
Miles Gould 8ce2798fb3 Fail gracefully if location is not found. 2013-08-23 14:12:04 +01:00