mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-29 20:26:11 +01:00
Prefixed all page titles with "TRACKS::" to make them more obvious when you have several windows open. Fixes ticket:15 suggested by timfm.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@51 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
5fc3636f72
commit
7c814b5131
4 changed files with 11 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ Project wiki: <http://www.rousette.org.uk/projects/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: <http://www.pxl8.com/basic_calendar.html>
|
||||
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 <http://www.pxl8.com/calendar_date_picker.html>. It works well, but I need to make sure it doesn't break in postgresql or sqlite.
|
||||
|
||||
## Version 1.02
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue