* implemented Issue 6: Improve content of notification emails

git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@33 5e329b0b-a2ee-ea63-e329-299493fc886d
This commit is contained in:
vit.jonas@gmail.com 2011-05-10 08:26:51 +00:00
parent 47867fda7c
commit 18758ce780
7 changed files with 27 additions and 14 deletions

View File

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

View File

@ -4,11 +4,12 @@
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
</head>
<body>
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| %>
<p>
<%= 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 %>
</p>
<% end %>

View File

@ -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 %>

View File

@ -4,17 +4,22 @@
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
</head>
<body>
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| %>
<p>
<%= 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? %>
<br /><span style="font-size: 0.9em">&nbsp;&nbsp;&nbsp;&nbsp;<em><%= h(file.last_revision.comment) %></em></span>
<% end %>
</p>
<% end %>
</body>

View File

@ -1,7 +1,7 @@
User <%= @user %> actualized following files in project <%= @project.name %>:
User <%= @user %> actualized 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 %><%= ", #{file.last_revision.workflow_str}" unless file.last_revision.workflow_str.blank? %>
<%= url_for({:only_path => false, :controller => "dmsf_detail", :action => "file_detail", :id => file.project,
:file_id => file }) %>
<% unless file.last_revision.comment.blank? %> comment: <%= file.last_revision.comment %><% end %>
<% end %>

View File

@ -28,9 +28,10 @@ div.plupload .plupload_file {border-width: 0 0 1px 0}
padding-left: 60px;
position:relative;
}
*/
.plupload_header_content_bw {background-image: url('../img/plupload-bw.png');}
*/
.plupload_header_title {
font: normal 18px sans-serif;
padding: 6px 0 3px;

View File

@ -60,5 +60,3 @@ cs:
:title_download_checked: "Download checked in Zip archive"
:submit_email: "Email"
:title_send_checked_by_email: "Send checked by email"