summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-11 17:12:34 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-11 17:12:34 +0000
commit74ed14f8a2fb93fc940b68ca76737686d1054d9b (patch)
treeb4ec3f516c83121f2c146d6e46077784cae3cce1 /app
parent6db28b3899e0ec275f58bbd274a9112e14f78245 (diff)
downloadredmine-74ed14f8a2fb93fc940b68ca76737686d1054d9b.tar.gz
redmine-74ed14f8a2fb93fc940b68ca76737686d1054d9b.zip
Notifications about issues (add/edit) are now sent in plain text and html.
Removed lang specific strings in the corresponding mail templates, so that there is only one template for all languages. git-svn-id: http://redmine.rubyforge.org/svn/trunk@723 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/mailer.rb1
-rw-r--r--app/views/mailer/_issue_text_html.rhtml10
-rw-r--r--app/views/mailer/_issue_text_plain.rhtml (renamed from app/views/mailer/_issue.rhtml)6
-rw-r--r--app/views/mailer/issue_add.rhtml3
-rw-r--r--app/views/mailer/issue_add.text.html.rhtml3
-rw-r--r--app/views/mailer/issue_add.text.plain.rhtml3
-rw-r--r--app/views/mailer/issue_add_bg.rhtml3
-rw-r--r--app/views/mailer/issue_add_de.rhtml3
-rw-r--r--app/views/mailer/issue_add_fr.rhtml3
-rw-r--r--app/views/mailer/issue_add_it.rhtml3
-rw-r--r--app/views/mailer/issue_add_ja.rhtml3
-rw-r--r--app/views/mailer/issue_add_nl.rhtml3
-rw-r--r--app/views/mailer/issue_add_pt-br.rhtml3
-rw-r--r--app/views/mailer/issue_add_pt.rhtml3
-rw-r--r--app/views/mailer/issue_add_sv.rhtml3
-rw-r--r--app/views/mailer/issue_add_zh.rhtml3
-rw-r--r--app/views/mailer/issue_edit.text.html.rhtml10
-rw-r--r--app/views/mailer/issue_edit.text.plain.rhtml (renamed from app/views/mailer/issue_edit.rhtml)4
-rw-r--r--app/views/mailer/issue_edit_bg.rhtml8
-rw-r--r--app/views/mailer/issue_edit_de.rhtml8
-rw-r--r--app/views/mailer/issue_edit_fr.rhtml8
-rw-r--r--app/views/mailer/issue_edit_it.rhtml8
-rw-r--r--app/views/mailer/issue_edit_ja.rhtml8
-rw-r--r--app/views/mailer/issue_edit_nl.rhtml8
-rw-r--r--app/views/mailer/issue_edit_pt-br.rhtml8
-rw-r--r--app/views/mailer/issue_edit_pt.rhtml8
-rw-r--r--app/views/mailer/issue_edit_sv.rhtml8
-rw-r--r--app/views/mailer/issue_edit_zh.rhtml8
28 files changed, 32 insertions, 118 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index 5679ca284..b3ed16fc2 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -16,6 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class Mailer < ActionMailer::Base
+ helper ApplicationHelper
helper IssuesHelper
def account_information(user, password)
diff --git a/app/views/mailer/_issue_text_html.rhtml b/app/views/mailer/_issue_text_html.rhtml
new file mode 100644
index 000000000..33527a145
--- /dev/null
+++ b/app/views/mailer/_issue_text_html.rhtml
@@ -0,0 +1,10 @@
+<%= link_to "#{issue.tracker.name} ##{issue.id}", :only_path => false, :host => Setting.host_name, :controller => 'issues', :action => 'show', :id => issue %>:
+<%= issue.subject %>
+
+<ul>
+ <li><%=l(:field_author)%>: <%= issue.author.name %></li>
+ <li><%=l(:field_assigned_to)%>: <%= issue.assigned_to ? issue.assigned_to.name : "-" %></li>
+ <li><%=l(:field_status)%>: <%= issue.status.name %></li>
+</ul>
+
+<%= textilizable(issue.description) %>
diff --git a/app/views/mailer/_issue.rhtml b/app/views/mailer/_issue_text_plain.rhtml
index bd438f289..6c23fcd14 100644
--- a/app/views/mailer/_issue.rhtml
+++ b/app/views/mailer/_issue_text_plain.rhtml
@@ -1,8 +1,8 @@
-<%=l(:label_issue)%> #<%= issue.id %> - <%= issue.subject %>
+<%= "#{issue.tracker.name} ##{issue.id}: #{issue.subject}" %>
+<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'issues', :action => 'show', :id => issue %>
+
<%=l(:field_author)%>: <%= issue.author.name %>
<%=l(:field_assigned_to)%>: <%= issue.assigned_to ? issue.assigned_to.name : "-" %>
<%=l(:field_status)%>: <%= issue.status.name %>
<%= issue.description %>
-
-<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'issues', :action => 'show', :id => issue %>
diff --git a/app/views/mailer/issue_add.rhtml b/app/views/mailer/issue_add.rhtml
deleted file mode 100644
index 823de2cef..000000000
--- a/app/views/mailer/issue_add.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-Issue #<%= @issue.id %> has been reported.
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_add.text.html.rhtml b/app/views/mailer/issue_add.text.html.rhtml
new file mode 100644
index 000000000..a7ef8ece8
--- /dev/null
+++ b/app/views/mailer/issue_add.text.html.rhtml
@@ -0,0 +1,3 @@
+<%= l(:text_issue_added, "##{@issue.id}") %>
+<hr />
+<%= render :file => "_issue_text_html", :use_full_path => true, :locals => { :issue => @issue } %>
diff --git a/app/views/mailer/issue_add.text.plain.rhtml b/app/views/mailer/issue_add.text.plain.rhtml
new file mode 100644
index 000000000..a9aa13b3d
--- /dev/null
+++ b/app/views/mailer/issue_add.text.plain.rhtml
@@ -0,0 +1,3 @@
+<%= l(:text_issue_added, "##{@issue.id}") %>
+----------------------------------------
+<%= render :file => "_issue_text_plain", :use_full_path => true, :locals => { :issue => @issue } %>
diff --git a/app/views/mailer/issue_add_bg.rhtml b/app/views/mailer/issue_add_bg.rhtml
deleted file mode 100644
index b7f0ce741..000000000
--- a/app/views/mailer/issue_add_bg.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-Публикувана е нова задача с номер #<%= @issue.id %>.
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_add_de.rhtml b/app/views/mailer/issue_add_de.rhtml
deleted file mode 100644
index ddbf37273..000000000
--- a/app/views/mailer/issue_add_de.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-Ticket Nr. #<%= @issue.id %> wurde erstellt.
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_add_fr.rhtml b/app/views/mailer/issue_add_fr.rhtml
deleted file mode 100644
index 458188782..000000000
--- a/app/views/mailer/issue_add_fr.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-Une nouvelle demande (#<%= @issue.id %>) a été soumise.
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_add_it.rhtml b/app/views/mailer/issue_add_it.rhtml
deleted file mode 100644
index 9846f4660..000000000
--- a/app/views/mailer/issue_add_it.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-E' stata segnalata l'anomalia #<%= @issue.id %>.
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_add_ja.rhtml b/app/views/mailer/issue_add_ja.rhtml
deleted file mode 100644
index 14d9258ab..000000000
--- a/app/views/mailer/issue_add_ja.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-問題 #<%= @issue.id %> が報告されました。
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_add_nl.rhtml b/app/views/mailer/issue_add_nl.rhtml
deleted file mode 100644
index 23ee2d563..000000000
--- a/app/views/mailer/issue_add_nl.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-Issue #<%= @issue.id %> is gerapporteerd.
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_add_pt-br.rhtml b/app/views/mailer/issue_add_pt-br.rhtml
deleted file mode 100644
index 0a13facda..000000000
--- a/app/views/mailer/issue_add_pt-br.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-Tarefa #<%= @issue.id %> foi incluída.
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_add_pt.rhtml b/app/views/mailer/issue_add_pt.rhtml
deleted file mode 100644
index 0a13facda..000000000
--- a/app/views/mailer/issue_add_pt.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-Tarefa #<%= @issue.id %> foi incluída.
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_add_sv.rhtml b/app/views/mailer/issue_add_sv.rhtml
deleted file mode 100644
index c25cc9b6f..000000000
--- a/app/views/mailer/issue_add_sv.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-Brist #<%= @issue.id %> har rapporterats.
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_add_zh.rhtml b/app/views/mailer/issue_add_zh.rhtml
deleted file mode 100644
index f3e8f96ce..000000000
--- a/app/views/mailer/issue_add_zh.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
- #<%= @issue.id %> ѱ
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_edit.text.html.rhtml b/app/views/mailer/issue_edit.text.html.rhtml
new file mode 100644
index 000000000..59c767c9f
--- /dev/null
+++ b/app/views/mailer/issue_edit.text.html.rhtml
@@ -0,0 +1,10 @@
+<%= l(:text_issue_updated, "##{@issue.id}") %><br />
+<em><%= @journal.user.name %></em>
+<ul>
+<% for detail in @journal.details %>
+ <li><%= show_detail(detail, true) %></li>
+<% end %>
+</ul>
+<%= textilizable(@journal.notes) %>
+<hr />
+<%= render :file => "_issue_text_html", :use_full_path => true, :locals => { :issue => @issue } %>
diff --git a/app/views/mailer/issue_edit.rhtml b/app/views/mailer/issue_edit.text.plain.rhtml
index 7a9ca1634..4431d46d5 100644
--- a/app/views/mailer/issue_edit.rhtml
+++ b/app/views/mailer/issue_edit.text.plain.rhtml
@@ -1,8 +1,8 @@
-Issue #<%= @issue.id %> has been updated.
+<%= l(:text_issue_updated, "##{@issue.id}") %>
<%= @journal.user.name %>
<% for detail in @journal.details %>
<%= show_detail(detail, true) %>
<% end %>
<%= @journal.notes if @journal.notes? %>
----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
+<%= render :file => "_issue_text_plain", :use_full_path => true, :locals => { :issue => @issue } %>
diff --git a/app/views/mailer/issue_edit_bg.rhtml b/app/views/mailer/issue_edit_bg.rhtml
deleted file mode 100644
index 5807c0e76..000000000
--- a/app/views/mailer/issue_edit_bg.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-Задача #<%= @issue.id %> е обновена.
-<%= @journal.user.name %>
-<% for detail in @journal.details %>
-<%= show_detail(detail, true) %>
-<% end %>
-<%= @journal.notes if @journal.notes? %>
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_edit_de.rhtml b/app/views/mailer/issue_edit_de.rhtml
deleted file mode 100644
index d1f418c3d..000000000
--- a/app/views/mailer/issue_edit_de.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-Ticket #<%= @issue.id %> wurde aktualisiert.
-<%= @journal.user.name %>
-<% for detail in @journal.details %>
-<%= show_detail(detail, true) %>
-<% end %>
-<%= @journal.notes if @journal.notes? %>
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_edit_fr.rhtml b/app/views/mailer/issue_edit_fr.rhtml
deleted file mode 100644
index ecea9e274..000000000
--- a/app/views/mailer/issue_edit_fr.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-La demande #<%= @issue.id %> a été mise à jour.
-<%= @journal.user.name %>
-<% for detail in @journal.details %>
-<%= show_detail(detail, true) %>
-<% end %>
-<%= @journal.notes if @journal.notes? %>
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_edit_it.rhtml b/app/views/mailer/issue_edit_it.rhtml
deleted file mode 100644
index 4d2abb731..000000000
--- a/app/views/mailer/issue_edit_it.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-L'anomalia #<%= @issue.id %> e' stata aggiornata.
-<%= @journal.user.name %>
-<% for detail in @journal.details %>
-<%= show_detail(detail, true) %>
-<% end %>
-<%= @journal.notes if @journal.notes? %>
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_edit_ja.rhtml b/app/views/mailer/issue_edit_ja.rhtml
deleted file mode 100644
index d3b1b520b..000000000
--- a/app/views/mailer/issue_edit_ja.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-問題 #<%= @issue.id %> が更新されました。
-<%= @journal.user.name %>
-<% for detail in @journal.details %>
-<%= show_detail(detail, true) %>
-<% end %>
-<%= @journal.notes if @journal.notes? %>
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_edit_nl.rhtml b/app/views/mailer/issue_edit_nl.rhtml
deleted file mode 100644
index 668ec1ba1..000000000
--- a/app/views/mailer/issue_edit_nl.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-Issue #<%= @issue.id %> is gewijzigd.
-<%= @journal.user.name %>
-<% for detail in @journal.details %>
-<%= show_detail(detail, true) %>
-<% end %>
-<%= @journal.notes if @journal.notes? %>
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_edit_pt-br.rhtml b/app/views/mailer/issue_edit_pt-br.rhtml
deleted file mode 100644
index 39108daac..000000000
--- a/app/views/mailer/issue_edit_pt-br.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-Tarefa #<%= @issue.id %> foi alterada.
-<%= @journal.user.name %>
-<% for detail in @journal.details %>
-<%= show_detail(detail, true) %>
-<% end %>
-<%= @journal.notes if @journal.notes? %>
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_edit_pt.rhtml b/app/views/mailer/issue_edit_pt.rhtml
deleted file mode 100644
index 39108daac..000000000
--- a/app/views/mailer/issue_edit_pt.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-Tarefa #<%= @issue.id %> foi alterada.
-<%= @journal.user.name %>
-<% for detail in @journal.details %>
-<%= show_detail(detail, true) %>
-<% end %>
-<%= @journal.notes if @journal.notes? %>
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_edit_sv.rhtml b/app/views/mailer/issue_edit_sv.rhtml
deleted file mode 100644
index a368dad40..000000000
--- a/app/views/mailer/issue_edit_sv.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-Brist #<%= @issue.id %> har uppdaterats.
-<%= @journal.user.name %>
-<% for detail in @journal.details %>
-<%= show_detail(detail, true) %>
-<% end %>
-<%= @journal.notes if @journal.notes? %>
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/app/views/mailer/issue_edit_zh.rhtml b/app/views/mailer/issue_edit_zh.rhtml
deleted file mode 100644
index 1d543edd6..000000000
--- a/app/views/mailer/issue_edit_zh.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
- #<%= @issue.id %> Ѹ¡
-<%= @journal.user.name %>
-<% for detail in @journal.details %>
-<%= show_detail(detail, true) %>
-<% end %>
-<%= @journal.notes if @journal.notes? %>
-----------------------------------------
-<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file