diff --git a/tracks/app/controllers/context_controller.rb b/tracks/app/controllers/context_controller.rb index 4f21ddd2..30ba3e82 100644 --- a/tracks/app/controllers/context_controller.rb +++ b/tracks/app/controllers/context_controller.rb @@ -24,6 +24,7 @@ class ContextController < ApplicationController def show init init_todos + @on_page = "context" @page_title = "TRACKS::Context: #{@context.name}" end diff --git a/tracks/app/controllers/project_controller.rb b/tracks/app/controllers/project_controller.rb index 431b36b0..60e9c4d9 100644 --- a/tracks/app/controllers/project_controller.rb +++ b/tracks/app/controllers/project_controller.rb @@ -27,6 +27,7 @@ class ProjectController < ApplicationController init init_todos @notes = @project.notes + @on_page = "project" @page_title = "TRACKS::Project: #{@project.name}" if @not_done.empty? diff --git a/tracks/app/controllers/todo_controller.rb b/tracks/app/controllers/todo_controller.rb index 06d6b50c..fd87860e 100644 --- a/tracks/app/controllers/todo_controller.rb +++ b/tracks/app/controllers/todo_controller.rb @@ -21,6 +21,7 @@ class TodoController < ApplicationController # def list self.init + @on_page = "home" @page_title = "TRACKS::List tasks" @done = @done[0..(NO_OF_ACTIONS-1)] @@ -36,6 +37,9 @@ class TodoController < ApplicationController # in the selected context. def add_item self.init + if @params["on_project_page"] + @on_page = "project" + end item = @user.todos.build item.attributes = @params["new_item"] @@ -46,7 +50,7 @@ class TodoController < ApplicationController end if item.save - render :partial => 'item', :object => item, :project => @params["project"] + render :partial => 'item', :object => item else flash["warning"] = "Couldn't add next action \"#{item.description}\"" render_text "" @@ -77,7 +81,9 @@ class TodoController < ApplicationController # def update_action self.init - + if @params["on_project_page"] == true + @on_page = "project" + end item = check_user_return_item item.attributes = @params["item"] @@ -88,7 +94,7 @@ class TodoController < ApplicationController end if item.save - render :partial => 'item', :object => item, :project => @params["project"] + render :partial => 'item', :object => item else flash["warning"] = "Couldn't update the action" render_text "" diff --git a/tracks/app/views/context/_context.rhtml b/tracks/app/views/context/_context.rhtml index fac5d2a6..755e0170 100644 --- a/tracks/app/views/context/_context.rhtml +++ b/tracks/app/views/context/_context.rhtml @@ -11,6 +11,6 @@ <%= render :partial => "shared/empty", :locals => { :message => "Currently there are no uncompleted actions in this context"} %> -<%= render :partial => "todo/item", :collection => @not_done, :locals => { :project => false } %> +<%= render :partial => "todo/item", :collection => @not_done %> diff --git a/tracks/app/views/project/_project.rhtml b/tracks/app/views/project/_project.rhtml index 27e10bf6..d36cfccf 100644 --- a/tracks/app/views/project/_project.rhtml +++ b/tracks/app/views/project/_project.rhtml @@ -14,11 +14,11 @@

Project has been marked as completed

<% end -%>
+
<%= render :partial => "shared/empty", :locals => { :message => "Currently there are no uncompleted actions in this project"} %>
- - <%= render :partial => "todo/item", :collection => @not_done, :locals => { :project => true } %> + <%= render :partial => "todo/item", :collection => @not_done %>
diff --git a/tracks/app/views/shared/add_new_item_form.rhtml b/tracks/app/views/shared/add_new_item_form.rhtml index be953fac..b9134026 100644 --- a/tracks/app/views/shared/add_new_item_form.rhtml +++ b/tracks/app/views/shared/add_new_item_form.rhtml @@ -50,7 +50,7 @@ <% if controller.controller_name == "project" -%> <%= hidden_field( "new_item", "project_id", "value" => "#{@project.id}") %> - + <% elsif controller.controller_name == "context" -%> <%= hidden_field( "new_item", "context_id", "value" => "#{@context.id}") %> <% end -%> diff --git a/tracks/app/views/todo/_action_edit_form.rhtml b/tracks/app/views/todo/_action_edit_form.rhtml index 9b18288b..91d8220d 100644 --- a/tracks/app/views/todo/_action_edit_form.rhtml +++ b/tracks/app/views/todo/_action_edit_form.rhtml @@ -49,7 +49,7 @@ <% if controller.controller_name == "project" -%> - + <% end -%> Cancel diff --git a/tracks/app/views/todo/_completed.rhtml b/tracks/app/views/todo/_completed.rhtml index 7e9747d2..40bad0ac 100644 --- a/tracks/app/views/todo/_completed.rhtml +++ b/tracks/app/views/todo/_completed.rhtml @@ -1,4 +1,4 @@ -<% suffix = append_descriptor ? append_descriptor : '' %> +<% suffix = append_descriptor ? append_descriptor : '' -%>

<% if collapsible %> diff --git a/tracks/app/views/todo/_item.rhtml b/tracks/app/views/todo/_item.rhtml index 76dfe188..1cb492b7 100644 --- a/tracks/app/views/todo/_item.rhtml +++ b/tracks/app/views/todo/_item.rhtml @@ -1,4 +1,5 @@
+
<%= form_remote_tag_toggle_todo( item ) %> <%= form_tag( { :controller => "todo", :action => "toggle_check", :id => item.id }, @@ -12,7 +13,7 @@ <%= due_date( item.due ) -%> <% end -%> <%= sanitize(item.description) %> -<% if project -%> +<% if @on_page == "project" -%> <%= link_to( "[C]", { :controller => "context", :action => "show", :name => urlize(item.context.name) }, :title => "View context: #{item.context.name}" ) %> <% elsif item.project_id -%> <%= link_to( "[P]", { :controller => "project", :action => "show", :name => urlize(item.project.name) }, :title => "View project: #{item.project.name}" ) %> diff --git a/tracks/doc/CHANGELOG b/tracks/doc/CHANGELOG index 0ae124f6..a6e310dc 100644 --- a/tracks/doc/CHANGELOG +++ b/tracks/doc/CHANGELOG @@ -2,7 +2,7 @@ * Homepage: http://www.rousette.org.uk/projects/ * Author: bsag (http://www.rousette.org.uk/) -* Contributors: Nicholas Lee, Lolindrath, Jim Ray, Arnaud Limbourg, Timothy Martens, Luke, John Leonard (for great installation tutorials on Windows XP) +* Contributors: Nicholas Lee, Lolindrath, Jim Ray, Arnaud Limbourg, Timothy Martens, Luke Melia, John Leonard (for great installation tutorials on Windows XP) * Version: 1.03 * Copyright: (cc) 2004-2005 rousette.org.uk * License: GNU GPL diff --git a/tracks/doc/README_FOR_APP b/tracks/doc/README_FOR_APP index 90727d79..51377535 100644 --- a/tracks/doc/README_FOR_APP +++ b/tracks/doc/README_FOR_APP @@ -2,7 +2,7 @@ * Homepage: http://www.rousette.org.uk/projects/ * Author: bsag (http://www.rousette.org.uk/) -* Contributors: Nicholas Lee, Lolindrath, Jim Ray, Arnaud Limbourg, Timothy Martens, Luke, John Leonard (for great installation tutorials on Windows XP) +* Contributors: Nicholas Lee, Lolindrath, Jim Ray, Arnaud Limbourg, Timothy Martens, Luke Melia, John Leonard (for great installation tutorials on Windows XP) * Version: 1.031 * Copyright: (cc) 2004-2005 rousette.org.uk * License: GNU GPL @@ -15,9 +15,9 @@ While fully usable for everyday use, Tracks is still a work in progress. Make su IF THIS CRASHES YOUR MACHINE AND LOSES YOUR DATA, IT'S NOT MY FAULT! -== Installation +== Installation (for trunk version only) -Before you start, you need to make sure that you have Ruby 1.8.2, Rails 0.13.1 (it may work with versions down to 0.12.0, but it's much better to get the latest version), and Redcloth 3.0.3. By far the easiest way to get these installed is using gems (see instructions on getting gems here http://wiki.rubyonrails.com/rails/show/GemRails). You also need some kind of database. MySQL is probably the most popular, but it's also easy to use PostgreSQL or SQLite. If you have Mac OS X Tiger, you already have Ruby 1.8.2 and SQLite3 installed, so all you need to do after installing Rails and Redcloth is to install the sqlite3-ruby gem (1.1.0). See http://dev.rousette.org.uk/wiki/Tracks/Install for more details on installing all the necessary components on all the supported platforms. +Before you start, you need to make sure that you have Ruby 1.8.2, Rails 0.14.3, and Redcloth 3.0.3. By far the easiest way to get these installed is using gems (see instructions on getting gems here http://wiki.rubyonrails.com/rails/show/GemRails). You also need some kind of database. MySQL is probably the most popular, but it's also easy to use PostgreSQL or SQLite. If you have Mac OS X Tiger, you already have Ruby 1.8.2 and SQLite3 installed, so all you need to do after installing Rails and Redcloth is to install the sqlite3-ruby gem (1.1.0). See http://dev.rousette.org.uk/wiki/Tracks/Install for more details on installing all the necessary components on all the supported platforms. === New users