diff --git a/app/models/dmsf_file_revision.rb b/app/models/dmsf_file_revision.rb index 02ed9b75..19766209 100644 --- a/app/models/dmsf_file_revision.rb +++ b/app/models/dmsf_file_revision.rb @@ -142,6 +142,14 @@ class DmsfFileRevision < ActiveRecord::Base return new_revision end + def workflow_str + case workflow + when 1 then l(:title_waiting_for_approval) + when 2 then l(:title_approved) + else nil + end + end + def set_workflow(workflow) if User.current.allowed_to?(:file_approval, self.file.project) self.workflow = workflow diff --git a/app/views/dmsf_mailer/files_deleted.text.html.rhtml b/app/views/dmsf_mailer/files_deleted.text.html.rhtml index db55afd1..4439430f 100644 --- a/app/views/dmsf_mailer/files_deleted.text.html.rhtml +++ b/app/views/dmsf_mailer/files_deleted.text.html.rhtml @@ -4,11 +4,12 @@
- User <%= @user %> deleted following files in project <%= @project.name %>: + User <%= link_to(h(@user), {:only_path => false, :controller => "users", :action => "show", :id => @user }) %> + deleted DMSF files in project <%= @project.name %>: <% @files.each do |file| %>- <%= h(file.dmsf_path_str) %> - (<%= number_to_human_size(file.last_revision.size) %>), + <%= h(file.dmsf_path_str) %>, + <%= number_to_human_size(file.last_revision.size) %>, version: <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %>
<% end %> diff --git a/app/views/dmsf_mailer/files_deleted.text.plain.rhtml b/app/views/dmsf_mailer/files_deleted.text.plain.rhtml index 764b3a3e..a06527cd 100644 --- a/app/views/dmsf_mailer/files_deleted.text.plain.rhtml +++ b/app/views/dmsf_mailer/files_deleted.text.plain.rhtml @@ -1,5 +1,5 @@ -User <%= @user %> deleted following files in project <%= @project.name %>: +User <%= @user %> deleted DMSF files in project <%= @project.name %>: <% @files.each do |file| %> - <%= file.dmsf_path_str %> (<%= number_to_human_size(file.last_revision.size) %>), version: <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %> + <%= file.dmsf_path_str %>, <%= number_to_human_size(file.last_revision.size) %>, version: <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %> <% end %> \ No newline at end of file diff --git a/app/views/dmsf_mailer/files_updated.text.html.rhtml b/app/views/dmsf_mailer/files_updated.text.html.rhtml index fc651d36..cc505212 100644 --- a/app/views/dmsf_mailer/files_updated.text.html.rhtml +++ b/app/views/dmsf_mailer/files_updated.text.html.rhtml @@ -4,17 +4,22 @@ - User <%= @user %> actualized following files in project <%= @project.name %>: + User <%= link_to(h(@user), {:only_path => false, :controller => "users", :action => "show", :id => @user }) %> + actualized DMSF files in project <%= @project.name %>: <% @files.each do |file| %>
<%= link_to(h(file.dmsf_path_str),
{:only_path => false, :controller => "dmsf", :action => "download_file", :id => file.project,
- :file_id => file}) %>
- (<%= number_to_human_size(file.last_revision.size) %>),
+ :file_id => file}) %>,
+ <%= number_to_human_size(file.last_revision.size) %>,
version: <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %>,
+ <%= "#{file.last_revision.workflow_str}," unless file.last_revision.workflow_str.blank? %>
<%= link_to("Details",
{:only_path => false, :controller => "dmsf_detail", :action => "file_detail", :id => file.project,
:file_id => file }) %>
+ <% unless file.last_revision.comment.blank? %>
+
<%= h(file.last_revision.comment) %>
+ <% end %>