Commit Graph

527 Commits

Author SHA1 Message Date
Skud
2cd298fbde refactored 'interesting plantings' 2013-08-07 13:21:26 +10:00
Skud
4bcc408236 added recent scope for crops 2013-08-07 13:21:26 +10:00
Skud
382f77e0c2 Merge pull request #267 from Skud/api-review
Review and cleanup of JSON API
2013-08-06 19:58:51 -07:00
Skud
a3b7822268 Review and cleanup of JSON API
Removed JSON from classes that shouldn't have it.
(PT: https://www.pivotaltracker.com/story/show/54570954)

Also found a couple of controllers with broken authorization (i.e. not
checking CanCan). Incidentally, this also fixes the comment form bug at
https://www.pivotaltracker.com/story/show/54328716.
2013-08-05 13:29:07 +10:00
Skud
c12c0acc14 removed author fields from RSS 2013-08-05 12:23:36 +10:00
Skud
fa0d818fd9 added metadata to plantings RSS 2013-08-05 12:05:06 +10:00
Skud
128c76bca3 added RSS feed for seeds 2013-08-05 12:04:45 +10:00
Skud
e77c402ad9 Merge pull request #263 from Skud/crop_photos
Crop photos
2013-07-29 08:11:05 -07:00
Skud
8bc75a2276 Show photos on crop page
As a side effect of this, we moved a bunch of chunks of the crops page
out into partials.  We also moved photo thumbnails (as formerly seen on
the plantings page) into a partial, and then used it to display photos
on the crops page as well.
2013-07-29 11:25:36 +10:00
Skud
a56af4e88f removed test for member name in navbar 2013-07-27 14:55:06 +10:00
Skud
b8e0f135f0 rearranged navbar yet again 2013-07-26 15:45:13 +10:00
Skud
7c6d7ba3a9 rearranged routing to avoid ?owner_id=99 2013-07-26 15:29:30 +10:00
Skud
ebb8765583 make gardens page look like plantings/seeds 2013-07-26 14:48:55 +10:00
Skud
e2754a94d9 added pagination to seed and planting index pages 2013-07-26 14:36:12 +10:00
Skud
def6426e49 Fixed broken test for clicky analytics 2013-07-26 14:35:42 +10:00
Skud
1ac5683557 display plantings in table form, like seeds 2013-07-26 14:22:49 +10:00
Skud
955975a115 rearranged navbar to include Your Stuff 2013-07-26 14:16:30 +10:00
Skud
fd466e795b Minor tweaks to seed trading:
- changed "Will trade to" to "Will trade" on seeds/show page
- on crop page, only list tradable seeds (not "nowhere" ones) -- did
this by adding a tradable scope to Crop
- on crop page, say "(location unknown)" where necessary
- change heading on crop page to "Find seeds"
- show "Find seeds" heading regardless of whether any are available, and
say there are none if there aren't any, along with a link to add some
- moved "sign in or sign up to add seeds" to under the Find seeds area
2013-07-24 11:20:47 +10:00
Miles Gould
b7cbadf84a Merge branch 'dev' into seed_trade
Conflicts:
	spec/views/crops/show.html.haml_spec.rb
2013-07-23 12:59:41 +01:00
Skud
292f5185ec Merge pull request #256 from Skud/seed_trade
Seed trade
2013-07-23 04:47:51 -07:00
Miles Gould
d57d233e52 Fix broken test. 2013-07-23 12:42:10 +01:00
Miles Gould
da15994a46 Merge branch 'dev' into seed_trade
Conflicts:
	spec/views/crops/show.html.haml_spec.rb
2013-07-23 12:32:21 +01:00
Skud
470f8f2f22 allow nil/blank qtys for plantings/seeds 2013-07-23 21:19:21 +10:00
Skud
bdc267b044 added slug for seeds 2013-07-23 21:14:24 +10:00
Skud
e17f5d6599 Merge pull request #255 from Skud/photo_set
Photo set
2013-07-23 03:47:36 -07:00
Skud
2185f257c0 set 'nowhere' as default seed.tradable_to 2013-07-23 20:43:13 +10:00
Skud
6c49c80931 test cleanups (no idea how they got into that state) 2013-07-23 20:28:14 +10:00
Skud
d227da891e Merge branch 'dev' into seed_trade 2013-07-23 20:21:58 +10:00
Skud
2b6bdeda16 Merge branch 'dev' of https://github.com/Growstuff/growstuff into dev
Conflicts:
	spec/views/crops/show.html.haml_spec.rb
2013-07-23 19:35:31 +10:00
Ryan Clark
a87db0e406 Show list of seeds for trade on crop/show 2013-07-22 21:15:05 -07:00
Skud
52a00c5ed4 added numeric validation to qty for planting/seed 2013-07-22 16:40:42 +10:00
Skud
3a96cd96df removed tradable boolean field
we're now relying just on the "tradable_to" field, which is clearer.
2013-07-22 15:47:25 +10:00
Skud
610b100f7f seed page: cleaned up views/tests for location 2013-07-18 23:54:51 +10:00
Miles Gould
96e66cd9bb New photo: show an h2 with the name of the current set
Also don't show a sets dropdown if the user has no sets.
2013-07-18 14:45:36 +01:00
Miles Gould
2b863cd62e Fix problem adding photos from photosets.
When we fetched photos from a photoset, the response object didn't
respond to to_a, breaking our controller code. This turned out to be due
to weirdness in FlickRaw's API:
https://github.com/hanklords/flickraw/issues/58
2013-07-18 14:16:22 +01:00
Miles Gould
c977709235 Stop controller tests from connecting to Flickr
... by stubbing out Member#flickr_sets in a photo_controller test. I
looked at the flickrmocks gem, but it doesn't seem very helpful - it
still requires you to connect to Flickr.
2013-07-18 13:18:01 +01:00
Ryan Clark
269162c759 Tidied up seed views and added location stuff 2013-07-17 19:37:35 -07:00
Ryan Clark
21a0590114 Add tradable attributes to seed views 2013-07-17 18:59:32 -07:00
Ryan Clark
e9dd18d977 Added tradable and tradable_to to seeds 2013-07-17 18:25:55 -07:00
Ryan Clark
973567bfdc Remane use_by to plant_before to humor Skud 2013-07-17 18:24:12 -07:00
Ryan Clark
106c3a74ba Display a set dropdown on the new photo page. 2013-07-16 18:27:06 -07:00
Skud
491e97c997 connected seeds into other parts of the site 2013-07-15 23:29:14 +10:00
Skud
cc711a0a48 prettified seed-related views 2013-07-15 22:53:30 +10:00
Skud
91ea5146ac rails g scaffold seed... 2013-07-15 22:53:29 +10:00
Miles Gould
c4f4f4f7ef Show planted_from frequencies on crop page. 2013-07-11 13:08:01 +01:00
Miles Gould
4d9ddd2707 Crop: method to return hash of planted_from frequencies
Also tidied up tests which relied on the default planting factory having
a planted_from value set.
2013-07-11 13:01:52 +01:00
Miles Gould
744b526dd1 Show sunniness frequencies on crop page
Also cleaned up tests that were relying on the default planting factory
to have a sunniness value set.
2013-07-11 12:41:22 +01:00
Miles Gould
fbc64a1ee2 Crop: method to return hash of sunniness values. 2013-07-11 12:13:38 +01:00
Skud
7801a7ec09 Merge branch 'dev' into staff 2013-07-09 10:05:37 +10:00
Skud
c2be06e68f Fixed failing timestamp test on postgres 2013-07-08 13:28:59 +10:00