summaryrefslogtreecommitdiffstats
path: root/app/views/mailer
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/mailer')
-rw-r--r--app/views/mailer/_issue_text_html.rhtml3
-rw-r--r--app/views/mailer/_issue_text_plain.rhtml2
-rw-r--r--app/views/mailer/account_information.rhtml12
-rw-r--r--app/views/mailer/account_information.text.html.rhtml11
-rw-r--r--app/views/mailer/account_information.text.plain.rhtml6
-rw-r--r--app/views/mailer/account_information_fr.rhtml12
-rw-r--r--app/views/mailer/account_information_pl.rhtml12
-rw-r--r--app/views/mailer/account_information_sr.rhtml9
-rw-r--r--app/views/mailer/attachments_added.text.html.rhtml4
-rw-r--r--app/views/mailer/attachments_added.text.plain.rhtml4
-rw-r--r--app/views/mailer/document_added.text.html.rhtml5
-rw-r--r--app/views/mailer/document_added.text.plain.rhtml4
-rw-r--r--app/views/mailer/issue_add.text.html.rhtml4
-rw-r--r--app/views/mailer/issue_add.text.plain.rhtml4
-rw-r--r--app/views/mailer/issue_edit.text.html.rhtml4
-rw-r--r--app/views/mailer/issue_edit.text.plain.rhtml4
-rw-r--r--app/views/mailer/layout.text.html.rhtml17
-rw-r--r--app/views/mailer/layout.text.plain.rhtml3
-rw-r--r--app/views/mailer/lost_password.rhtml5
-rw-r--r--app/views/mailer/lost_password.text.html.rhtml2
-rw-r--r--app/views/mailer/lost_password.text.plain.rhtml2
-rw-r--r--app/views/mailer/message_posted.text.html.rhtml4
-rw-r--r--app/views/mailer/message_posted.text.plain.rhtml4
-rw-r--r--app/views/mailer/news_added.text.html.rhtml4
-rw-r--r--app/views/mailer/news_added.text.plain.rhtml4
-rw-r--r--app/views/mailer/register.rhtml5
-rw-r--r--app/views/mailer/register.text.html.rhtml2
-rw-r--r--app/views/mailer/register.text.plain.rhtml2
-rw-r--r--app/views/mailer/test.text.html.rhtml5
-rw-r--r--app/views/mailer/test.text.plain.rhtml5
30 files changed, 61 insertions, 103 deletions
diff --git a/app/views/mailer/_issue_text_html.rhtml b/app/views/mailer/_issue_text_html.rhtml
index 80885ebab..a3eb05b01 100644
--- a/app/views/mailer/_issue_text_html.rhtml
+++ b/app/views/mailer/_issue_text_html.rhtml
@@ -1,5 +1,4 @@
-<%= link_to "#{issue.tracker.name} ##{issue.id}", :only_path => false, :host => Setting.host_name, :controller => 'issues', :action => 'show', :id => issue %>:
-<%= issue.subject %>
+<h1><%= link_to "#{issue.tracker.name} ##{issue.id}: #{issue.subject}", issue_url %></h1>
<ul>
<li><%=l(:field_author)%>: <%= issue.author %></li>
diff --git a/app/views/mailer/_issue_text_plain.rhtml b/app/views/mailer/_issue_text_plain.rhtml
index 5e211f9af..6b87c1808 100644
--- a/app/views/mailer/_issue_text_plain.rhtml
+++ b/app/views/mailer/_issue_text_plain.rhtml
@@ -1,5 +1,5 @@
<%= "#{issue.tracker.name} ##{issue.id}: #{issue.subject}" %>
-<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'issues', :action => 'show', :id => issue %>
+<%= issue_url %>
<%=l(:field_author)%>: <%= issue.author %>
<%=l(:field_status)%>: <%= issue.status %>
diff --git a/app/views/mailer/account_information.rhtml b/app/views/mailer/account_information.rhtml
deleted file mode 100644
index 98b2916a7..000000000
--- a/app/views/mailer/account_information.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<% if @user.auth_source %>You can use your "<%= @user.auth_source.name %>" account to log into Redmine.
-<% else %>Your Redmine account information:
-* Login: <%= @user.login %>
-* Password: <%= @password %>
-<% end %>
-Log in: <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'account', :action => 'login' %>
-<% unless @user.auth_source %>
-You can change your password here: <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'my', :action => 'account' %>
-<% end %>
-
-----------------------------------------
-<%= Setting.emails_footer %>
diff --git a/app/views/mailer/account_information.text.html.rhtml b/app/views/mailer/account_information.text.html.rhtml
new file mode 100644
index 000000000..3b6ab6a9d
--- /dev/null
+++ b/app/views/mailer/account_information.text.html.rhtml
@@ -0,0 +1,11 @@
+<% if @user.auth_source %>
+<p><%= l(:mail_body_account_information_external, @user.auth_source.name) %></p>
+<% else %>
+<p><%= l(:mail_body_account_information) %>:</p>
+<ul>
+ <li><%= l(:field_login) %>: <%= @user.login %></li>
+ <li><%= l(:field_password) %>: <%= @password %></li>
+</ul>
+<% end %>
+
+<p><%= l(:label_login) %>: <%= auto_link(@login_url) %></p>
diff --git a/app/views/mailer/account_information.text.plain.rhtml b/app/views/mailer/account_information.text.plain.rhtml
new file mode 100644
index 000000000..0a02566d9
--- /dev/null
+++ b/app/views/mailer/account_information.text.plain.rhtml
@@ -0,0 +1,6 @@
+<% if @user.auth_source %><%= l(:mail_body_account_information_external, @user.auth_source.name) %>
+<% else %><%= l(:mail_body_account_information) %>:
+* <%= l(:field_login) %>: <%= @user.login %>
+* <%= l(:field_password) %>: <%= @password %>
+<% end %>
+<%= l(:label_login) %>: <%= @login_url %>
diff --git a/app/views/mailer/account_information_fr.rhtml b/app/views/mailer/account_information_fr.rhtml
deleted file mode 100644
index 71df34532..000000000
--- a/app/views/mailer/account_information_fr.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<% if @user.auth_source %>Vous pouvez utiliser votre compte "<%= @user.auth_source.name %>" pour vous connecter à Redmine.
-<% else %>Paramètres de connexion de votre compte Redmine:
-* Identifiant: <%= @user.login %>
-* Mot de passe: <%= @password %>
-<% end %>
-Pour se connecter à l'application: <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'account', :action => 'login' %>
-<% unless @user.auth_source %>
-Vous pouvez changer votre mot de passe à l'adresse: <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'my', :action => 'account' %>
-<% end %>
-
-----------------------------------------
-<%= Setting.emails_footer %>
diff --git a/app/views/mailer/account_information_pl.rhtml b/app/views/mailer/account_information_pl.rhtml
deleted file mode 100644
index 7f9060b2d..000000000
--- a/app/views/mailer/account_information_pl.rhtml
+++ /dev/null
@@ -1,12 +0,0 @@
-<% if @user.auth_source %>Możesz użyć twojego "<%= @user.auth_source.name %>" konta do zalogowania do Redmine.
-<% else %>Twoje konto w Redmine:
-* Login: <%= @user.login %>
-* Hasło: <%= @password %>
-<% end %>
-Zaloguj: <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'account', :action => 'login' %>
-<% unless @user.auth_source %>
-Możesz zmienić swoje hasło tutaj: <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'my', :action => 'account' %>
-<% end %>
-
-----------------------------------------
-<%= Setting.emails_footer %>
diff --git a/app/views/mailer/account_information_sr.rhtml b/app/views/mailer/account_information_sr.rhtml
deleted file mode 100644
index 0acd87d8d..000000000
--- a/app/views/mailer/account_information_sr.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-<% if @user.auth_source %>Mozete koristiti vas "<%= @user.auth_source.name %>" nalog da bi ste se prikljucili na Redmine.
-<% else %>Informacije o vasem Redmine nalogu:
-* Login: <%= @user.login %>
-* Password: <%= @password %>
-<% end %>
-Log in: <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'account', :action => 'login' %>
-<% unless @user.auth_source %>
-Ovde mozete izmeniti svoju lozinku: <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'my', :action => 'account' %>
-<% end %>
diff --git a/app/views/mailer/attachments_added.text.html.rhtml b/app/views/mailer/attachments_added.text.html.rhtml
index 9bb30db1d..d2355b1c4 100644
--- a/app/views/mailer/attachments_added.text.html.rhtml
+++ b/app/views/mailer/attachments_added.text.html.rhtml
@@ -1,7 +1,5 @@
-<%= link_to @added_to, @url %><br />
+<%= link_to @added_to, @added_to_url %><br />
<ul><% @attachments.each do |attachment | %>
<li><%= attachment.filename %></li>
<% end %></ul>
-<hr />
-<small><em><%= textilizable Setting.emails_footer %></em></small>
diff --git a/app/views/mailer/attachments_added.text.plain.rhtml b/app/views/mailer/attachments_added.text.plain.rhtml
index 7e4245ef2..28cb8285e 100644
--- a/app/views/mailer/attachments_added.text.plain.rhtml
+++ b/app/views/mailer/attachments_added.text.plain.rhtml
@@ -1,6 +1,4 @@
<%= @added_to %><% @attachments.each do |attachment | %>
- <%= attachment.filename %><% end %>
-<%= url_for @url %>
-----------------------------------------
-<%= Setting.emails_footer %>
+<%= @added_to_url %>
diff --git a/app/views/mailer/document_added.text.html.rhtml b/app/views/mailer/document_added.text.html.rhtml
index d7d6558b8..2ef63012b 100644
--- a/app/views/mailer/document_added.text.html.rhtml
+++ b/app/views/mailer/document_added.text.html.rhtml
@@ -1,6 +1,3 @@
-<%= link_to @document.title, :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %>
-(<%= @document.category.name %>)<br />
+<%= link_to @document.title, @document_url %> (<%= @document.category.name %>)<br />
<br />
<%= textilizable(@document.description) %>
-<hr />
-<small><em><%= textilizable Setting.emails_footer %></em></small>
diff --git a/app/views/mailer/document_added.text.plain.rhtml b/app/views/mailer/document_added.text.plain.rhtml
index bb42758f7..a6a72829e 100644
--- a/app/views/mailer/document_added.text.plain.rhtml
+++ b/app/views/mailer/document_added.text.plain.rhtml
@@ -1,6 +1,4 @@
<%= @document.title %> (<%= @document.category.name %>)
-<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %>
+<%= @document_url %>
<%= @document.description %>
-----------------------------------------
-<%= Setting.emails_footer %>
diff --git a/app/views/mailer/issue_add.text.html.rhtml b/app/views/mailer/issue_add.text.html.rhtml
index 7a0712c36..adcb4c9fe 100644
--- a/app/views/mailer/issue_add.text.html.rhtml
+++ b/app/views/mailer/issue_add.text.html.rhtml
@@ -1,5 +1,3 @@
<%= l(:text_issue_added, "##{@issue.id}") %>
<hr />
-<%= render :file => "_issue_text_html", :use_full_path => true, :locals => { :issue => @issue } %>
-<hr />
-<small><em><%= textilizable Setting.emails_footer %></em></small>
+<%= render :file => "_issue_text_html", :use_full_path => true, :locals => { :issue => @issue, :issue_url => @issue_url } %>
diff --git a/app/views/mailer/issue_add.text.plain.rhtml b/app/views/mailer/issue_add.text.plain.rhtml
index a5740ad89..797fb11b6 100644
--- a/app/views/mailer/issue_add.text.plain.rhtml
+++ b/app/views/mailer/issue_add.text.plain.rhtml
@@ -1,5 +1,3 @@
<%= l(:text_issue_added, "##{@issue.id}") %>
----------------------------------------
-<%= render :file => "_issue_text_plain", :use_full_path => true, :locals => { :issue => @issue } %>
-----------------------------------------
-<%= Setting.emails_footer %>
+<%= render :file => "_issue_text_plain", :use_full_path => true, :locals => { :issue => @issue, :issue_url => @issue_url } %>
diff --git a/app/views/mailer/issue_edit.text.html.rhtml b/app/views/mailer/issue_edit.text.html.rhtml
index fddd19431..40d34968e 100644
--- a/app/views/mailer/issue_edit.text.html.rhtml
+++ b/app/views/mailer/issue_edit.text.html.rhtml
@@ -7,6 +7,4 @@
</ul>
<%= textilizable(@journal.notes) %>
<hr />
-<%= render :file => "_issue_text_html", :use_full_path => true, :locals => { :issue => @issue } %>
-<hr />
-<small><em><%= textilizable Setting.emails_footer %></em></small>
+<%= render :file => "_issue_text_html", :use_full_path => true, :locals => { :issue => @issue, :issue_url => @issue_url } %>
diff --git a/app/views/mailer/issue_edit.text.plain.rhtml b/app/views/mailer/issue_edit.text.plain.rhtml
index 4ecc37549..32019eaea 100644
--- a/app/views/mailer/issue_edit.text.plain.rhtml
+++ b/app/views/mailer/issue_edit.text.plain.rhtml
@@ -5,6 +5,4 @@
<% end %>
<%= @journal.notes if @journal.notes? %>
----------------------------------------
-<%= render :file => "_issue_text_plain", :use_full_path => true, :locals => { :issue => @issue } %>
-----------------------------------------
-<%= Setting.emails_footer %>
+<%= render :file => "_issue_text_plain", :use_full_path => true, :locals => { :issue => @issue, :issue_url => @issue_url } %>
diff --git a/app/views/mailer/layout.text.html.rhtml b/app/views/mailer/layout.text.html.rhtml
new file mode 100644
index 000000000..b78e92bdd
--- /dev/null
+++ b/app/views/mailer/layout.text.html.rhtml
@@ -0,0 +1,17 @@
+<html>
+<head>
+<style>
+body { font-family: Verdana, sans-serif; font-size: 0.8em; color:#484848; }
+body h1 { font-family: "Trebuchet MS", Verdana, sans-serif; font-size: 1.2em; margin: 0;}
+a, a:link, a:visited{ color: #2A5685; }
+a:hover, a:active{ color: #c61a1a; }
+hr { width: 100%; height: 1px; background: #ccc; border: 0; }
+.footer { font-size: 0.8em; font-style: italic; }
+</style>
+</head>
+<body>
+<%= yield %>
+<hr />
+<span class="footer"><%= Redmine::WikiFormatting.to_html(Setting.emails_footer) %></span>
+</body>
+</html>
diff --git a/app/views/mailer/layout.text.plain.rhtml b/app/views/mailer/layout.text.plain.rhtml
new file mode 100644
index 000000000..ec3e1bfa0
--- /dev/null
+++ b/app/views/mailer/layout.text.plain.rhtml
@@ -0,0 +1,3 @@
+<%= yield %>
+----------------------------------------
+<%= Setting.emails_footer %>
diff --git a/app/views/mailer/lost_password.rhtml b/app/views/mailer/lost_password.rhtml
deleted file mode 100644
index 5b5bb3b90..000000000
--- a/app/views/mailer/lost_password.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= l(:mail_body_lost_password) %>
-<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'account', :action => 'lost_password', :token => @token.value %>
-
-----------------------------------------
-<%= Setting.emails_footer %>
diff --git a/app/views/mailer/lost_password.text.html.rhtml b/app/views/mailer/lost_password.text.html.rhtml
new file mode 100644
index 000000000..26eacfa92
--- /dev/null
+++ b/app/views/mailer/lost_password.text.html.rhtml
@@ -0,0 +1,2 @@
+<p><%= l(:mail_body_lost_password) %><br />
+<%= auto_link(@url) %></p>
diff --git a/app/views/mailer/lost_password.text.plain.rhtml b/app/views/mailer/lost_password.text.plain.rhtml
new file mode 100644
index 000000000..aec1b5b86
--- /dev/null
+++ b/app/views/mailer/lost_password.text.plain.rhtml
@@ -0,0 +1,2 @@
+<%= l(:mail_body_lost_password) %>
+<%= @url %>
diff --git a/app/views/mailer/message_posted.text.html.rhtml b/app/views/mailer/message_posted.text.html.rhtml
index 89346e724..558a6e52a 100644
--- a/app/views/mailer/message_posted.text.html.rhtml
+++ b/app/views/mailer/message_posted.text.html.rhtml
@@ -1,6 +1,4 @@
-<%=h @message.board.project.name %> - <%=h @message.board.name %>: <%= link_to @message.subject, :only_path => false, :host => Setting.host_name, :controller => 'messages', :action => 'show', :board_id => @message.board_id, :id => @message.root %><br />
+<h1><%=h @message.board.project.name %> - <%=h @message.board.name %>: <%= link_to @message.subject, @message_url %></h1>
<em><%= @message.author.name %></em>
<%= textilizable @message.content %>
-<hr />
-<small><em><%= textilizable Setting.emails_footer %></em></small>
diff --git a/app/views/mailer/message_posted.text.plain.rhtml b/app/views/mailer/message_posted.text.plain.rhtml
index 97539fd01..cc1120567 100644
--- a/app/views/mailer/message_posted.text.plain.rhtml
+++ b/app/views/mailer/message_posted.text.plain.rhtml
@@ -1,6 +1,4 @@
-<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'messages', :action => 'show', :board_id => @message.board_id, :id => @message.root %>
+<%= @message_url %>
<%= @message.author.name %>
<%= @message.content %>
-----------------------------------------
-<%= Setting.emails_footer %>
diff --git a/app/views/mailer/news_added.text.html.rhtml b/app/views/mailer/news_added.text.html.rhtml
index e99dfd5bc..010ef8ee1 100644
--- a/app/views/mailer/news_added.text.html.rhtml
+++ b/app/views/mailer/news_added.text.html.rhtml
@@ -1,6 +1,4 @@
-<%= link_to @news.title, :only_path => false, :host => Setting.host_name, :controller => 'news', :action => 'show', :id => @news %><br />
+<h1><%= link_to @news.title, @news_url %></h1>
<em><%= @news.author.name %></em>
<%= textilizable(@news.description) %>
-<hr />
-<small><em><%= textilizable Setting.emails_footer %></em></small>
diff --git a/app/views/mailer/news_added.text.plain.rhtml b/app/views/mailer/news_added.text.plain.rhtml
index 1a04af9ca..c8ae3035f 100644
--- a/app/views/mailer/news_added.text.plain.rhtml
+++ b/app/views/mailer/news_added.text.plain.rhtml
@@ -1,7 +1,5 @@
<%= @news.title %>
-<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'news', :action => 'show', :id => @news %>
+<%= @news_url %>
<%= @news.author.name %>
<%= @news.description %>
-----------------------------------------
-<%= Setting.emails_footer %>
diff --git a/app/views/mailer/register.rhtml b/app/views/mailer/register.rhtml
deleted file mode 100644
index 55fcf1e10..000000000
--- a/app/views/mailer/register.rhtml
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= l(:mail_body_register) %>
-<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'account', :action => 'register', :token => @token.value %>
-
-----------------------------------------
-<%= Setting.emails_footer %>
diff --git a/app/views/mailer/register.text.html.rhtml b/app/views/mailer/register.text.html.rhtml
new file mode 100644
index 000000000..145c3d7c9
--- /dev/null
+++ b/app/views/mailer/register.text.html.rhtml
@@ -0,0 +1,2 @@
+<p><%= l(:mail_body_register) %><br />
+<%= auto_link(@url) %></p>
diff --git a/app/views/mailer/register.text.plain.rhtml b/app/views/mailer/register.text.plain.rhtml
new file mode 100644
index 000000000..102a15ee3
--- /dev/null
+++ b/app/views/mailer/register.text.plain.rhtml
@@ -0,0 +1,2 @@
+<%= l(:mail_body_register) %>
+<%= @url %>
diff --git a/app/views/mailer/test.text.html.rhtml b/app/views/mailer/test.text.html.rhtml
index f1cb1881a..25ad20c51 100644
--- a/app/views/mailer/test.text.html.rhtml
+++ b/app/views/mailer/test.text.html.rhtml
@@ -1,5 +1,2 @@
<p>This is a test email sent by Redmine.<br />
-Redmine URL: <%= link_to url_for(:only_path => false, :host => Setting.host_name, :controller => 'welcome'),
- url_for(:only_path => false, :host => Setting.host_name, :controller => 'welcome') %></p>
-<hr />
-<small><em><%= textilizable Setting.emails_footer %></em></small>
+Redmine URL: <%= auto_link(@url) %></p>
diff --git a/app/views/mailer/test.text.plain.rhtml b/app/views/mailer/test.text.plain.rhtml
index 0519caab5..790d6ab22 100644
--- a/app/views/mailer/test.text.plain.rhtml
+++ b/app/views/mailer/test.text.plain.rhtml
@@ -1,5 +1,2 @@
This is a test email sent by Redmine.
-Redmine URL: <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'welcome' %>
-
-----------------------------------------
-<%= Setting.emails_footer %>
+Redmine URL: <%= @url %>