Commit graph

2482 commits

Author SHA1 Message Date
lukemelia
b57765486d Add explicit User < ActiveRecord::Base definition to migration 009 so that it will work for a user upgrading from r280 to trunk. John Athayde reported this problem on the mailing list.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@336 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-06 04:29:28 +00:00
lukemelia
8c193a65d6 A few of the flash fixes slipped by the last commit.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@335 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-05 10:47:51 +00:00
lukemelia
99b734a52c My apologies for this large, multi-pronged commit. What's here:
* Introduce Tracks::Config class to wrap environment.rb config settings
* Remove unused admin and index actions from user_controller
* Introduce flash partial and standardize on symbol keys for the flash hash
* Replace usages of render_partial with render :partial

Two new authentication options! These probably need documentation...

* Introduce LDAP authentication option (see configuration in environment.rb.tmpl). Thanks to Jeremy Evans for creating the SimpleLdapAuthenticator plugin. Note: the ldap auth integration test is likely to be fragile. Works for me on OS X with openldap, but your mileage may vary.
* Introduce Open ID authentication option (see configuration in environment.rb.tmpl and http://openid.net for more info). Thanks to East Media for the Open ID Consumer Plugin.
 
In environment.rb, you can enable any combination of the three auth options. If you have more than one selected, users can opt between them via their preferences pages. To play with the Open ID auth, you can get an identity at pip.verisignlabs.com.

Note that there are some new migrations to support the new authentication options, so don't forget to rake migrate!


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@334 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-05 10:41:59 +00:00
lukemelia
4e0b459524 Applied Tomas Rich's patch (with some refactoring) to introduce a new api method
that allows task creation using the same syntax as the "Send to kGTD" quicksilver plugin:

Put an @ in front of context name and > in front of project name so "Call jim @calls > Fix house"
would create the "Call jim" todo in the calls context and the Fix house project.

If there aren't any exact matches, it selects the first context and project that starts with the given strings,
so "Call jim @cal >Fix h" would also work.

If no project and no context are give,
it works exactly like the NewTodo.

It also supports the ability to create a new project on the fly by prefacing
the project with "new:", for example "Call jim @calls > new:Clean the porch"

The new api method the new api method has the name NewRichTodo, which neither Tomas nor I like very much.
Perhaps you have an idea for a better name?

Closes #384.

Also, I removed duplication between context and project models by
introducing acts_as_namepart_finder and acts_as_todo_container.


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@333 a4c988fc-2ded-0310-b66e-134b36920a42
2006-10-27 07:19:24 +00:00
bsag
4c2742f6f3 Started adding support for the Chronic library, to provide natural language date selections. You can now type phrases such as "tomorrow", "nov 10", "1 week hence", "10 days hence" and so on into the date box and these will be parsed into a valid date. I haven't managed to get proper validation working yet, but you'll get a live preview of the parsed date just below the input box.
What doesn't work yet:

* If you delete all characters in the date box, you'll get an error message. This will go away if you type more characters
* You'll get an error as above when the form is cleared and redisplayed after submission. Again, it will go away if you type anything in the box.
* Validation doesn't work, but the preview will display "Invalid date" if Chronic can't parse your phrase
* This isn't added to the edit form for actions yet.

Also partially fixed #394: the mobile interface works again, but you might get an error visiting the subsequent pages of a filtered view (i.e. viewing a single context or project). I'm not sure what's causing this, but it's on my list to fix.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@332 a4c988fc-2ded-0310-b66e-134b36920a42
2006-10-25 15:35:08 +00:00
lukemelia
f6965d2fe2 Changed conflicting div id "status"
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@331 a4c988fc-2ded-0310-b66e-134b36920a42
2006-10-16 07:08:50 +00:00
lukemelia
3566040418 Added a new preference which gives the user the option to see the full name of the project/context in an action listing instead of [P] or [C]. Defaults to false,
which is the same as the current behavior. 



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@330 a4c988fc-2ded-0310-b66e-134b36920a42
2006-10-16 06:38:59 +00:00
lukemelia
c8f4f34f24 Fix a bug that occured when an action's project was changed from nil to an actual project.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@329 a4c988fc-2ded-0310-b66e-134b36920a42
2006-10-16 06:04:37 +00:00
lukemelia
77bb3f556c I think this fixes the migration. Let me know if your done status is converted properly or not.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@328 a4c988fc-2ded-0310-b66e-134b36920a42
2006-10-16 04:33:15 +00:00
lukemelia
f67e36871c Simplify some find methods in todo_controller using associations. Fix a bug in the RSS and TEXT feeds created by yesterday's change to the project status.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@327 a4c988fc-2ded-0310-b66e-134b36920a42
2006-10-12 05:00:46 +00:00
lukemelia
fa4b1c4c7b When a "next action" is edited from a project page and the edit changes the project, the "next action" now disappears from the page as it should. Fixes #392
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@326 a4c988fc-2ded-0310-b66e-134b36920a42
2006-10-12 03:48:48 +00:00
lukemelia
c89a8249ed Applied an anonymous patch from Germany to add a "mark as done" link to RSS feed items. Fixes #386
Danke!



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@325 a4c988fc-2ded-0310-b66e-134b36920a42
2006-10-11 04:40:58 +00:00
lukemelia
57005432e2 Converted "done" property of a project into a status with states of 'active', 'hidden' & 'completed'. Fixes #389.
Added acts_as_state_machine plugin and made Project use it to implement this change.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@324 a4c988fc-2ded-0310-b66e-134b36920a42
2006-10-10 07:17:54 +00:00
lukemelia
8b65f1e8ee Make the latest migration behave well in the case of a missing refresh preference value. Patch provided by Blair Zajac. Thanks, Blair! Closes #382.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@323 a4c988fc-2ded-0310-b66e-134b36920a42
2006-09-22 00:26:23 +00:00
lukemelia
f3223c5474 Apply Blair Zajac's patch that fixes my botched migration (013). Closes #381.
Thanks, Blair!



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@322 a4c988fc-2ded-0310-b66e-134b36920a42
2006-09-21 04:18:02 +00:00
lukemelia
50211a3ebe Add a preference to hide hidden contexts in the sidebar.
Rework the preferences as a model unto itself and clean up the view and controller code around preferences.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@321 a4c988fc-2ded-0310-b66e-134b36920a42
2006-09-17 06:53:33 +00:00
lukemelia
d74635d229 Add user preference to hide completed projects in the sidebar.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@320 a4c988fc-2ded-0310-b66e-134b36920a42
2006-09-16 23:19:07 +00:00
lukemelia
6fa8439c4a Add first_name, last_name, and display_name to the User and make first and last names editable via the preferences interface. The display_name attribute is used in the upper right-hand corner of the standard layout and falls back to use the login if neither first_name of last_name are set.
This is the beginning of Tony Shadwick's request http://www.rousette.org.uk/projects/forums/viewthread/70/



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@319 a4c988fc-2ded-0310-b66e-134b36920a42
2006-09-16 16:01:29 +00:00
lukemelia
ba3757f29e Rename new_context and new_project actions to create to fit into the CRUD model, add tests for these methods, too.
Add a plugin to allow executing tests using an in-memory sqlite database. Faster!



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@318 a4c988fc-2ded-0310-b66e-134b36920a42
2006-09-16 06:50:22 +00:00
lukemelia
3e22381187 Deleting actions was broken. Should be fixed now.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@317 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-25 04:24:58 +00:00
lukemelia
dc73835c7b Fix the Ajax corner case described in #353 : "change of todo's context on home page should work like marking complete"
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@316 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-25 03:57:26 +00:00
lukemelia
c0b0e14b9e Applied a variation of the patch submitted with #367 by a nameless contrbutor (thanks, whoever you are!). This should bring our iCal feeds more in line with the spec (RFC 2445) and make them work better with Evolution and perhaps other iCal consumers.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@315 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-25 03:36:44 +00:00
lukemelia
3002fcf2f1 Created tests for backend_controller to cover security concerns, including #372 "user can add an action to another user's context via API". Modified backend_controller to close that hole and make the tests pass.
Added UserController#create to provide RESTful API for the admin user to create a new user in the system. This may be useful for the folks who have generously opened their Tracks installs to others. I have plans to document the RESTful API stuff at some point and write a Ruby wrapper.

Created a class method User.get_salt that wraps all calls to the SALT constant so that unit-tests can be always run with the default salt (I was previously needing to modify my environment.rb to run tests). 

Replaced usages of assert_success in tests with assert_response :success because assert_success is deprecated.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@313 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-25 02:25:18 +00:00
lukemelia
14c8516002 In a session-expired scenario that results from a call to tickler/check_tickler, Tracks will redirect to tickler/check_tickler after the user re-authenticates. That action only has an rjs view, so the result was a blank page. In that situation check_tickler will now trigger a redirect to the Tracks home page.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@312 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-17 02:06:07 +00:00
lukemelia
994308f581 Actions listed in TEXT feeds are now sorted in the same order as they are on the home page. Also fixed a bug where an action marked complete and then unmarked complete would be shown as complete on the TEXT feed. This addresses Jeroen van der Ham's mailing list query. Create a Trac ticket next time please, Jeroen. :-)
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@311 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-14 06:37:53 +00:00
lukemelia
a1c199131b Fixes #335. A user's token (or "word") that is used for feed and some API access will now not change unless explicity requested by the user.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@310 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-13 04:43:52 +00:00
lukemelia
31214f1812 Refine todo update.rjs to work better when called from a project page. Fixes #354.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@309 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-11 05:36:48 +00:00
lukemelia
03f4de5703 Upgrade to rails 1.1.6.
Clean up a couple of minor errors/warnings.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@307 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-11 02:53:59 +00:00
lukemelia
a36b736c6a Freeze to rails 1.1.5. The only change I needed to make for compatibility was to ApplicationController#init_not_done_counts
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@306 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-10 03:22:47 +00:00
lukemelia
45739e12de Remove unused method (TodoController@count_shown_items), refactoring todo_controller for DRY
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@305 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-08 23:38:42 +00:00
lukemelia
9158c4341c A slight modification to my last refactor: using singleton methods instead of a mix-in.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@304 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-04 22:20:08 +00:00
lukemelia
c290d7a36a Some cool refactoring of the completed and completed_archive actions.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@303 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-03 01:58:49 +00:00
lukemelia
f9a2a6460d Apply Ryan Daigle's patch to fix editing contexts and projects. See #341. Does not resolve ajax loading issue mentioned in the ticket.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@302 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-03 01:07:13 +00:00
lukemelia
cf7b90101a Convert edit action to use RJS; share edit views between deferred and todo controllers; rename update_action to update in todo controller. Another step in the process of making Tracks more CRUDdy!
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@301 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-02 03:40:22 +00:00
lukemelia
9392d4d696 Unify controller action for destroying an action into the todo controller and lay some groundwork for similar requests coming from different views. Fixes #343.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@300 a4c988fc-2ded-0310-b66e-134b36920a42
2006-08-01 07:03:31 +00:00
lukemelia
1f6a99a27f Fix project and context creation rendering, which was failing because the hash for tracking the number of actions in a project or context had not been defined. Fixes #341.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@299 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-30 20:09:04 +00:00
lukemelia
d9e3c94a17 Apply Tommi Komulainen's patch to expands the action in-place editing form to use the available width more effectively. Thanks Tommi!
Fixes #334.
  


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@298 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-30 03:37:57 +00:00
lukemelia
ee85dea17c Applied dstrelau's patch to fix a bonehead move on my part that left a single line of an older version of code in deferred_controller. Fixes #340
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@297 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-30 02:19:14 +00:00
lukemelia
7cf219afb9 Fix context and project list feeds, which were broken in one of the last two changesets.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@296 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-29 10:26:57 +00:00
lukemelia
c606e646b3 Incorporate Ryan Daigle's patch (thanks Ryan!) to fix errors parsing non-US-style dates on the tickler show_from field. Refactor date parsing calls to use a new method in the base action controller.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@295 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-28 19:03:34 +00:00
lukemelia
e0e407d99a Optimized ActiveRecord calls to minimize SQL queries, especially on the home page. Also, moved feed page to feed controller.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@294 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-28 06:55:35 +00:00
lukemelia
afaf2235fa Clean up todo controller by extracting deferred todo functionality into a new deferred controller. Thanks to Trotter Cashion for his presentation on CRUD at the nyc.rb group that was the inspiration for this cleanup. See http://lifecoding.com/blog/?p=31 for slides.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@293 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-28 04:09:02 +00:00
bsag
0a00eaffb9 Fixed a boneheaded mistake that I made with the http-equiv refresh directive. Now if you have a value of zero in your user preferences, auto-refresh really is turned off.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@292 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-23 19:19:10 +00:00
bsag
f483c34429 Added similar code to that in [288] to add context and project dropdowns to all of the lightbox add next action forms.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@291 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-23 13:42:21 +00:00
bsag
803a9db6ae Added a META HTTP-EQUIV=REFRESH value to the standard layout template. The refresh value is taken from user preferences, and defaults to zero so that the page doesn't refresh automatically.
If you're using the trunk, you'll need to run rake db:migrate to update your user preferences.

Fixes #295



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@290 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-23 13:33:52 +00:00
bsag
d1b74bc2bf Notes with returns in them broke the iCal feed. By looking at how iCal itself encodes notes with returns/linebreaks in them, I figured out that you need a one line string with each line break as a literal '\n', which iCal then interprets as a linebreak.
iCal now accepts feeds containing notes with linebreaks, and properly interprets those linebreaks.

Fixes #319



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@289 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-23 06:36:18 +00:00
bsag
0401763a10 Altered the shared/add_new_item_form to show the context and project drop downs on all the pages (including the show/[context_name] and show/[project_name] pages). On the latter pages, the drop down automatically selects the context or project of the current page.
To my great surprise, it also seems to fix the long-standing problem with Safari silently nullifying the fields after an item was added, and so causing two additions in a row to fail! Yay for unintended side effects!

Fixes #331



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@288 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-22 18:55:57 +00:00
lukemelia
89802e7e19 Make check_tickler's conversion of Deferred actions to Immediate ones bypass validation. Fixes #329
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@287 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-21 03:22:57 +00:00
lukemelia
229ee47743 Add javascript to hide empty notes message upon adding a note on the project detail page. Fixes #327.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@286 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-20 06:05:41 +00:00
lukemelia
91f272a672 Make contexts appear and disappear on the home page as items are added/deleted/marked complete. Fixes #313.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@285 a4c988fc-2ded-0310-b66e-134b36920a42
2006-07-18 05:09:54 +00:00