diff --git a/tracks/app/controllers/context_controller.rb b/tracks/app/controllers/context_controller.rb index b36dcf18..93c85113 100644 --- a/tracks/app/controllers/context_controller.rb +++ b/tracks/app/controllers/context_controller.rb @@ -65,7 +65,7 @@ class ContextController < ApplicationController item = check_user_return_item item.toggle!('done') - item.completed = Time.now () # For some reason, the before_save in todo.rb stopped working + item.completed = Time.now() # For some reason, the before_save in todo.rb stopped working if item.save render :partial => 'context/show_items', :object => item end diff --git a/tracks/app/controllers/project_controller.rb b/tracks/app/controllers/project_controller.rb index 8faef22e..e7cc7ce6 100644 --- a/tracks/app/controllers/project_controller.rb +++ b/tracks/app/controllers/project_controller.rb @@ -28,6 +28,24 @@ class ProjectController < ApplicationController init_todos @notes = @project.notes @page_title = "TRACKS::Project: #{@project.name}" + + if @not_done.empty? + @msg_nd = "Currently there are no uncompleted actions in this project" + else + @msg_nd = nil + end + + if @done.empty? + @msg_d = "Currently there are no completed actions in this project" + else + @msg_d = nil + end + + if @notes.empty? + @msg_n = "Currently there are no notes attached to this project" + else + @msg_n = nil + end end def new_project @@ -64,7 +82,7 @@ class ProjectController < ApplicationController item = check_user_return_item item.toggle!('done') - item.completed = Time.now () # For some reason, the before_save in todo.rb stopped working + item.completed = Time.now() # For some reason, the before_save in todo.rb stopped working if item.save render :partial => 'project/show_items', :object => item end diff --git a/tracks/app/controllers/todo_controller.rb b/tracks/app/controllers/todo_controller.rb index 804cf4b4..591233f2 100644 --- a/tracks/app/controllers/todo_controller.rb +++ b/tracks/app/controllers/todo_controller.rb @@ -119,7 +119,7 @@ class TodoController < ApplicationController item = check_user_return_item item.toggle!('done') - item.completed = Time.now () # For some reason, the before_save in todo.rb stopped working + item.completed = Time.now() # For some reason, the before_save in todo.rb stopped working if item.save render :partial => 'item', :object => item end diff --git a/tracks/app/views/layouts/standard.rhtml b/tracks/app/views/layouts/standard.rhtml index 33aea985..3f103ec3 100644 --- a/tracks/app/views/layouts/standard.rhtml +++ b/tracks/app/views/layouts/standard.rhtml @@ -5,8 +5,7 @@ <%= stylesheet_link_tag "standard" %> <%= stylesheet_link_tag "print", :media => "print" %> <%= javascript_include_tag "toggle_notes" %> - <%= javascript_include_tag "prototype" %> - <%= javascript_include_tag "scriptaculous" %> + <%= javascript_include_tag :defaults %> <%= stylesheet_link_tag 'calendar-system.css' %> <%= javascript_include_tag 'calendar', 'calendar-en', 'calendar-setup' %> <%= javascript_include_tag "accesskey-hints" %> diff --git a/tracks/app/views/project/_empty.rhtml b/tracks/app/views/project/_empty.rhtml deleted file mode 100644 index f92ff187..00000000 --- a/tracks/app/views/project/_empty.rhtml +++ /dev/null @@ -1 +0,0 @@ -
<%= message %>
\ No newline at end of file diff --git a/tracks/app/views/project/_show_items.rhtml b/tracks/app/views/project/_show_items.rhtml index 211c5470..8ace1e32 100644 --- a/tracks/app/views/project/_show_items.rhtml +++ b/tracks/app/views/project/_show_items.rhtml @@ -5,7 +5,8 @@ :html => { :id=> "checkbox-notdone-#{item.id}", :class => "inline-form" }, :update => "completed", :position => "top", - :loading => "Form.disable('checkbox-notdone-#{item.id}');", + :loading => "Form.disable('checkbox-notdone-#{item.id}'); + Element.hide('message-done');", :complete => visual_effect(:fade, "item-#{item.id}-container") ) %> @@ -61,7 +62,8 @@ :html => { :id=> "checkbox-done-#{item.id}", :class => "inline-form" }, :update => "next_actions", :position => "bottom", - :loading => "Form.disable('checkbox-done-#{item.id}');", + :loading => "Form.disable('checkbox-done-#{item.id}'); + Element.hide('message-notdone');", :complete => visual_effect(:fade, "done-item-#{item.id}-container") ) %> diff --git a/tracks/app/views/project/show.rhtml b/tracks/app/views/project/show.rhtml index 0e1cf124..d8d760d5 100644 --- a/tracks/app/views/project/show.rhtml +++ b/tracks/app/views/project/show.rhtml @@ -6,22 +6,17 @@Project has been marked as completed
<% end -%> - <% if !@project.done? and @not_done.empty? -%> -There are no notes yet for this project.
- <% else -%> + <% if @msg_n -%> + + <% end -%> <%= render :partial => "note/notes_summary", :collection => @notes %> - <% end -%>