Commit Graph
1297 Commits
Author SHA1 Message Date
gnattery 2ecd996e8a Merge branch 'dev' of github.com:phazel/growstuff into private_message 2013-04-01 13:42:09 +11:00
gnattery b2198101fa using cancan more correctly, fixed broken tests 2013-04-01 12:26:22 +11:00
Skud e64776afc2 sort plantings by reverse creation date 2013-03-31 21:19:30 +11:00
Skud 05d1a8807a moved Member.confirmed to a scope 2013-03-31 20:28:29 +11:00
Miles Gould fbab9f517d Remove unused restriction on "nearby members" access. 2013-03-29 17:56:08 +00:00
Miles Gould 7120b16f46 Ban the username "nearby", to Avoid Confusion. 2013-03-29 15:40:33 +00:00
Skud 2770b90e3a allow blank sunniness value as well as nil 2013-03-29 17:01:14 +11:00
Skud 2bfe033a0a generalised sunniness into a variable for later reuse 2013-03-29 16:58:16 +11:00
Skud 0e9b4caf58 added sunniness field to plantings 2013-03-29 16:33:37 +11:00
Miles Gould be2c2626f7 Allow updating of send_notification_email.
Needed to stop the edit profile page breaking.
2013-03-28 12:22:51 +00:00
Miles Gould 9a3badea63 Skeleton "members near me". 2013-03-28 11:51:55 +00:00
Miles Gould bb1e8ede19 Fix misordered comments on post page bug.
https://www.pivotaltracker.com/story/show/46799417
2013-03-28 10:43:47 +00:00
Miles Gould 91acf9f878 Only send email notifications to members who want them. 2013-03-27 12:17:46 +00:00
Miles Gould 64b957db20 Actually send email on creating notifications. 2013-03-27 11:58:05 +00:00
Miles Gould 3a11982ecd Allow free-form input of dates in plantings form.
See http://railscasts.com/episodes/32-time-in-text-field?view=asciicast

If an existing date has been set, it's pre-filled in ISO format.
2013-03-26 19:27:45 +11:00
gnattery ac7b48406b Members can send each other private messages.
Problems:
Notifications controller test fails on redirecting, but seems to work fine in practice
Send Message button doesn't look nice on page
2013-03-25 17:52:50 +11:00
gnattery 886c57b908 sort members by login name 2013-03-20 14:57:09 +11:00
gnattery 349aecbb69 Delete gardens 2013-03-20 12:30:38 +11:00
Joseph Caudle ddf29d6a21 Merge branch 'restrict_usernames' into dev
* restrict_usernames:
  make login names remember case (so I can have Skud)
  Added validations for member names:

Conflicts:
	spec/factories/member.rb
2013-03-18 08:11:40 -04:00
Skud d3260b03fe deleted 1 line of obsolete comment 2013-03-18 22:16:10 +11:00
Skud 68a36310b7 make login names remember case (so I can have Skud)
... but don't let anyone take "skud" if I'm "Skud"

don't allow 'staff' as a login_name either
2013-03-18 20:48:06 +11:00
Skud 5378e7344d Added validations for member names:
2-25 chars long
alphanumeric and underscores only
disallowed: "growstuff", "admin", "moderator"

removed everything that was there to handle/truncate long usernames
since it's no longer needed.
2013-03-18 17:36:54 +11:00
Skud 84a730ddcb limit crop wrangling to crop wranglers 2013-03-18 17:02:22 +11:00
Skud a67d00b6b1 i have no idea why i made a planting belong to a forum 2013-03-06 20:07:08 +11:00
Skud 0bb6a68220 Merge branch 'dev' of https://github.com/Growstuff/growstuff into signed-in-homepage 2013-03-05 22:36:55 +11:00
Skud 3c0e467da1 prettified signed-in homepage; tests still needed 2013-03-05 22:20:13 +11:00
Miles Gould 627c373c41 Simplified some code using Garden.to_s. 2013-02-26 00:05:32 +00:00
Miles Gould b0ffd85326 Stringify gardens as their names. 2013-02-25 23:07:47 +00:00
Skud 28b26179f4 Merge branch 'dev' of https://github.com/Growstuff/growstuff into prettier-plantings 2013-02-25 21:42:06 +11:00
Skud 1081131246 Prettifying the plantings page.
Added a couple of tiny methods on Crop, and delegated them across to
Planting, to easily display the default/first scientific name, and to
show the number of times a given crop's been planted.

Sadly, the tests randomly fail on my box saying "No route matches
{:controller=>"plantings", :action=>"show"}" which is just nonsense. I
have no idea why it's doing that, so I'm committing it anyway, in the
hopes that either someone can tell me what's up, or else it's just a
glitch on my dev box.
2013-02-25 20:44:47 +11:00
Miles Gould 16605b82b6 Merge branch "notifications". 2013-02-22 13:40:58 +00:00
Skud adaee1c9ab don't send notifications to yourself 2013-02-22 17:27:40 +11:00
Skud af9c1591ef added inbox link and count to nav 2013-02-22 17:20:25 +11:00
Joseph Caudle 6b37bbc8da Fix intermittent build failure due to timezones
Because our default timezone for the app is UTC, at certain times, some
tests could fail outside of UTC. This commit fixes that by changing a
single call to Time.now to Time.zone.now.
2013-02-21 22:29:36 -05:00
Joseph Caudle 9e29aec14a Merge branch 'dev' into unique_usernames
* dev: (28 commits)
  Upgrade bootstrap by running `rails g bootstrap:install`
  added .to_i to times to attempt to pass tests on travis
  stubbed Time.now to prevent test failures
  Added friendly IDs for forum and role
  General prettification and making it look nice.
  show forum name in post meta
  Added a rake task to create an admin user.
  hooked roles up to cancan
  Added roles, but haven't yet hooked them up to CanCan
  PT story 41985889, Hides 'new garden' tab on other member's pages
  Add forums to top nav
  Display posts in summary on forum page
  tests for markdown
  post in (or not in) a forum
  prettifying forum views
  added associations between forums, posts, and members
  rails g scaffold Forum
  Rearranging password fields
  Attempted rearranging settings page, broke something
  Upgrade to Rails 3.2.12, after *another* security flaw.
  ...

Conflicts:
	spec/models/member_spec.rb
2013-02-21 22:19:45 -05:00
Skud b743fe9465 Added friendly IDs for forum and role 2013-02-20 15:51:31 +11:00
Skud 0aab5286f0 General prettification and making it look nice.
Also upgraded Bootstrap, just for the hell of it.
2013-02-20 15:42:44 +11:00
Skud 11fa06b56c show forum name in post meta 2013-02-20 14:54:38 +11:00
Skud f12941576c hooked roles up to cancan
Now only admins can create/edit forums, or mess with roles.

To add an admin user:

rails c
m = Member.find('skud')
r = Role.create(:name => 'admin')
r.members << m

We'll have to do this on the server to bootstrap the admin stuff.
Though actually, we should really write a rake task to generalise this.
2013-02-20 14:53:11 +11:00
Skud 0bc2ff25fe Added roles, but haven't yet hooked them up to CanCan 2013-02-19 12:29:22 +11:00
Skud cdee808933 prettified notifications inbox etc 2013-02-16 01:22:19 +11:00
Skud 528a5ce32c changed to/from to recipient/sender 2013-02-16 00:28:31 +11:00
Skud 4516a2f099 comments now generate notifications 2013-02-16 00:18:49 +11:00
Skud a2cfd44de4 Removed "notification type" since WAGNI (yet)
We figured that doing without it was more like the simplest thing that
could possibly work.

Note that we edited the migration in place after rolling back.  This
would cause problems if anyone had downloaded the code from pozorvlak's
repo the other day and run it, but we're assuming they didn't (since
they wouldn't have got anything interesting out of it anyway.)
2013-02-15 23:58:27 +11:00
Skud eaa4e9bab9 removed unwanted methods from controller 2013-02-15 23:42:45 +11:00
Skud cc2c63b2eb added cancan abilities for reading notifications 2013-02-15 23:17:52 +11:00
Skud a0955d2bfc post in (or not in) a forum 2013-02-14 11:46:25 +11:00
gnattery de85a6dcce added associations between forums, posts, and members 2013-02-13 15:17:40 +11:00
gnattery e10ea7f180 rails g scaffold Forum 2013-02-13 12:55:17 +11:00
Miles Gould 42d9034fc6 rails g scaffold notifications. 2013-02-12 13:17:14 +00:00