Wrong email notifications' issuer
This commit is contained in:
parent
4beeedd282
commit
fff4957f44
@ -39,6 +39,7 @@ class DmsfMailer < Mailer
|
||||
@files = files
|
||||
@project = project
|
||||
@author = files.first.last_revision.user if files.first.last_revision
|
||||
@author = User.anonymous unless @author
|
||||
message_id project
|
||||
set_language_if_valid user.language
|
||||
mail :to => user.mail, subject: "[#{@project.name} - #{l(:menu_dmsf)}] #{l(:text_email_doc_updated_subject)}"
|
||||
@ -60,6 +61,7 @@ class DmsfMailer < Mailer
|
||||
@files = files
|
||||
@project = project
|
||||
@author = files.first.deleted_by_user
|
||||
@author = User.anonymous unless @author
|
||||
message_id project
|
||||
set_language_if_valid user.language
|
||||
mail :to => user.mail,
|
||||
@ -68,7 +70,7 @@ class DmsfMailer < Mailer
|
||||
end
|
||||
|
||||
def self.deliver_send_documents(project, email_params, author)
|
||||
send_documents(User.current, project, email_params).deliver_now
|
||||
send_documents(User.current, project, email_params, author).deliver_now
|
||||
end
|
||||
|
||||
def send_documents(_, project, email_params, author)
|
||||
@ -109,6 +111,7 @@ class DmsfMailer < Mailer
|
||||
@text2 = l(text2_id)
|
||||
@notice = notice
|
||||
@author = User.find_by(id: revision.dmsf_workflow_assigned_by)
|
||||
@author = User.anonymous unless @author
|
||||
mail :to => user.mail,
|
||||
:subject => "[#{@project.name} - #{l(:field_label_dmsf_workflow)}] #{@workflow.name} #{l(subject_id)}"
|
||||
end
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
||||
|
||||
<%= link_to @author, user_url(@author) %> <%= l(:text_email_doc_deleted) if @author%>
|
||||
<%= link_to @author, user_url(@author) %> <%= l(:text_email_doc_deleted) %>
|
||||
<%= link_to @project, project_url(@project) %> <%= l(:text_email_doc_follows) %>
|
||||
<% @files.each do |file| %>
|
||||
<p>
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
||||
|
||||
<%= @author.name %> <%= l(:text_email_doc_deleted) %> <%= @project.name %> <%= l(:text_email_doc_follows) if @author %>
|
||||
<%= @author.name %> <%= l(:text_email_doc_deleted) %> <%= @project.name %> <%= l(:text_email_doc_follows) %>
|
||||
<% @files.each do |file| %>
|
||||
<%= h(file.dmsf_path_str) %> (<%= file.name %>)
|
||||
<% if file.last_revision %>
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
||||
|
||||
<%= link_to @author, user_url(@author) %> <%= l(:text_email_doc_updated) if @author%>
|
||||
<%= link_to @author, user_url(@author) %> <%= l(:text_email_doc_updated) %>
|
||||
<%= link_to @project, project_url(@project) %> <%= l(:text_email_doc_follows) %>
|
||||
<% @files.each do |file| %>
|
||||
<p>
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
||||
|
||||
<%= @author.name %> <%= l(:text_email_doc_updated) if @author %>
|
||||
<%= @author.name %> <%= l(:text_email_doc_updated) %>
|
||||
<%= @project.name %> <%= l(:text_email_doc_follows) %>
|
||||
<% @files.each do |file| %>
|
||||
<%= h(file.dmsf_path_str) %> (<%= file.name %>),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user