mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-16 04:08:08 +01:00
Implemented a feature that give a project and optional default context. When set,
this context will be pre-populated when creating an action from the project's page. When creating an action from the home page, the context will be auto-selected when the project is selected if the context field has not yet been entered. This implementation is a combination of the great patch submitted by James Kebinger (thanks James!) and some of my modifications and additions. Don't forget to rake db:migrate. Fixes #162, originally suggested by Rolf one year ago! Also in this commit: * Tweaked selenium tags test * Tweaked formatting of next/previous project HTML * Implemented Null Object pattern for context to support a Project having no default context * Removed tickler.rhtml, no longer in use * applying z-index values to project sortable list items (otherwise context autocomplete was appearing below next list item) * Swapped order of project and context in new action form (setting default context makes more sense this way) * Removed CSS width of for form elements, so form could be used in content area without being too narrow git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@480 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
11ed78abe2
commit
38b2e336a8
21 changed files with 189 additions and 75 deletions
|
|
@ -162,6 +162,7 @@ class ContextsController < ApplicationController
|
|||
# Hides actions in hidden projects from context.
|
||||
@not_done_todos = @context.todos.find(:all, :conditions => ['todos.state = ?', 'active'], :order => "todos.due IS NULL, todos.due ASC, todos.created_at ASC", :include => :project)
|
||||
@count = @not_done_todos.size
|
||||
@default_project_context_name_map = build_default_project_context_name_map(@projects).to_json
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue