diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-04-12 16:54:14 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-04-12 16:54:14 +0000 |
commit | 6d2a89142af235b5d0a9e30350859fb99ac665f3 (patch) | |
tree | 6d1ee51c6fe03dd5020299f9c50ad8ee0b688b57 /app/models | |
parent | 85f040c5362dd89829f694a58f4e91ced7fcd33e (diff) | |
download | redmine-6d2a89142af235b5d0a9e30350859fb99ac665f3.tar.gz redmine-6d2a89142af235b5d0a9e30350859fb99ac665f3.zip |
Add an icon to each event on the activity view.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1342 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/journal.rb | 1 | ||||
-rw-r--r-- | app/models/message.rb | 1 | ||||
-rw-r--r-- | app/models/wiki_content.rb | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/app/models/journal.rb b/app/models/journal.rb index 7c5e3d3bf..1376d349e 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -33,6 +33,7 @@ class Journal < ActiveRecord::Base acts_as_event :title => Proc.new {|o| "#{o.issue.tracker.name} ##{o.issue.id}: #{o.issue.subject}" + ((s = o.new_status) ? " (#{s})" : '') }, :description => :notes, :author => :user, + :type => Proc.new {|o| (s = o.new_status) && s.is_closed? ? 'issue-closed' : 'issue-edit' }, :url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.issue.id, :anchor => "change-#{o.id}"}} def save diff --git a/app/models/message.rb b/app/models/message.rb index 12b1cd990..a18d126c9 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -28,6 +28,7 @@ class Message < ActiveRecord::Base :date_column => 'created_on' acts_as_event :title => Proc.new {|o| "#{o.board.name}: #{o.subject}"}, :description => :content, + :type => Proc.new {|o| o.parent_id.nil? ? 'message' : 'reply'}, :url => Proc.new {|o| {:controller => 'messages', :action => 'show', :board_id => o.board_id, :id => o.id}} attr_protected :locked, :sticky diff --git a/app/models/wiki_content.rb b/app/models/wiki_content.rb index 13915c274..724354ad6 100644 --- a/app/models/wiki_content.rb +++ b/app/models/wiki_content.rb @@ -32,6 +32,7 @@ class WikiContent < ActiveRecord::Base acts_as_event :title => Proc.new {|o| "#{l(:label_wiki_edit)}: #{o.page.title} (##{o.version})"}, :description => :comments, :datetime => :updated_on, + :type => 'wiki-page', :url => Proc.new {|o| {:controller => 'wiki', :id => o.page.wiki.project_id, :page => o.page.title, :version => o.version}} def text=(plain) |