Commit graph

27 commits

Author SHA1 Message Date
lukemelia
aa41974d4c * Made links work for project and context links that contain an underscore('_') or a dot('.'). I removed urlize() and deurlize() in favor or methods on the models mixed in by the new UrlFriendlyName module.
* Removed tag_object() from application_helper as it was not being used.
* Introduced link_to_context() and link_to_project() helper methods.
* Fixed a javascript syntax error on the context page.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@373 a4c988fc-2ded-0310-b66e-134b36920a42
2006-12-11 04:48:56 +00:00
lukemelia
bb1cfe613a * Replaced select widgets with AutoCompleters for project & context in new item and edit forms. You can now create a new project and/or context on the fly as you're adding an item.
* Rolled Deferred controller, views & helper into Todo.
* Made the show_from field always available on the add new item and edit forms.
* Added validation to Todo to make sure a context is specified.
* Set initial state of Todo to :deferred when show_from is specified (I still need to make handle setting show_from during an edit).
* Created a generic rescue_action in ApplicationController and removed boilerplate rescue code from a few actions in TodoController.
* Made all Todo creation requests use the TodoController, removing duplicate logic from ContextController and ContextController
* Removed unused lightbox-style add item form
* Remove unused update_context and update_project actions
* Updated rails javascripts to the same as our vendor/rails



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@352 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-20 04:31:00 +00:00
lukemelia
fed0daa96d Complete the transition of acts_as_todo_container to todo_list, a simple module.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@350 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-18 06:18:17 +00:00
lukemelia
b9b4330b8d Convert :dependent => true to :dependent => :delete_all on Project and Context, and brought acts_as_todo_container under test in anticipation of conversion to a simple module.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@348 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-17 14:08:56 +00:00
lukemelia
78a89ccf3b Refactor acts_as_namepart_finder to a module, as suggested in the review of Tracks on The Rails Way.
http://www.therailsway.com/2006/11/15/tracks-part-1/



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@346 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-16 05:33:25 +00:00
lukemelia
c51587e422 * Converted Todo to acts_as_state_machine. It's states are active, deferred, completed, and project_hidden. This replaces the old single inheritance model of Immediate and Deferred. Also renamed todo.completed to todo.completed_at for clarity
* Consolidated toggle_check handling to todo_controller and rjs  
* Introduced user preference to show/hide hidden projects section in sidebar
* Fixed a bug in parse_date_per_user_prefs that was causing due dates to be set in the todo model as Times and not Dates
* Upgraded ARTS plugin
* This changeset includes migrations, so remember to db:migrate.
* Lots of code changes here, so bug reports will be gratefully accepted!



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@343 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-15 09:05:07 +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
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
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
463a61f514 This changeset introduces some integrated web service type features that take advantage
of the Rails 1.1 responds_to functionality. It also lays a foundation for future API
enhancements.

Basically, if you request the /projects, contexts/ or notes/ URLs with a client that specifies that it wants XML, Tracks will return XML. See DHH on the Accept header (http://www.loudthinking.com/arc/000572.html).

But there's a wrinkle. The controller actions mapped to these URLs are protected by an authentication filter. In normal use, Tracks redirects an unauthenticated user to the login screen for session-based authentication.

I've added a secondary authentication check that looks for a valid username and password coming from HTTP_BASIC authentication.

To test out the new functionality, try this:

curl -H 'Accept: application/xml' --basic --user YOUR_TRACKS_USERNAME:YOUR_TRACKS_PASSWORD http://localhost:3000/projects/

curl -H 'Accept: application/xml' --basic --user YOUR_TRACKS_USERNAME:YOUR_TRACKS_PASSWORD http://localhost:3000/contexts/

curl -H 'Accept: application/xml' --basic --user YOUR_TRACKS_USERNAME:YOUR_TRACKS_PASSWORD http://localhost:3000/notes/

HTTP_BASIC sends passwords in plain text, so the use of https is encouraged.

I haven't tested this on a shared host yet, but Coda Hale, whose simple_http_auth inspired this solution and provided some copy and paste code for it (thanks, Coda!), has some notes about how to make it work in his plugin readme (http://svn.codahale.com/simple_http_auth/README). To wit, putting the following in .htaccess:

  RewriteRule ^(.*)$ dispatch.fcgi [E=X-HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L]

My thinking on this architecture is as follows:

1) Follow the spirit of responds_to and DRY to leverage existing controller code for API functionality
2) Get away from using the user token for API interactions. Let's keep it for feeds, so it's basically a "lite" form of security for read-only feeds.
3) Keep Tracks in shape to adopt the simply_restful plugin being developed alongside Rails Edge

There's no real new functionality in this release that the existing API didn't provide (except for seeing your notes as XML, and somehow I don't think people are clamoring for that), but this work is an important step to being able to implement the types of API features people have been asking for.

While I was at it, I did some refactoring to the login_controller for readability and style.

Finally, I replaced the activity indicator graphic to work with the new navigation background color.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@251 a4c988fc-2ded-0310-b66e-134b36920a42
2006-06-04 07:07:42 +00:00
bsag
eefbb70660 Changed all instances of @response, @request, @session etc. to the new forms or response, request, session etc.
Fixes #266



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@239 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-13 13:32:39 +00:00
bsag
49cde85039 Applied Luke's session patch (ticket 244) in which the user.id only is stored in the session object, rather than the whole user object. This improves security and also makes the session much smaller and less fragile.
I made a small change to the signup method, because the previous method had broken at some point, and was no longer preventing non-admin users from signing others up. I suspect that this had to do with the cross-database differences in the way that booleans are handled, so I changed the method to use ActiveRecord to find the logged in user (thus automatically translating appropriately between 1/0 and 't'/'f').

The tests concerning users and login also broke with the changes in this patch, so I fixed those, and added some of the new Integration tests.

                                                   


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@215 a4c988fc-2ded-0310-b66e-134b36920a42
2006-04-08 17:46:41 +00:00
bsag
a716eb8aef I don't know quite what went wrong last time, but I discovered that on my set up at least, the version of Rails in the vendor directory was not acting as Rails 1.1. RJS templates didn't work, the 1.1 rake tasks weren't there and it was just really wonky.
So now I've got rid of the svn:externals property on vendor which was supposed to be bringing in the tagged Rails release, and I'm using rake freeze_edge instead to freeze to the 1.1 release.

Seems to be working OK for me now. Note that if you're using this, Ruby 1.8.4 is recommended, and you'll need to delete your old lighttpd.conf in config (if you have one) and let Rails generate a new one for you when you start lighttpd with script/server.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@212 a4c988fc-2ded-0310-b66e-134b36920a42
2006-03-30 17:57:16 +00:00
bsag
7a97de9c52 Added some new rake tasks to make it easier to update databases from the Tracks 1.03 version to that required for Tracks 1.04.
Documents updated, and the installation instructions are now in an HTML file: installtion.html in the root of the distribution.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@195 a4c988fc-2ded-0310-b66e-134b36920a42
2006-02-26 16:26:38 +00:00
bsag
e50389788b Moved settings for Tracks from the file settings.yml to the database. Running 'rake migrate' will update your database appropriately, and add the default settings into it. Then you should be able to visit <code>http://0.0.0.0:3000/user/preferences</code> to view and edit your settings. The advantage is that you don't need to mess about with the settings.yml file, and each of the users can have their own settings.
I'm intending this to be the last big change before releasing 1.04. Can people with access to the trunk through subversion check out this changeset and report any bugs?



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@182 a4c988fc-2ded-0310-b66e-134b36920a42
2006-02-12 15:18:21 +00:00
bsag
40534435e2 Added a rake task called upgrade_sqlite_db which does the preparatory work of fixing the tables in sqlite/sqlite3 databases created under Tracks 1.03, by exporting and importing the contents and fixing the tables in a new database. Then you can run 'rake migrate' and all should be well with using the version in the trunk.
Please read the full instructions in doc/README_FOR_APP as you need to change a few variables first to set it up for your system.

Should hopefully fix the problems people had in #198.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@180 a4c988fc-2ded-0310-b66e-134b36920a42
2006-02-02 17:19:26 +00:00
bsag
c392296680 Froze the Rails gems and RedCloth into the vendor directory, so that these will be used instead of any local version of Rails which might be incompatible. Should also mean that you don't need to install RedCloth locally to make Tracks work (I'm not sure whether this also applies to Rails, and don't want to uninstall my local Rails gems to find out!)
Effectively fixes #159.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@176 a4c988fc-2ded-0310-b66e-134b36920a42
2006-01-11 22:50:43 +00:00
bsag
d0a542f625 Main changes are to login and session management:
* Added Luke Melia's patch to warn the user when the session has timed out when the user has added or checked off a next action without refreshing the page first. If they check off an item, they are redirected to the login page, then when they return, they are informed that the action has been checked off. If they add an item, they are informed after returning from the login page that the next action hasn't been added. Fixes #163.
  * Made some stylistic changes to login and signup pages to make them tidier, and to fit with the main theme better
  * Fixed bug with deleting items: the sheet which appeared was an alert (with only an 'OK' box, rather than a confirmation (with both an 'OK' and 'Cancel' box). Fixes #189.
  * Added a new feed icon to comply with the new de-facto standard: from [http://www.feedicons.com/ Feed Icons].



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@172 a4c988fc-2ded-0310-b66e-134b36920a42
2006-01-08 13:21:24 +00:00
bsag
9867ca01ad Updated to work with Rails 0.14.1 (1.0 Release candidate) - fixes #145.
The bug where project associations didn't seem to be immediately displayed when next actions were added from the Context page is magically fixed! Fixes #142.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@156 a4c988fc-2ded-0310-b66e-134b36920a42
2005-10-30 12:21:50 +00:00
bsag
7af463c3f8 Nearly there...
I've removed my experiment with lib/math as it was throwing an error.


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@97 a4c988fc-2ded-0310-b66e-134b36920a42
2005-06-05 11:22:00 +00:00
bsag
9c912c18a5 New images (from eclipse.org) for the edit, delete, notes and up, down, top and bottom buttons. I've made a greyscale version for the default, then the coloured version gets loaded when the mouse is hovering over the button.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@93 a4c988fc-2ded-0310-b66e-134b36920a42
2005-06-04 15:55:58 +00:00
bsag
8406a482d5 Merged branches/TRY-BSAG-ajax back to the trunk.
...and we're back!


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@86 a4c988fc-2ded-0310-b66e-134b36920a42
2005-05-28 14:08:44 +00:00
bsag
2f182327e8 Cleaning up after the mess I left.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@27 a4c988fc-2ded-0310-b66e-134b36920a42
2005-02-20 18:52:53 +00:00
bsag
49b8fa1007 * Started to add some of the framework for iCal integration (not working yet)
* Added validation for next actions (on description and notes field)



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@7 a4c988fc-2ded-0310-b66e-134b36920a42
2005-01-16 15:24:34 +00:00
bsag
ec3ee77797 Initial import
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@1 a4c988fc-2ded-0310-b66e-134b36920a42
2005-01-09 11:59:57 +00:00