Author: assaf
Date: Sat May 17 00:31:28 2008
New Revision: 657303
URL: http://svn.apache.org/viewvc?rev=657303&view=rev
Log:
Readable actions in activity list.
Modified:
ode/sandbox/singleshot/app/models/activity.rb
ode/sandbox/singleshot/app/views/activities/index.html.erb
ode/sandbox/singleshot/db/schema.rb
Modified: ode/sandbox/singleshot/app/models/activity.rb
URL:
http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/models/activity.rb?rev=657303&r1=657302&r2=657303&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/models/activity.rb (original)
+++ ode/sandbox/singleshot/app/models/activity.rb Sat May 17 00:31:28 2008
@@ -6,21 +6,21 @@
returning [] do |activities|
if task.changes['state']
from, to = *task.changes['state']
- activities << new(:action=>'created', :person=>task.creator) if
task.creator && from.nil? || from == 'reserved'
- activities << new(:action=>'resumed') if from == 'suspended'
+ activities << new(:action=>'created the task',
:person=>task.creator) if task.creator && from.nil? || from == 'reserved'
+ activities << new(:action=>'resumed the task') if from == 'suspended'
case to
when 'ready'
when 'active'
- activities << new(:action=>'own', :person=>task.owner)
+ activities << new(:action=>'is now owner of the task',
:person=>task.owner)
when 'suspended'
- activities << new(:action=>'suspended')
+ activities << new(:action=>'suspended the task')
when 'completed'
- activities << new(:action=>'completed', :person=>task.owner)
+ activities << new(:action=>'completed the task',
:person=>task.owner)
when 'cancelled'
- activities << new(:action=>'cancelled')
+ activities << new(:action=>'cancelled the task')
end
else
- activities << new(:action=>'modified')
+ activities << new(:action=>'modified the task')
end
end
end
Modified: ode/sandbox/singleshot/app/views/activities/index.html.erb
URL:
http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/views/activities/index.html.erb?rev=657303&r1=657302&r2=657303&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/views/activities/index.html.erb (original)
+++ ode/sandbox/singleshot/app/views/activities/index.html.erb Sat May 17
00:31:28 2008
@@ -4,9 +4,9 @@
<h3><%= relative_date(day.first) %></h3>
<% for activity in day.last %>
<% content_tag_for 'li', activity, :class=>'hentry entry-title' do %>
- <%= link_to activity.person.fullname, activity.person.identity %>
+ <%= link_to h(activity.person.fullname), activity.person.identity %>
<%= activity.action %>
- <%= link_to activity.task.title, task_url(activity.task),
:rel=>'bookmark' %>
+ <%= link_to h(truncate(activity.task.title, 100)),
task_url(activity.task), :rel=>'bookmark' %>
<% end %>
<% end %>
</li>
Modified: ode/sandbox/singleshot/db/schema.rb
URL:
http://svn.apache.org/viewvc/ode/sandbox/singleshot/db/schema.rb?rev=657303&r1=657302&r2=657303&view=diff
==============================================================================
--- ode/sandbox/singleshot/db/schema.rb (original)
+++ ode/sandbox/singleshot/db/schema.rb Sat May 17 00:31:28 2008
@@ -30,10 +30,10 @@
t.datetime "updated_at"
end
- add_index "people", ["identity"], :name => "index_people_on_identity",
:unique => true
- add_index "people", ["fullname"], :name => "index_people_on_fullname"
- add_index "people", ["email"], :name => "index_people_on_email", :unique =>
true
add_index "people", ["access_key"], :name => "index_people_on_access_key",
:unique => true
+ add_index "people", ["email"], :name => "index_people_on_email", :unique =>
true
+ add_index "people", ["fullname"], :name => "index_people_on_fullname"
+ add_index "people", ["identity"], :name => "index_people_on_identity",
:unique => true
create_table "stakeholders", :force => true do |t|
t.integer "task_id", :null => false
@@ -43,9 +43,9 @@
t.datetime "updated_at"
end
- add_index "stakeholders", ["task_id", "person_id", "role"], :name =>
"index_stakeholders_on_task_id_and_person_id_and_role", :unique => true
- add_index "stakeholders", ["task_id", "role"], :name =>
"index_stakeholders_on_task_id_and_role"
add_index "stakeholders", ["person_id", "role"], :name =>
"index_stakeholders_on_person_id_and_role"
+ add_index "stakeholders", ["task_id", "role"], :name =>
"index_stakeholders_on_task_id_and_role"
+ add_index "stakeholders", ["task_id", "person_id", "role"], :name =>
"index_stakeholders_on_task_id_and_person_id_and_role", :unique => true
create_table "tasks", :force => true do |t|
t.string "title", :null => false