* 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:
parent
47867fda7c
commit
18758ce780
@ -142,6 +142,14 @@ class DmsfFileRevision < ActiveRecord::Base
|
|||||||
return new_revision
|
return new_revision
|
||||||
end
|
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)
|
def set_workflow(workflow)
|
||||||
if User.current.allowed_to?(:file_approval, self.file.project)
|
if User.current.allowed_to?(:file_approval, self.file.project)
|
||||||
self.workflow = workflow
|
self.workflow = workflow
|
||||||
|
|||||||
@ -4,11 +4,12 @@
|
|||||||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<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| %>
|
<% @files.each do |file| %>
|
||||||
<p>
|
<p>
|
||||||
<%= h(file.dmsf_path_str) %>
|
<%= h(file.dmsf_path_str) %>,
|
||||||
(<%= number_to_human_size(file.last_revision.size) %>),
|
<%= number_to_human_size(file.last_revision.size) %>,
|
||||||
version: <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %>
|
version: <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@ -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| %>
|
<% @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 %>
|
<% end %>
|
||||||
@ -4,17 +4,22 @@
|
|||||||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<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| %>
|
<% @files.each do |file| %>
|
||||||
<p>
|
<p>
|
||||||
<%= link_to(h(file.dmsf_path_str),
|
<%= link_to(h(file.dmsf_path_str),
|
||||||
{:only_path => false, :controller => "dmsf", :action => "download_file", :id => file.project,
|
{:only_path => false, :controller => "dmsf", :action => "download_file", :id => file.project,
|
||||||
:file_id => file}) %>
|
:file_id => file}) %>,
|
||||||
(<%= number_to_human_size(file.last_revision.size) %>),
|
<%= number_to_human_size(file.last_revision.size) %>,
|
||||||
version: <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %>,
|
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",
|
<%= link_to("Details",
|
||||||
{:only_path => false, :controller => "dmsf_detail", :action => "file_detail", :id => file.project,
|
{:only_path => false, :controller => "dmsf_detail", :action => "file_detail", :id => file.project,
|
||||||
:file_id => file }) %>
|
:file_id => file }) %>
|
||||||
|
<% unless file.last_revision.comment.blank? %>
|
||||||
|
<br /><span style="font-size: 0.9em"> <em><%= h(file.last_revision.comment) %></em></span>
|
||||||
|
<% end %>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -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| %>
|
<% @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,
|
<%= url_for({:only_path => false, :controller => "dmsf_detail", :action => "file_detail", :id => file.project,
|
||||||
:file_id => file }) %>
|
:file_id => file }) %>
|
||||||
|
<% unless file.last_revision.comment.blank? %> comment: <%= file.last_revision.comment %><% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
@ -28,9 +28,10 @@ div.plupload .plupload_file {border-width: 0 0 1px 0}
|
|||||||
padding-left: 60px;
|
padding-left: 60px;
|
||||||
position:relative;
|
position:relative;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
.plupload_header_content_bw {background-image: url('../img/plupload-bw.png');}
|
.plupload_header_content_bw {background-image: url('../img/plupload-bw.png');}
|
||||||
|
*/
|
||||||
|
|
||||||
.plupload_header_title {
|
.plupload_header_title {
|
||||||
font: normal 18px sans-serif;
|
font: normal 18px sans-serif;
|
||||||
padding: 6px 0 3px;
|
padding: 6px 0 3px;
|
||||||
|
|||||||
@ -60,5 +60,3 @@ cs:
|
|||||||
:title_download_checked: "Download checked in Zip archive"
|
:title_download_checked: "Download checked in Zip archive"
|
||||||
:submit_email: "Email"
|
:submit_email: "Email"
|
||||||
:title_send_checked_by_email: "Send checked by email"
|
:title_send_checked_by_email: "Send checked by email"
|
||||||
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user