diff --git a/tracks/app/controllers/context_controller.rb b/tracks/app/controllers/context_controller.rb
index 9daf6440..b03b0661 100644
--- a/tracks/app/controllers/context_controller.rb
+++ b/tracks/app/controllers/context_controller.rb
@@ -18,7 +18,7 @@ class ContextController < ApplicationController
end
def list
- @page_title = "List Contexts"
+ @page_title = "TRACKS::List Contexts"
@contexts = Context.find_all( conditions = nil, "position ASC", limit = nil )
end
@@ -57,7 +57,7 @@ class ContextController < ApplicationController
def edit
expire_action(:controller => "context", :action => "list")
@context = Context.find(@params['id'])
- @page_title = "Edit context: #{@context.name.capitalize}"
+ @page_title = "TRACKS::Edit context: #{@context.name.capitalize}"
end
@@ -80,7 +80,7 @@ class ContextController < ApplicationController
def show
@context = Context.find_by_name(@params["id"].humanize)
@projects = Project.find_all
- @page_title = "Context: #{@context.name.capitalize}"
+ @page_title = "TRACKS::Context: #{@context.name.capitalize}"
@not_done = Todo.find_all( "context_id=#{@context.id} AND done=0", "created ASC" )
@count = Todo.count( "context_id=#{@context.id} AND done=0" )
end
diff --git a/tracks/app/controllers/project_controller.rb b/tracks/app/controllers/project_controller.rb
index 122f61e5..6d14119c 100644
--- a/tracks/app/controllers/project_controller.rb
+++ b/tracks/app/controllers/project_controller.rb
@@ -17,7 +17,7 @@ class ProjectController < ApplicationController
# Set page title, and collect existing projects in @projects
#
def list
- @page_title = "List Projects"
+ @page_title = "TRACKS::List Projects"
@projects = Project.find_all
end
@@ -28,7 +28,7 @@ class ProjectController < ApplicationController
def show
@project = Project.find_by_name(@params["name"].humanize)
@places = Context.find_all
- @page_title = "Project: #{@project.name}"
+ @page_title = "TRACKS::Project: #{@project.name}"
@not_done = Todo.find_all( "project_id=#{@project.id} AND done=0", "created DESC" )
@count = Todo.count( "project_id=#{@project.id} AND done=0" )
end
@@ -37,7 +37,7 @@ class ProjectController < ApplicationController
def edit
expire_action(:controller => "project", :action => "list")
@project = Project.find(@params['id'])
- @page_title = "Edit project: #{@project.name.capitalize}"
+ @page_title = "TRACKS::Edit project: #{@project.name.capitalize}"
end
diff --git a/tracks/app/controllers/todo_controller.rb b/tracks/app/controllers/todo_controller.rb
index abc79ae7..2d8cceed 100644
--- a/tracks/app/controllers/todo_controller.rb
+++ b/tracks/app/controllers/todo_controller.rb
@@ -17,7 +17,7 @@ class TodoController < ApplicationController
end
def list
- @page_title = "List tasks"
+ @page_title = "TRACKS::List tasks"
@projects = Project.find_all
@places = Context.find_all
@shown_places = Context.find_all_by_hide( 0, "position ASC")
@@ -33,7 +33,7 @@ class TodoController < ApplicationController
#
# Use days declaration? 1.day.ago?
def completed
- @page_title = "Completed tasks"
+ @page_title = "TRACKS::Completed tasks"
today_query = "DATE_SUB(CURDATE(),INTERVAL 1 DAY) <= completed"
week_query = "DATE_SUB(CURDATE(),INTERVAL 2 DAY) >= completed
AND DATE_SUB(CURDATE(),INTERVAL 7 DAY) <= completed"
@@ -50,7 +50,7 @@ class TodoController < ApplicationController
# Archived completed items, older than 31 days
#
def completed_archive
- @page_title = "Archived completed tasks"
+ @page_title = "TRACKS::Archived completed tasks"
archive_query = "DATE_SUB(CURDATE(),INTERVAL 32 DAY) >= completed"
@done_archive = Todo.find_by_sql( "SELECT * FROM todos WHERE done = 1 AND #{archive_query}
ORDER BY completed DESC;" )
@@ -80,7 +80,7 @@ class TodoController < ApplicationController
@belongs = @item.project_id
@projects = Project.find_all
@places = Context.find_all
- @page_title = "Edit task: #{@item.description}"
+ @page_title = "TRACKS::Edit task: #{@item.description}"
end
diff --git a/tracks/doc/CHANGENOTES.txt b/tracks/doc/CHANGENOTES.txt
index 05015708..b4289ceb 100644
--- a/tracks/doc/CHANGENOTES.txt
+++ b/tracks/doc/CHANGENOTES.txt
@@ -18,6 +18,7 @@ Project wiki:
4. Added a mini-calendar to the todo/list page. Needs some tidying up, but it provides a quick way to look up a date a few months ahead. Note that it doesn't insert the date: it's just for viewing. I modified the calendar a little bit from here:
5. Added some XMLHTTPRequest calls to speed up checking off an item as done. It grabs the checked item and appends it immediately to a 'holding' section (where you can uncheck it again if it was a mistake, or add a closing note). When you next refresh the page, it will be added to the 'Last 5 completed items' section.
6. [Contributed by Andrew Williams] Toggling of contexts in /todo/list to collapse or expand their display via a small '+' or '-' graphic. This is independent of the shown/hidden setting for contexts, and is ideal for just hiding things on the fly to focus your view.
+7. Added first patch contributed by Jim Ray: adds a host of fixes and bits of cleaning up, including a position column for contexts and projects to allow custom sorting, and changes to the links for pages to make them more human-readable. I also added a pop-up calendar to set the due date. This is entirely lifted from Michele's excellent tutorial on pxl8.com . It works well, but I need to make sure it doesn't break in postgresql or sqlite.
## Version 1.02