Merge pull request #983 from mrak0s/devel-2.0.1

Activity status Created in case of first upload
This commit is contained in:
Karel Picman 2019-03-11 09:41:27 +01:00 committed by GitHub
commit 25f84d57ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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',