From: Toshi MARUYAMA Date: Mon, 26 Sep 2011 16:23:26 +0000 (+0000) Subject: Rails3: mail: rename app/views/mailer/*.text.html.rhtml to app/views/mailer/*.html... X-Git-Tag: 1.3.0~438 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ef962b84d7083b2b4d290d64b7089b596073c7be;p=redmine.git Rails3: mail: rename app/views/mailer/*.text.html.rhtml to app/views/mailer/*.html.erb (#6317) git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7537 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 591f4e97c..4f5be2fc1 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -429,7 +429,7 @@ class Mailer < ActionMailer::Base :body => render(:file => "#{method_name}.text.erb", :body => body, :layout => 'mailer.text.erb') part :content_type => "text/html", - :body => render_message("#{method_name}.text.html.rhtml", body) + :body => render_message("#{method_name}.html.erb", body) end end diff --git a/app/views/mailer/account_activated.html.erb b/app/views/mailer/account_activated.html.erb new file mode 100644 index 000000000..cb8d8caa1 --- /dev/null +++ b/app/views/mailer/account_activated.html.erb @@ -0,0 +1,2 @@ +

<%= l(:notice_account_activated) %>

+

<%= l(:label_login) %>: <%= link_to h(@login_url), @login_url %>

diff --git a/app/views/mailer/account_activated.text.html.rhtml b/app/views/mailer/account_activated.text.html.rhtml deleted file mode 100644 index cb8d8caa1..000000000 --- a/app/views/mailer/account_activated.text.html.rhtml +++ /dev/null @@ -1,2 +0,0 @@ -

<%= l(:notice_account_activated) %>

-

<%= l(:label_login) %>: <%= link_to h(@login_url), @login_url %>

diff --git a/app/views/mailer/account_activation_request.html.erb b/app/views/mailer/account_activation_request.html.erb new file mode 100644 index 000000000..4450631b9 --- /dev/null +++ b/app/views/mailer/account_activation_request.html.erb @@ -0,0 +1,2 @@ +

<%= l(:mail_body_account_activation_request, h(@user.login)) %>

+

<%= link_to h(@url), @url %>

diff --git a/app/views/mailer/account_activation_request.text.html.rhtml b/app/views/mailer/account_activation_request.text.html.rhtml deleted file mode 100644 index 4450631b9..000000000 --- a/app/views/mailer/account_activation_request.text.html.rhtml +++ /dev/null @@ -1,2 +0,0 @@ -

<%= l(:mail_body_account_activation_request, h(@user.login)) %>

-

<%= link_to h(@url), @url %>

diff --git a/app/views/mailer/account_information.html.erb b/app/views/mailer/account_information.html.erb new file mode 100644 index 000000000..94c3297ed --- /dev/null +++ b/app/views/mailer/account_information.html.erb @@ -0,0 +1,11 @@ +<% if @user.auth_source %> +

<%= l(:mail_body_account_information_external, h(@user.auth_source.name)) %>

+<% else %> +

<%= l(:mail_body_account_information) %>:

+ +<% end %> + +

<%= l(:label_login) %>: <%= auto_link(@login_url) %>

diff --git a/app/views/mailer/account_information.text.html.rhtml b/app/views/mailer/account_information.text.html.rhtml deleted file mode 100644 index 94c3297ed..000000000 --- a/app/views/mailer/account_information.text.html.rhtml +++ /dev/null @@ -1,11 +0,0 @@ -<% if @user.auth_source %> -

<%= l(:mail_body_account_information_external, h(@user.auth_source.name)) %>

-<% else %> -

<%= l(:mail_body_account_information) %>:

- -<% end %> - -

<%= l(:label_login) %>: <%= auto_link(@login_url) %>

diff --git a/app/views/mailer/attachments_added.html.erb b/app/views/mailer/attachments_added.html.erb new file mode 100644 index 000000000..11d1cf54c --- /dev/null +++ b/app/views/mailer/attachments_added.html.erb @@ -0,0 +1,5 @@ +<%= link_to h(@added_to), @added_to_url %>
+ + diff --git a/app/views/mailer/attachments_added.text.html.rhtml b/app/views/mailer/attachments_added.text.html.rhtml deleted file mode 100644 index 11d1cf54c..000000000 --- a/app/views/mailer/attachments_added.text.html.rhtml +++ /dev/null @@ -1,5 +0,0 @@ -<%= link_to h(@added_to), @added_to_url %>
- - diff --git a/app/views/mailer/document_added.html.erb b/app/views/mailer/document_added.html.erb new file mode 100644 index 000000000..8606dd784 --- /dev/null +++ b/app/views/mailer/document_added.html.erb @@ -0,0 +1,3 @@ +<%= link_to(h(@document.title), @document_url) %> (<%=h @document.category.name %>)
+
+<%= textilizable(@document, :description, :only_path => false) %> diff --git a/app/views/mailer/document_added.text.html.rhtml b/app/views/mailer/document_added.text.html.rhtml deleted file mode 100644 index 8606dd784..000000000 --- a/app/views/mailer/document_added.text.html.rhtml +++ /dev/null @@ -1,3 +0,0 @@ -<%= link_to(h(@document.title), @document_url) %> (<%=h @document.category.name %>)
-
-<%= textilizable(@document, :description, :only_path => false) %> diff --git a/app/views/mailer/issue_add.html.erb b/app/views/mailer/issue_add.html.erb new file mode 100644 index 000000000..bc62306c1 --- /dev/null +++ b/app/views/mailer/issue_add.html.erb @@ -0,0 +1,3 @@ +<%= l(:text_issue_added, :id => "##{@issue.id}", :author => h(@issue.author)) %> +
+<%= render :partial => "issue_text_html", :locals => { :issue => @issue, :issue_url => @issue_url } %> diff --git a/app/views/mailer/issue_add.text.html.rhtml b/app/views/mailer/issue_add.text.html.rhtml deleted file mode 100644 index bc62306c1..000000000 --- a/app/views/mailer/issue_add.text.html.rhtml +++ /dev/null @@ -1,3 +0,0 @@ -<%= l(:text_issue_added, :id => "##{@issue.id}", :author => h(@issue.author)) %> -
-<%= render :partial => "issue_text_html", :locals => { :issue => @issue, :issue_url => @issue_url } %> diff --git a/app/views/mailer/issue_edit.html.erb b/app/views/mailer/issue_edit.html.erb new file mode 100644 index 000000000..05c67208e --- /dev/null +++ b/app/views/mailer/issue_edit.html.erb @@ -0,0 +1,11 @@ +<%= l(:text_issue_updated, :id => "##{@issue.id}", :author => h(@journal.user)) %> + + + +<%= textilizable(@journal, :notes, :only_path => false) %> +
+<%= render :partial => "issue_text_html", :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 deleted file mode 100644 index 05c67208e..000000000 --- a/app/views/mailer/issue_edit.text.html.rhtml +++ /dev/null @@ -1,11 +0,0 @@ -<%= l(:text_issue_updated, :id => "##{@issue.id}", :author => h(@journal.user)) %> - - - -<%= textilizable(@journal, :notes, :only_path => false) %> -
-<%= render :partial => "issue_text_html", :locals => { :issue => @issue, :issue_url => @issue_url } %> diff --git a/app/views/mailer/lost_password.html.erb b/app/views/mailer/lost_password.html.erb new file mode 100644 index 000000000..40bb8e9c9 --- /dev/null +++ b/app/views/mailer/lost_password.html.erb @@ -0,0 +1,4 @@ +

<%= l(:mail_body_lost_password) %>
+<%= auto_link(@url) %>

+ +

<%= l(:field_login) %>: <%=h @token.user.login %>

diff --git a/app/views/mailer/lost_password.text.html.rhtml b/app/views/mailer/lost_password.text.html.rhtml deleted file mode 100644 index 40bb8e9c9..000000000 --- a/app/views/mailer/lost_password.text.html.rhtml +++ /dev/null @@ -1,4 +0,0 @@ -

<%= l(:mail_body_lost_password) %>
-<%= auto_link(@url) %>

- -

<%= l(:field_login) %>: <%=h @token.user.login %>

diff --git a/app/views/mailer/message_posted.html.erb b/app/views/mailer/message_posted.html.erb new file mode 100644 index 000000000..f43a8cf0f --- /dev/null +++ b/app/views/mailer/message_posted.html.erb @@ -0,0 +1,4 @@ +

<%=h @message.board.project.name %> - <%=h @message.board.name %>: <%= link_to(h(@message.subject), @message_url) %>

+<%=h @message.author %> + +<%= textilizable(@message, :content, :only_path => false) %> diff --git a/app/views/mailer/message_posted.text.html.rhtml b/app/views/mailer/message_posted.text.html.rhtml deleted file mode 100644 index f43a8cf0f..000000000 --- a/app/views/mailer/message_posted.text.html.rhtml +++ /dev/null @@ -1,4 +0,0 @@ -

<%=h @message.board.project.name %> - <%=h @message.board.name %>: <%= link_to(h(@message.subject), @message_url) %>

-<%=h @message.author %> - -<%= textilizable(@message, :content, :only_path => false) %> diff --git a/app/views/mailer/news_added.html.erb b/app/views/mailer/news_added.html.erb new file mode 100644 index 000000000..758ebccb8 --- /dev/null +++ b/app/views/mailer/news_added.html.erb @@ -0,0 +1,4 @@ +

<%= link_to(h(@news.title), @news_url) %>

+<%=h @news.author.name %> + +<%= textilizable(@news, :description, :only_path => false) %> diff --git a/app/views/mailer/news_added.text.html.rhtml b/app/views/mailer/news_added.text.html.rhtml deleted file mode 100644 index 758ebccb8..000000000 --- a/app/views/mailer/news_added.text.html.rhtml +++ /dev/null @@ -1,4 +0,0 @@ -

<%= link_to(h(@news.title), @news_url) %>

-<%=h @news.author.name %> - -<%= textilizable(@news, :description, :only_path => false) %> diff --git a/app/views/mailer/news_comment_added.html.erb b/app/views/mailer/news_comment_added.html.erb new file mode 100644 index 000000000..ef2be0f65 --- /dev/null +++ b/app/views/mailer/news_comment_added.html.erb @@ -0,0 +1,5 @@ +

<%= link_to(h(@news.title), @news_url) %>

+ +

<%= l(:text_user_wrote, :value => h(@comment.author)) %>

+ +<%= textilizable @comment, :comments, :only_path => false %> diff --git a/app/views/mailer/news_comment_added.text.html.rhtml b/app/views/mailer/news_comment_added.text.html.rhtml deleted file mode 100644 index ef2be0f65..000000000 --- a/app/views/mailer/news_comment_added.text.html.rhtml +++ /dev/null @@ -1,5 +0,0 @@ -

<%= link_to(h(@news.title), @news_url) %>

- -

<%= l(:text_user_wrote, :value => h(@comment.author)) %>

- -<%= textilizable @comment, :comments, :only_path => false %> diff --git a/app/views/mailer/register.html.erb b/app/views/mailer/register.html.erb new file mode 100644 index 000000000..145c3d7c9 --- /dev/null +++ b/app/views/mailer/register.html.erb @@ -0,0 +1,2 @@ +

<%= l(:mail_body_register) %>
+<%= auto_link(@url) %>

diff --git a/app/views/mailer/register.text.html.rhtml b/app/views/mailer/register.text.html.rhtml deleted file mode 100644 index 145c3d7c9..000000000 --- a/app/views/mailer/register.text.html.rhtml +++ /dev/null @@ -1,2 +0,0 @@ -

<%= l(:mail_body_register) %>
-<%= auto_link(@url) %>

diff --git a/app/views/mailer/reminder.html.erb b/app/views/mailer/reminder.html.erb new file mode 100644 index 000000000..f011da3e8 --- /dev/null +++ b/app/views/mailer/reminder.html.erb @@ -0,0 +1,9 @@ +

<%= l(:mail_body_reminder, :count => @issues.size, :days => @days) %>

+ + + +

<%= link_to l(:label_issue_view_all), @issues_url %>

diff --git a/app/views/mailer/reminder.text.html.rhtml b/app/views/mailer/reminder.text.html.rhtml deleted file mode 100644 index f011da3e8..000000000 --- a/app/views/mailer/reminder.text.html.rhtml +++ /dev/null @@ -1,9 +0,0 @@ -

<%= l(:mail_body_reminder, :count => @issues.size, :days => @days) %>

- - - -

<%= link_to l(:label_issue_view_all), @issues_url %>

diff --git a/app/views/mailer/test.html.erb b/app/views/mailer/test.html.erb new file mode 100644 index 000000000..25ad20c51 --- /dev/null +++ b/app/views/mailer/test.html.erb @@ -0,0 +1,2 @@ +

This is a test email sent by Redmine.
+Redmine URL: <%= auto_link(@url) %>

diff --git a/app/views/mailer/test.text.html.rhtml b/app/views/mailer/test.text.html.rhtml deleted file mode 100644 index 25ad20c51..000000000 --- a/app/views/mailer/test.text.html.rhtml +++ /dev/null @@ -1,2 +0,0 @@ -

This is a test email sent by Redmine.
-Redmine URL: <%= auto_link(@url) %>

diff --git a/app/views/mailer/wiki_content_added.html.erb b/app/views/mailer/wiki_content_added.html.erb new file mode 100644 index 000000000..160f5730f --- /dev/null +++ b/app/views/mailer/wiki_content_added.html.erb @@ -0,0 +1,3 @@ +

<%= l(:mail_body_wiki_content_added, :id => link_to(h(@wiki_content.page.pretty_title), @wiki_content_url), + :author => h(@wiki_content.author)) %>
+<%=h @wiki_content.comments %>

diff --git a/app/views/mailer/wiki_content_added.text.html.rhtml b/app/views/mailer/wiki_content_added.text.html.rhtml deleted file mode 100644 index 160f5730f..000000000 --- a/app/views/mailer/wiki_content_added.text.html.rhtml +++ /dev/null @@ -1,3 +0,0 @@ -

<%= l(:mail_body_wiki_content_added, :id => link_to(h(@wiki_content.page.pretty_title), @wiki_content_url), - :author => h(@wiki_content.author)) %>
-<%=h @wiki_content.comments %>

diff --git a/app/views/mailer/wiki_content_updated.html.erb b/app/views/mailer/wiki_content_updated.html.erb new file mode 100644 index 000000000..8ef24d1ba --- /dev/null +++ b/app/views/mailer/wiki_content_updated.html.erb @@ -0,0 +1,6 @@ +

<%= l(:mail_body_wiki_content_updated, :id => link_to(h(@wiki_content.page.pretty_title), @wiki_content_url), + :author => h(@wiki_content.author)) %>
+<%=h @wiki_content.comments %>

+ +

<%= l(:label_view_diff) %>:
+<%= link_to h(@wiki_diff_url), @wiki_diff_url %>

diff --git a/app/views/mailer/wiki_content_updated.text.html.rhtml b/app/views/mailer/wiki_content_updated.text.html.rhtml deleted file mode 100644 index 8ef24d1ba..000000000 --- a/app/views/mailer/wiki_content_updated.text.html.rhtml +++ /dev/null @@ -1,6 +0,0 @@ -

<%= l(:mail_body_wiki_content_updated, :id => link_to(h(@wiki_content.page.pretty_title), @wiki_content_url), - :author => h(@wiki_content.author)) %>
-<%=h @wiki_content.comments %>

- -

<%= l(:label_view_diff) %>:
-<%= link_to h(@wiki_diff_url), @wiki_diff_url %>