Activity log improvement
First time uploaded document receive status "Created" instead of "Updated". In activity description added document description field in addition to comment.
This commit is contained in:
parent
b3f6aa7293
commit
c998b82009
@ -52,10 +52,11 @@ class DmsfFileRevision < ActiveRecord::Base
|
||||
scope :deleted, -> { where(deleted: STATUS_DELETED) }
|
||||
|
||||
acts_as_customizable
|
||||
acts_as_event :title => Proc.new {|o| "#{l(:label_dmsf_updated)}: #{o.dmsf_file.dmsf_path_str}"},
|
||||
acts_as_event :title => Proc.new {|o| (o.source_dmsf_file_revision_id.present? ? "#{l(:label_dmsf_updated)}" : "#{l(:label_created)}") +
|
||||
": #{o.dmsf_file.dmsf_path_str}"},
|
||||
:url => Proc.new {|o| {:controller => 'dmsf_files', :action => 'show', :id => o.dmsf_file}},
|
||||
:datetime => Proc.new {|o| o.updated_at },
|
||||
:description => Proc.new {|o| o.comment },
|
||||
:description => Proc.new {|o| o.description + "\n" + o.comment },
|
||||
:author => Proc.new {|o| o.user }
|
||||
|
||||
acts_as_activity_provider :type => 'dmsf_file_revisions',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user