Relocated todo_controller#deferred_update_action to be next to todo_controller#update_action
Include all non-hidden contexts on the home page, but hide the empty ones. Ground work for supporting the automatic showing of a context with zero items when an item is moved to it.
Added a comment about todo_controller#update_element -- is it used?
Remove unused #list_of method from context, note & project models
Remove unused #list_all method from note model
Methods to lazy load done_todos and not_done_todos for project and context models
Fixes#322
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@282 a4c988fc-2ded-0310-b66e-134b36920a42
When you start dragging an action, the other contexts collapse to provide easier targets for dropping. After the drop, the contexts return to their previously states of collapsed/expanded.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@275 a4c988fc-2ded-0310-b66e-134b36920a42
* A count of actions in each situation is shown (i.e. all uncompleted actions on main page, all actions in context on filtered context page etc.)
* Validation errors when adding a new action are now caught and displayed on the form. I can't seem to get validation errors displayed for existing items which are being edited, but the action is (correctly) not saved.
* You can now add deferred actions through the standard form (these are not displayed on the mobile view currently).
* There's a logout link on the main page.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@270 a4c988fc-2ded-0310-b66e-134b36920a42
That will take you to the login page, and then to the mobile view. I've tried to make the interface as functional as possible, while still fitting neatly on a small screen, being very lightweight in terms of page size (those data plans are expensive!), and not requiring too much messing about with a phone keyboard.
The main screen lists all uncompleted next actions, 6 per page. If you select the double right arrow link, you'll be taken to a detail view which doubles as a place to view all the details, or an editing page (hit the back button to get back if you're just viewing, update to commit your edits).
At the bottom of each page there are two select boxes which allow you to filter the view to a particular context or project.
It needs a little more work, but it's quite functional right now.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@263 a4c988fc-2ded-0310-b66e-134b36920a42
Unfortunately, I couldn't seem to create a migration to revert the fields, so I had to alter the older migration files. This means that if you're using the trunk you need to export your data, delete the database, create it again, run rake db:migrate and then reimport your data. Make sure you backup the whole database first, just in case!
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@261 a4c988fc-2ded-0310-b66e-134b36920a42
The 'week_starts' and 'due_style' preferences can now be selected with an options list rather than entered in a textfield. This makes much more sense without the user having to look at the help notes.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@253 a4c988fc-2ded-0310-b66e-134b36920a42
For some reason that I really can't figure out, adding an action to the context page results in the badge being incremented by two, but almost identical code on the project page gives the correct count. Baffling, but I'm sure I'm missing something that's staring me in the face.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@252 a4c988fc-2ded-0310-b66e-134b36920a42
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
Instead of opening up a form on the main page, clicking the 'Add new action' link (or hitting Alt/Ctrl N) opens up an overlay window, with a semi-transparent window underneath. You can add as many actions as you like by filling in the forms and hitting submit, then when you're done, click the close box or the shaded overlay area to dismiss the window.
It works very well on Safari, but for some reason, on my copy of Firefox, the cursor is invisible.
My plan is to also allow deferred actions to be added using this form, and eventually set up editing of existing actions to use the same format.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@250 a4c988fc-2ded-0310-b66e-134b36920a42
This changeset sets the default datestamp using Rails to set a db-appropriate format. It fixes SQLite3, and I hope also PostgreSQL though I can't test this.
Fixes#257.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@249 a4c988fc-2ded-0310-b66e-134b36920a42
Experimentally, I've made the whole top navigation section fixed so that it stays in place as the page scrolls, and it's black and slightly transparent to give it a different feel. I'm not sure if I like it or not, but it does make the links handily available.
I've also made the layout a bit more fluid to use the available width better. It's not quite right yet, but it works much better with wide displays (fixing #193) and also with narrow displays (fixing #262).
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@245 a4c988fc-2ded-0310-b66e-134b36920a42
Changed the content-type of the iCal feeds to text/calendar which should fix problems with Mozilla Calendar. The feeds still work with iCal. Fixes#273.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@242 a4c988fc-2ded-0310-b66e-134b36920a42
New 'All projects' feed was reporting all projects as 'Done' because of a missing questionmark to test for truth.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@241 a4c988fc-2ded-0310-b66e-134b36920a42