Mercurial > hg > soundsoftware-site
changeset 294:ba87afa76607 bug_97
fixed template variable problems; created subject label; fixed old labels
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Thu, 24 Mar 2011 12:52:30 +0000 |
parents | b133cb3ce3b1 |
children | 3b367754d2b0 76c548e4e6e4 |
files | app/models/mailer.rb app/views/mailer/added_to_project.text.html.rhtml app/views/mailer/added_to_project.text.plain.rhtml config/locales/en-GB.yml config/locales/en.yml |
diffstat | 5 files changed, 17 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/app/models/mailer.rb Thu Mar 24 10:04:11 2011 +0000 +++ b/app/models/mailer.rb Thu Mar 24 12:52:30 2011 +0000 @@ -43,10 +43,14 @@ user = User.find(member.user_id) + logger.debug "ABRACADABRA" + logger.debug project.name + + set_language_if_valid user.language recipients user.mail - subject l(:mail_subject_register, Setting.app_title) - body :project_url => url_for(:controller => 'project', :action => 'view'), + subject l(:mail_subject_added_to_project, Setting.app_title) + body :project_url => url_for(:controller => 'projects', :action => 'show', :id => project.id), :project_name => project.name render_multipart('added_to_project', body) end
--- a/app/views/mailer/added_to_project.text.html.rhtml Thu Mar 24 10:04:11 2011 +0000 +++ b/app/views/mailer/added_to_project.text.html.rhtml Thu Mar 24 12:52:30 2011 +0000 @@ -1,2 +1,3 @@ <p><%= l(:notice_added_to_project, :project_name => @project_name) %></p> -<p><%= l(:label_login) %>: <%= link_to @login_url, @login_url %></p> +<p><%= l(:notice_project_homepage, :project_url => @project_url) %></p> +
--- a/app/views/mailer/added_to_project.text.plain.rhtml Thu Mar 24 10:04:11 2011 +0000 +++ b/app/views/mailer/added_to_project.text.plain.rhtml Thu Mar 24 12:52:30 2011 +0000 @@ -1,2 +1,2 @@ -<%= l(:notice_added_to_project, @project_name) %> -<%= l(:label_login) %>: <%= @project_url %> +<%= l(:notice_added_to_project, :project_name => @project_name) %> +<%= l(:notice_project_homepage, :project_url => @project_url) %>
--- a/config/locales/en-GB.yml Thu Mar 24 10:04:11 2011 +0000 +++ b/config/locales/en-GB.yml Thu Mar 24 12:52:30 2011 +0000 @@ -972,4 +972,7 @@ label_reporter_description: Can submit bug reports; has read access for private projects label_set_role_plural: Choose roles for new member - notice_added_to_project: "You have been added to the project %{project_name}." \ No newline at end of file + notice_added_to_project: 'You have been added to the project "{{project_name}}".' + notice_project_homepage: "You can visit the project using the following link: {{project_url}}" + mail_subject_added_to_project: "You've been added to a project on {{value}}" + \ No newline at end of file
--- a/config/locales/en.yml Thu Mar 24 10:04:11 2011 +0000 +++ b/config/locales/en.yml Thu Mar 24 12:52:30 2011 +0000 @@ -965,5 +965,6 @@ label_reporter_description: Can submit bug reports; has read access for private projects label_set_role_plural: Choose roles for new member - notice_added_to_project: "You have been added to the project %{project_name}." - + notice_added_to_project: 'You have been added to the project "{{project_name}}".' + notice_project_homepage: "You can visit the project using the following link: {{project_url}}" + mail_subject_added_to_project: "You've been added to a project on {{value}}"