Commit Graph
13034 Commits
Author SHA1 Message Date
Skud 0aef781d3d Merge pull request #120 from flov/dev
fixed-to-top and padding for nicer design
2013-03-05 02:16:06 -08:00
Skud 551e9a2b2c Merge pull request #119 from pozorvlak/commentcount
Counts of comments and links in posts/_single
2013-03-05 02:04:39 -08:00
Miles Gould 8b47773b59 Clean up post view specs as per Skud's comments.
See
https://github.com/pozorvlak/growstuff/commit/e470cf7358349c2b1488a964842225d47b7e2fa2#commitcomment-2732846
2013-03-04 11:57:59 +00:00
Florian Vallen 0b178f765d fixed-to-top and padding for nicer design 2013-02-28 20:36:47 +11:00
Miles Gould e470cf7358 Send "N comments" links to the comments anchors.
We have to call post.save in the posts/index specs, because post_path
fails unless the post has been persisted (and hence had its slug
generated). I think. That fixed the failing tests, anyway.
2013-02-27 15:39:42 +00:00
Miles Gould e7a1beb323 Add anchor tag for comments in posts/show. 2013-02-27 13:26:35 +00:00
Miles Gould ade199c17b Better links for posts.
- add Permalink
 - show Reply instead of "Comment" (iff you can comment)
 - Edit link shows if you have permission to edit
 - reorganised tests for post/_single
 - posts/_single now requires current_user; patch tests for comments.
2013-02-27 12:53:50 +00:00
Miles Gould a1fcafc1a3 Give contexts in posts/single tests more descriptive names. 2013-02-27 11:59:39 +00:00
Miles Gould 3c13be2c0a Left-align comment links in posts. 2013-02-27 11:56:13 +00:00
Miles Gould 5a18fcc0b4 Use a ul.inline for "N comments | Comment" links. 2013-02-27 11:45:58 +00:00
Jared McCorkindale 5f4d989cbd add read link to post single and comment link 2013-02-27 11:45:58 +00:00
Jared McCorkindale 67d89826f4 add link to comment value 2013-02-27 11:45:58 +00:00
Jared McCorkindale 1c1fac0aa5 hiding comment count from post show 2013-02-27 11:45:58 +00:00
Jared McCorkindale cf678a45c4 add count of comments to posts partial 2013-02-27 11:44:02 +00:00
pozorvlak 1bc963d169 Merge pull request #117 from pozorvlak/prettier-plantings
Prettier plantings
2013-02-26 06:31:07 -08:00
pozorvlak 9ebbfa1300 Merge pull request #118 from sabreuse/menu-collapse
Fix the remaining mobile menu issues
2013-02-25 16:29:14 -08:00
Miles Gould 18f9141445 Test display of location on plantings/show.
As discussed at
https://github.com/pozorvlak/growstuff/commit/d87a1ee4fdd15153537382ddbfa16e3e3d9672a5.

The version of app/views/plantings/show.html.haml from commit 97ce623
fails the "()" test, as expected.
2013-02-26 00:25:16 +00: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 204b5cdf8c initial tweaks to homepage 2013-02-26 09:23:49 +11:00
Amy 8597c8ac10 add .collapse class to the header menu to fix the remaining mobile menu issues. See https://www.pivotaltracker.com/story/show/44352329 2013-02-25 10:50:18 -05:00
Miles Gould d87a1ee4fd Don't show () on plantings/show if no location given.
Can someone explain the semantics of nil and defined? to me?
2013-02-25 14:58:17 +00:00
Miles Gould 97ce62389c Fix one-argument calls to link_to.
Fixes broken tests.
2013-02-25 14:34:37 +00:00
Skud cc64139a4d added 'where' to planting info (incl. location if known) 2013-02-25 21:47:57 +11:00
Skud 28b26179f4 Merge branch 'dev' of https://github.com/Growstuff/growstuff into prettier-plantings 2013-02-25 21:42:06 +11:00
Skud 85e37aa3c9 Minor tweaks to plantings page.
Tests still broken for me.  WTF is this even?
2013-02-25 21:01:02 +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
Skud d3d0ff42b2 Show unread notifications as bold
The view here isn't as DRY as we'd like, but all the options were kind
of ugly, and this one was easiest.
2013-02-22 16:37:23 +11:00
Skud 3bcaaa4025 Merge pull request #107 from phazel/unique_usernames
Add validation for uniqueness of login_name
2013-02-21 19:57:25 -08:00
Courtney Hazel 2de9c5c961 Merge pull request #4 from jcaudle/unique_usernames
Fix intermittent build failure due to timezones
2013-02-21 19:32:01 -08: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
Courtney Hazel 2f34badaa5 Merge pull request #3 from jcaudle/unique_usernames
Unique usernames
2013-02-21 19:21:31 -08: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
Courtney Hazel b51113bc0f Merge pull request #2 from jcaudle/unique_usernames
Unique usernames
2013-02-21 19:11:25 -08:00
Joseph Caudle 434d06ad83 Add test to ensure uniqueness of login_name 2013-02-21 22:08:25 -05:00
Joseph Caudle 728f8ec9ce Update factory for members and specs about members
We have added a sequence for login_name which is similar to the one for
emails in which the member name is incremented each time a new member is
saved.

In addition, we have updated all specs which asked for an explicit
login_name of member1 to use a regex looking only for member and some
digit.
2013-02-21 21:57:39 -05:00
Skud 1bee0a7752 Merge pull request #115 from jcaudle/upgrade-bootstrap
Upgrade bootstrap by running `rails g bootstrap:install`
2013-02-21 18:05:17 -08:00
Joseph Caudle a257c7037c Upgrade bootstrap by running rails g bootstrap:install 2013-02-21 20:55:58 -05:00
Joseph Caudle 20a15e449c Merge pull request #114 from Skud/forums
Forums
2013-02-21 17:14:42 -08:00
Skud 75306dc57a added .to_i to times to attempt to pass tests on travis 2013-02-22 09:19:30 +11:00
Skud da5a3fb76c stubbed Time.now to prevent test failures 2013-02-22 08:28:14 +11: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 81f247769f Added a rake task to create an admin user.
You should only have to do this once, after deploying.  Subsequent
admins can add new ones via the web interface.

The syntax is:

rake growstuff:admin_user name=skud

or, on heroku:

heroku run rake growstuff:admin_user name=skud
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 69414db0f1 Merge pull request #112 from cesullivan/garden_permissions
PT story 41985889, Hides 'new garden' tab on other member's pages
2013-02-19 18:45:57 -08:00