@@ -0,0 +1,11 | |||
|
1 | <% if @user.auth_source %> | |
|
2 | <p><%= l(:mail_body_account_information_external, @user.auth_source.name) %></p> | |
|
3 | <% else %> | |
|
4 | <p><%= l(:mail_body_account_information) %>:</p> | |
|
5 | <ul> | |
|
6 | <li><%= l(:field_login) %>: <%= @user.login %></li> | |
|
7 | <li><%= l(:field_password) %>: <%= @password %></li> | |
|
8 | </ul> | |
|
9 | <% end %> | |
|
10 | ||
|
11 | <p><%= l(:label_login) %>: <%= auto_link(@login_url) %></p> |
@@ -0,0 +1,6 | |||
|
1 | <% if @user.auth_source %><%= l(:mail_body_account_information_external, @user.auth_source.name) %> | |
|
2 | <% else %><%= l(:mail_body_account_information) %>: | |
|
3 | * <%= l(:field_login) %>: <%= @user.login %> | |
|
4 | * <%= l(:field_password) %>: <%= @password %> | |
|
5 | <% end %> | |
|
6 | <%= l(:label_login) %>: <%= @login_url %> |
@@ -0,0 +1,17 | |||
|
1 | <html> | |
|
2 | <head> | |
|
3 | <style> | |
|
4 | body { font-family: Verdana, sans-serif; font-size: 0.8em; color:#484848; } | |
|
5 | body h1 { font-family: "Trebuchet MS", Verdana, sans-serif; font-size: 1.2em; margin: 0;} | |
|
6 | a, a:link, a:visited{ color: #2A5685; } | |
|
7 | a:hover, a:active{ color: #c61a1a; } | |
|
8 | hr { width: 100%; height: 1px; background: #ccc; border: 0; } | |
|
9 | .footer { font-size: 0.8em; font-style: italic; } | |
|
10 | </style> | |
|
11 | </head> | |
|
12 | <body> | |
|
13 | <%= yield %> | |
|
14 | <hr /> | |
|
15 | <span class="footer"><%= Redmine::WikiFormatting.to_html(Setting.emails_footer) %></span> | |
|
16 | </body> | |
|
17 | </html> |
@@ -20,99 +20,111 class Mailer < ActionMailer::Base | |||
|
20 | 20 | helper IssuesHelper |
|
21 | 21 | helper CustomFieldsHelper |
|
22 | 22 | |
|
23 | def account_information(user, password) | |
|
24 | set_language_if_valid user.language | |
|
25 | recipients user.mail | |
|
26 | from Setting.mail_from | |
|
27 | subject l(:mail_subject_register) | |
|
28 | body :user => user, :password => password | |
|
29 | end | |
|
23 | include ActionController::UrlWriter | |
|
30 | 24 | |
|
31 | 25 | def issue_add(issue) |
|
32 | set_language_if_valid(Setting.default_language) | |
|
33 | @recipients = issue.recipients | |
|
34 | @from = Setting.mail_from | |
|
35 | @subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}" | |
|
36 | @body['issue'] = issue | |
|
26 | recipients issue.recipients | |
|
27 | subject "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}" | |
|
28 | body :issue => issue, | |
|
29 | :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue) | |
|
37 | 30 | end |
|
38 | 31 | |
|
39 | 32 | def issue_edit(journal) |
|
40 | set_language_if_valid(Setting.default_language) | |
|
41 | 33 | issue = journal.journalized |
|
42 |
|
|
|
34 | recipients issue.recipients | |
|
43 | 35 | # Watchers in cc |
|
44 |
|
|
|
45 | @from = Setting.mail_from | |
|
46 | @subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}" | |
|
47 | @body['issue'] = issue | |
|
48 | @body['journal']= journal | |
|
36 | cc(issue.watcher_recipients - @recipients) | |
|
37 | subject "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}" | |
|
38 | body :issue => issue, | |
|
39 | :journal => journal, | |
|
40 | :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue) | |
|
49 | 41 | end |
|
50 | 42 | |
|
51 | 43 | def document_added(document) |
|
52 | set_language_if_valid(Setting.default_language) | |
|
53 | @recipients = document.project.recipients | |
|
54 | @from = Setting.mail_from | |
|
55 | @subject = "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}" | |
|
56 | @body['document'] = document | |
|
44 | recipients document.project.recipients | |
|
45 | subject "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}" | |
|
46 | body :document => document, | |
|
47 | :document_url => url_for(:controller => 'documents', :action => 'show', :id => document) | |
|
57 | 48 | end |
|
58 | 49 | |
|
59 | 50 | def attachments_added(attachments) |
|
60 | set_language_if_valid(Setting.default_language) | |
|
61 | 51 | container = attachments.first.container |
|
62 | url = '' | |
|
63 | 52 | added_to = '' |
|
53 | added_to_url = '' | |
|
64 | 54 | case container.class.name |
|
65 | 55 | when 'Version' |
|
66 |
url = |
|
|
56 | added_to_url = url_for(:controller => 'projects', :action => 'list_files', :id => container.project_id) | |
|
67 | 57 | added_to = "#{l(:label_version)}: #{container.name}" |
|
68 | 58 | when 'Document' |
|
69 |
url = |
|
|
59 | added_to_url = url_for(:controller => 'documents', :action => 'show', :id => container.id) | |
|
70 | 60 | added_to = "#{l(:label_document)}: #{container.title}" |
|
71 | 61 | end |
|
72 |
|
|
|
73 | @from = Setting.mail_from | |
|
74 | @subject = "[#{container.project.name}] #{l(:label_attachment_new)}" | |
|
75 | @body['attachments'] = attachments | |
|
76 | @body['url'] = url | |
|
77 | @body['added_to'] = added_to | |
|
62 | recipients container.project.recipients | |
|
63 | subject "[#{container.project.name}] #{l(:label_attachment_new)}" | |
|
64 | body :attachments => attachments, | |
|
65 | :added_to => added_to, | |
|
66 | :added_to_url => added_to_url | |
|
78 | 67 | end |
|
79 | 68 | |
|
80 | 69 | def news_added(news) |
|
81 | set_language_if_valid(Setting.default_language) | |
|
82 | @recipients = news.project.recipients | |
|
83 | @from = Setting.mail_from | |
|
84 | @subject = "[#{news.project.name}] #{l(:label_news)}: #{news.title}" | |
|
85 | @body['news'] = news | |
|
70 | recipients news.project.recipients | |
|
71 | subject "[#{news.project.name}] #{l(:label_news)}: #{news.title}" | |
|
72 | body :news => news, | |
|
73 | :news_url => url_for(:controller => 'news', :action => 'show', :id => news) | |
|
74 | end | |
|
75 | ||
|
76 | def message_posted(message, recipients) | |
|
77 | recipients(recipients) | |
|
78 | subject "[#{message.board.project.name} - #{message.board.name}] #{message.subject}" | |
|
79 | body :message => message, | |
|
80 | :message_url => url_for(:controller => 'messages', :action => 'show', :board_id => message.board_id, :id => message.root) | |
|
81 | end | |
|
82 | ||
|
83 | def account_information(user, password) | |
|
84 | set_language_if_valid user.language | |
|
85 | recipients user.mail | |
|
86 | subject l(:mail_subject_register) | |
|
87 | body :user => user, | |
|
88 | :password => password, | |
|
89 | :login_url => url_for(:controller => 'account', :action => 'login') | |
|
86 | 90 | end |
|
87 | 91 | |
|
88 | 92 | def lost_password(token) |
|
89 | 93 | set_language_if_valid(token.user.language) |
|
90 |
|
|
|
91 | @from = Setting.mail_from | |
|
92 | @subject = l(:mail_subject_lost_password) | |
|
93 | @body['token'] = token | |
|
94 | recipients token.user.mail | |
|
95 | subject l(:mail_subject_lost_password) | |
|
96 | body :token => token, | |
|
97 | :url => url_for(:controller => 'account', :action => 'lost_password', :token => token.value) | |
|
94 | 98 | end |
|
95 | 99 | |
|
96 | 100 | def register(token) |
|
97 | 101 | set_language_if_valid(token.user.language) |
|
98 |
|
|
|
99 | @from = Setting.mail_from | |
|
100 | @subject = l(:mail_subject_register) | |
|
101 | @body['token'] = token | |
|
102 | end | |
|
103 | ||
|
104 | def message_posted(message, recipients) | |
|
105 | set_language_if_valid(Setting.default_language) | |
|
106 | @recipients = recipients | |
|
107 | @from = Setting.mail_from | |
|
108 | @subject = "[#{message.board.project.name} - #{message.board.name}] #{message.subject}" | |
|
109 | @body['message'] = message | |
|
102 | recipients token.user.mail | |
|
103 | subject l(:mail_subject_register) | |
|
104 | body :token => token, | |
|
105 | :url => url_for(:controller => 'account', :action => 'register', :token => token.value) | |
|
110 | 106 | end |
|
111 | 107 | |
|
112 | 108 | def test(user) |
|
113 | 109 | set_language_if_valid(user.language) |
|
114 |
|
|
|
115 | @from = Setting.mail_from | |
|
116 | @subject = 'Redmine' | |
|
110 | recipients user.mail | |
|
111 | subject 'Redmine test' | |
|
112 | body :url => url_for(:controller => 'welcome') | |
|
113 | end | |
|
114 | ||
|
115 | private | |
|
116 | def initialize_defaults(method_name) | |
|
117 | super | |
|
118 | set_language_if_valid Setting.default_language | |
|
119 | from Setting.mail_from | |
|
120 | default_url_options[:host] = Setting.host_name | |
|
121 | default_url_options[:protocol] = Setting.protocol | |
|
122 | end | |
|
123 | ||
|
124 | # Renders a message with the corresponding layout | |
|
125 | def render_message(method_name, body) | |
|
126 | layout = method_name.match(%r{text\.html\.(rhtml|rxml)}) ? 'layout.text.html.rhtml' : 'layout.text.plain.rhtml' | |
|
127 | body[:content_for_layout] = render(:file => method_name, :body => body) | |
|
128 | ActionView::Base.new(File.join(template_root, 'mailer'), body, self).render(:file => layout) | |
|
117 | 129 | end |
|
118 | 130 | end |
@@ -1,5 +1,4 | |||
|
1 | <%= link_to "#{issue.tracker.name} ##{issue.id}", :only_path => false, :host => Setting.host_name, :controller => 'issues', :action => 'show', :id => issue %>: | |
|
2 | <%= issue.subject %> | |
|
1 | <h1><%= link_to "#{issue.tracker.name} ##{issue.id}: #{issue.subject}", issue_url %></h1> | |
|
3 | 2 | |
|
4 | 3 | <ul> |
|
5 | 4 | <li><%=l(:field_author)%>: <%= issue.author %></li> |
@@ -1,5 +1,5 | |||
|
1 | 1 | <%= "#{issue.tracker.name} ##{issue.id}: #{issue.subject}" %> |
|
2 | <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'issues', :action => 'show', :id => issue %> | |
|
2 | <%= issue_url %> | |
|
3 | 3 | |
|
4 | 4 | <%=l(:field_author)%>: <%= issue.author %> |
|
5 | 5 | <%=l(:field_status)%>: <%= issue.status %> |
@@ -1,7 +1,5 | |||
|
1 | <%= link_to @added_to, @url %><br /> | |
|
1 | <%= link_to @added_to, @added_to_url %><br /> | |
|
2 | 2 | |
|
3 | 3 | <ul><% @attachments.each do |attachment | %> |
|
4 | 4 | <li><%= attachment.filename %></li> |
|
5 | 5 | <% end %></ul> |
|
6 | <hr /> | |
|
7 | <small><em><%= textilizable Setting.emails_footer %></em></small> |
@@ -1,6 +1,4 | |||
|
1 | 1 | <%= @added_to %><% @attachments.each do |attachment | %> |
|
2 | 2 | - <%= attachment.filename %><% end %> |
|
3 | 3 | |
|
4 |
<%= |
|
|
5 | ---------------------------------------- | |
|
6 | <%= Setting.emails_footer %> | |
|
4 | <%= @added_to_url %> |
@@ -1,6 +1,3 | |||
|
1 | <%= link_to @document.title, :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %> | |
|
2 | (<%= @document.category.name %>)<br /> | |
|
1 | <%= link_to @document.title, @document_url %> (<%= @document.category.name %>)<br /> | |
|
3 | 2 | <br /> |
|
4 | 3 | <%= textilizable(@document.description) %> |
|
5 | <hr /> | |
|
6 | <small><em><%= textilizable Setting.emails_footer %></em></small> |
@@ -1,6 +1,4 | |||
|
1 | 1 | <%= @document.title %> (<%= @document.category.name %>) |
|
2 | <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'documents', :action => 'show', :id => @document %> | |
|
2 | <%= @document_url %> | |
|
3 | 3 | |
|
4 | 4 | <%= @document.description %> |
|
5 | ---------------------------------------- | |
|
6 | <%= Setting.emails_footer %> |
@@ -1,5 +1,3 | |||
|
1 | 1 | <%= l(:text_issue_added, "##{@issue.id}") %> |
|
2 | 2 | <hr /> |
|
3 | <%= render :file => "_issue_text_html", :use_full_path => true, :locals => { :issue => @issue } %> | |
|
4 | <hr /> | |
|
5 | <small><em><%= textilizable Setting.emails_footer %></em></small> | |
|
3 | <%= render :file => "_issue_text_html", :use_full_path => true, :locals => { :issue => @issue, :issue_url => @issue_url } %> |
@@ -1,5 +1,3 | |||
|
1 | 1 | <%= l(:text_issue_added, "##{@issue.id}") %> |
|
2 | 2 | ---------------------------------------- |
|
3 | <%= render :file => "_issue_text_plain", :use_full_path => true, :locals => { :issue => @issue } %> | |
|
4 | ---------------------------------------- | |
|
5 | <%= Setting.emails_footer %> | |
|
3 | <%= render :file => "_issue_text_plain", :use_full_path => true, :locals => { :issue => @issue, :issue_url => @issue_url } %> |
@@ -7,6 +7,4 | |||
|
7 | 7 | </ul> |
|
8 | 8 | <%= textilizable(@journal.notes) %> |
|
9 | 9 | <hr /> |
|
10 | <%= render :file => "_issue_text_html", :use_full_path => true, :locals => { :issue => @issue } %> | |
|
11 | <hr /> | |
|
12 | <small><em><%= textilizable Setting.emails_footer %></em></small> | |
|
10 | <%= render :file => "_issue_text_html", :use_full_path => true, :locals => { :issue => @issue, :issue_url => @issue_url } %> |
@@ -5,6 +5,4 | |||
|
5 | 5 | <% end %> |
|
6 | 6 | <%= @journal.notes if @journal.notes? %> |
|
7 | 7 | ---------------------------------------- |
|
8 | <%= render :file => "_issue_text_plain", :use_full_path => true, :locals => { :issue => @issue } %> | |
|
9 | ---------------------------------------- | |
|
10 | <%= Setting.emails_footer %> | |
|
8 | <%= render :file => "_issue_text_plain", :use_full_path => true, :locals => { :issue => @issue, :issue_url => @issue_url } %> |
@@ -1,5 +1,3 | |||
|
1 | <%= l(:mail_body_lost_password) %> | |
|
2 | <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'account', :action => 'lost_password', :token => @token.value %> | |
|
3 | ||
|
1 | <%= yield %> | |
|
4 | 2 | ---------------------------------------- |
|
5 | 3 | <%= Setting.emails_footer %> |
@@ -1,6 +1,4 | |||
|
1 | <%=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 /> | |
|
1 | <h1><%=h @message.board.project.name %> - <%=h @message.board.name %>: <%= link_to @message.subject, @message_url %></h1> | |
|
2 | 2 | <em><%= @message.author.name %></em> |
|
3 | 3 | |
|
4 | 4 | <%= textilizable @message.content %> |
|
5 | <hr /> | |
|
6 | <small><em><%= textilizable Setting.emails_footer %></em></small> |
@@ -1,6 +1,4 | |||
|
1 | <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'messages', :action => 'show', :board_id => @message.board_id, :id => @message.root %> | |
|
1 | <%= @message_url %> | |
|
2 | 2 | <%= @message.author.name %> |
|
3 | 3 | |
|
4 | 4 | <%= @message.content %> |
|
5 | ---------------------------------------- | |
|
6 | <%= Setting.emails_footer %> |
@@ -1,6 +1,4 | |||
|
1 | <%= link_to @news.title, :only_path => false, :host => Setting.host_name, :controller => 'news', :action => 'show', :id => @news %><br /> | |
|
1 | <h1><%= link_to @news.title, @news_url %></h1> | |
|
2 | 2 | <em><%= @news.author.name %></em> |
|
3 | 3 | |
|
4 | 4 | <%= textilizable(@news.description) %> |
|
5 | <hr /> | |
|
6 | <small><em><%= textilizable Setting.emails_footer %></em></small> |
@@ -1,7 +1,5 | |||
|
1 | 1 | <%= @news.title %> |
|
2 | <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'news', :action => 'show', :id => @news %> | |
|
2 | <%= @news_url %> | |
|
3 | 3 | <%= @news.author.name %> |
|
4 | 4 | |
|
5 | 5 | <%= @news.description %> |
|
6 | ---------------------------------------- | |
|
7 | <%= Setting.emails_footer %> |
@@ -1,5 +1,2 | |||
|
1 | 1 | <p>This is a test email sent by Redmine.<br /> |
|
2 | Redmine URL: <%= link_to url_for(:only_path => false, :host => Setting.host_name, :controller => 'welcome'), | |
|
3 | url_for(:only_path => false, :host => Setting.host_name, :controller => 'welcome') %></p> | |
|
4 | <hr /> | |
|
5 | <small><em><%= textilizable Setting.emails_footer %></em></small> | |
|
2 | Redmine URL: <%= auto_link(@url) %></p> |
@@ -1,5 +1,2 | |||
|
1 | 1 | This is a test email sent by Redmine. |
|
2 | Redmine URL: <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'welcome' %> | |
|
3 | ||
|
4 | ---------------------------------------- | |
|
5 | <%= Setting.emails_footer %> | |
|
2 | Redmine URL: <%= @url %> |
@@ -37,6 +37,9 | |||
|
37 | 37 | <p><label><%= l(:setting_host_name) %></label> |
|
38 | 38 | <%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %></p> |
|
39 | 39 | |
|
40 | <p><label><%= l(:setting_protocol) %></label> | |
|
41 | <%= select_tag 'settings[protocol]', options_for_select(['http', 'https'], Setting.protocol) %></p> | |
|
42 | ||
|
40 | 43 | <p><label><%= l(:setting_text_formatting) %></label> |
|
41 | 44 | <%= select_tag 'settings[text_formatting]', options_for_select([[l(:label_none), "0"], ["textile", "textile"]], Setting.text_formatting) %></p> |
|
42 | 45 |
@@ -47,6 +47,8 default_language: | |||
|
47 | 47 | default: en |
|
48 | 48 | host_name: |
|
49 | 49 | default: localhost:3000 |
|
50 | protocol: | |
|
51 | default: http | |
|
50 | 52 | feeds_limit: |
|
51 | 53 | format: int |
|
52 | 54 | default: 15 |
@@ -534,3 +534,6 label_user_mail_option_none: "Only for things I watch or I'm involved in" | |||
|
534 | 534 | setting_emails_footer: Emails footer |
|
535 | 535 | label_float: Float |
|
536 | 536 | button_copy: Copy |
|
537 | mail_body_account_information_external: You can use your "%s" account to log into Redmine. | |
|
538 | mail_body_account_information: Your Redmine account information | |
|
539 | setting_protocol: Protocol |
@@ -534,3 +534,6 label_user_mail_option_none: "Only for things I watch or I'm involved in" | |||
|
534 | 534 | setting_emails_footer: Emails footer |
|
535 | 535 | label_float: Float |
|
536 | 536 | button_copy: Copy |
|
537 | mail_body_account_information_external: You can use your "%s" account to log into Redmine. | |
|
538 | mail_body_account_information: Your Redmine account information | |
|
539 | setting_protocol: Protocol |
@@ -534,3 +534,6 label_user_mail_option_none: "Only for things I watch or I'm involved in" | |||
|
534 | 534 | setting_emails_footer: Emails footer |
|
535 | 535 | label_float: Float |
|
536 | 536 | button_copy: Copy |
|
537 | mail_body_account_information_external: You can use your "%s" account to log into Redmine. | |
|
538 | mail_body_account_information: Your Redmine account information | |
|
539 | setting_protocol: Protocol |
@@ -80,6 +80,8 mail_subject_lost_password: Your Redmine password | |||
|
80 | 80 | mail_body_lost_password: 'To change your Redmine password, click on the following link:' |
|
81 | 81 | mail_subject_register: Redmine account activation |
|
82 | 82 | mail_body_register: 'To activate your Redmine account, click on the following link:' |
|
83 | mail_body_account_information_external: You can use your "%s" account to log into Redmine. | |
|
84 | mail_body_account_information: Your Redmine account information | |
|
83 | 85 | |
|
84 | 86 | gui_validation_error: 1 error |
|
85 | 87 | gui_validation_error_plural: %d errors |
@@ -189,6 +191,7 setting_cross_project_issue_relations: Allow cross-project issue relations | |||
|
189 | 191 | setting_issue_list_default_columns: Default columns displayed on the issue list |
|
190 | 192 | setting_repositories_encodings: Repositories encodings |
|
191 | 193 | setting_emails_footer: Emails footer |
|
194 | setting_protocol: Protocol | |
|
192 | 195 | |
|
193 | 196 | label_user: User |
|
194 | 197 | label_user_plural: Users |
@@ -537,3 +537,6 label_user_mail_option_none: "Only for things I watch or I'm involved in" | |||
|
537 | 537 | setting_emails_footer: Emails footer |
|
538 | 538 | label_float: Float |
|
539 | 539 | button_copy: Copy |
|
540 | mail_body_account_information_external: You can use your "%s" account to log into Redmine. | |
|
541 | mail_body_account_information: Your Redmine account information | |
|
542 | setting_protocol: Protocol |
@@ -80,6 +80,8 mail_subject_lost_password: Votre mot de passe redMine | |||
|
80 | 80 | mail_body_lost_password: 'Pour changer votre mot de passe Redmine, cliquez sur le lien suivant:' |
|
81 | 81 | mail_subject_register: Activation de votre compte redMine |
|
82 | 82 | mail_body_register: 'Pour activer votre compte Redmine, cliquez sur le lien suivant:' |
|
83 | mail_body_account_information_external: Vous pouvez utiliser votre compte "%s" pour vous connecter à Redmine. | |
|
84 | mail_body_account_information: Paramètres de connexion de votre compte Redmine | |
|
83 | 85 | |
|
84 | 86 | gui_validation_error: 1 erreur |
|
85 | 87 | gui_validation_error_plural: %d erreurs |
@@ -189,6 +191,7 setting_cross_project_issue_relations: Autoriser les relations entre demandes de | |||
|
189 | 191 | setting_issue_list_default_columns: Colonnes affichées par défaut sur la liste des demandes |
|
190 | 192 | setting_repositories_encodings: Encodages des dépôts |
|
191 | 193 | setting_emails_footer: Pied-de-page des emails |
|
194 | setting_protocol: Protocole | |
|
192 | 195 | |
|
193 | 196 | label_user: Utilisateur |
|
194 | 197 | label_user_plural: Utilisateurs |
@@ -534,3 +534,6 label_user_mail_option_none: "Only for things I watch or I'm involved in" | |||
|
534 | 534 | setting_emails_footer: Emails footer |
|
535 | 535 | label_float: Float |
|
536 | 536 | button_copy: Copy |
|
537 | mail_body_account_information_external: You can use your "%s" account to log into Redmine. | |
|
538 | mail_body_account_information: Your Redmine account information | |
|
539 | setting_protocol: Protocol |
@@ -534,3 +534,6 label_user_mail_option_none: "Only for things I watch or I'm involved in" | |||
|
534 | 534 | setting_emails_footer: Emails footer |
|
535 | 535 | label_float: Float |
|
536 | 536 | button_copy: Copy |
|
537 | mail_body_account_information_external: You can use your "%s" account to log into Redmine. | |
|
538 | mail_body_account_information: Your Redmine account information | |
|
539 | setting_protocol: Protocol |
@@ -535,3 +535,6 label_user_mail_option_none: "Only for things I watch or I'm involved in" | |||
|
535 | 535 | setting_emails_footer: Emails footer |
|
536 | 536 | label_float: Float |
|
537 | 537 | button_copy: Copy |
|
538 | mail_body_account_information_external: You can use your "%s" account to log into Redmine. | |
|
539 | mail_body_account_information: Your Redmine account information | |
|
540 | setting_protocol: Protocol |
@@ -535,3 +535,6 label_user_mail_option_none: "Only for things I watch or I'm involved in" | |||
|
535 | 535 | setting_emails_footer: Emails footer |
|
536 | 536 | label_float: Float |
|
537 | 537 | button_copy: Copy |
|
538 | mail_body_account_information_external: You can use your "%s" account to log into Redmine. | |
|
539 | mail_body_account_information: Your Redmine account information | |
|
540 | setting_protocol: Protocol |
@@ -534,3 +534,6 label_user_mail_option_none: "Only for things I watch or I'm involved in" | |||
|
534 | 534 | setting_emails_footer: Emails footer |
|
535 | 535 | label_float: Float |
|
536 | 536 | button_copy: Copy |
|
537 | mail_body_account_information_external: Możesz użyć twojego "%s" konta do zalogowania do Redmine. | |
|
538 | mail_body_account_information: Twoje konto w Redmine | |
|
539 | setting_protocol: Protocol |
@@ -534,3 +534,6 label_user_mail_option_none: "Only for things I watch or I'm involved in" | |||
|
534 | 534 | setting_emails_footer: Emails footer |
|
535 | 535 | label_float: Float |
|
536 | 536 | button_copy: Copy |
|
537 | mail_body_account_information_external: You can use your "%s" account to log into Redmine. | |
|
538 | mail_body_account_information: Your Redmine account information | |
|
539 | setting_protocol: Protocol |
@@ -534,3 +534,6 label_user_mail_option_none: "Only for things I watch or I'm involved in" | |||
|
534 | 534 | setting_emails_footer: Emails footer |
|
535 | 535 | label_float: Float |
|
536 | 536 | button_copy: Copy |
|
537 | mail_body_account_information_external: You can use your "%s" account to log into Redmine. | |
|
538 | mail_body_account_information: Your Redmine account information | |
|
539 | setting_protocol: Protocol |
@@ -534,3 +534,6 label_user_mail_option_none: "Only for things I watch or I'm involved in" | |||
|
534 | 534 | setting_emails_footer: Emails footer |
|
535 | 535 | label_float: Float |
|
536 | 536 | button_copy: Copy |
|
537 | mail_body_account_information_external: You can use your "%s" account to log into Redmine. | |
|
538 | mail_body_account_information: Your Redmine account information | |
|
539 | setting_protocol: Protocol |
@@ -80,6 +80,8 mail_subject_lost_password: Vaša redMine lozinka | |||
|
80 | 80 | mail_body_lost_password: 'Da biste izmenili vašu Redmine lozinku, kliknite na sledeći link:' |
|
81 | 81 | mail_subject_register: aktivacija redMine naloga |
|
82 | 82 | mail_body_register: 'Da biste aktivirali vaš Redmine nalog, kliknite na sledeći link:' |
|
83 | mail_body_account_information_external: Mozete koristiti vas "%s" nalog da bi ste se prikljucili na Redmine. | |
|
84 | mail_body_account_information: Informacije o vasem Redmine nalogu | |
|
83 | 85 | |
|
84 | 86 | gui_validation_error: 1 greška |
|
85 | 87 | gui_validation_error_plural: %d grešaka |
@@ -535,3 +537,4 enumeration_doc_categories: Kategorija dokumenata | |||
|
535 | 537 | enumeration_activities: Aktivnosti (praćenje vremena)) |
|
536 | 538 | label_float: Float |
|
537 | 539 | button_copy: Copy |
|
540 | setting_protocol: Protocol |
@@ -535,3 +535,6 label_user_mail_option_none: "Only for things I watch or I'm involved in" | |||
|
535 | 535 | setting_emails_footer: Emails footer |
|
536 | 536 | label_float: Float |
|
537 | 537 | button_copy: Copy |
|
538 | mail_body_account_information_external: You can use your "%s" account to log into Redmine. | |
|
539 | mail_body_account_information: Your Redmine account information | |
|
540 | setting_protocol: Protocol |
@@ -537,3 +537,6 label_user_mail_option_none: "Only for things I watch or I'm involved in" | |||
|
537 | 537 | setting_emails_footer: Emails footer |
|
538 | 538 | label_float: Float |
|
539 | 539 | button_copy: Copy |
|
540 | mail_body_account_information_external: You can use your "%s" account to log into Redmine. | |
|
541 | mail_body_account_information: Your Redmine account information | |
|
542 | setting_protocol: Protocol |
@@ -11,3 +11,16 attachments_001: | |||
|
11 | 11 | filesize: 28 |
|
12 | 12 | filename: error281.txt |
|
13 | 13 | author_id: 2 |
|
14 | attachments_002: | |
|
15 | created_on: 2006-07-19 21:07:27 +02:00 | |
|
16 | downloads: 0 | |
|
17 | content_type: text/plain | |
|
18 | disk_filename: 060719210727_document.txt | |
|
19 | container_id: 1 | |
|
20 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2 | |
|
21 | id: 2 | |
|
22 | container_type: Document | |
|
23 | filesize: 28 | |
|
24 | filename: document.txt | |
|
25 | author_id: 2 | |
|
26 | No newline at end of file |
@@ -18,7 +18,7 | |||
|
18 | 18 | require File.dirname(__FILE__) + '/../test_helper' |
|
19 | 19 | |
|
20 | 20 | class MailerTest < Test::Unit::TestCase |
|
21 | fixtures :projects, :issues, :users, :members, :documents, :attachments, :tokens, :journals, :journal_details, :trackers, :issue_statuses, :enumerations | |
|
21 | fixtures :projects, :issues, :users, :members, :documents, :attachments, :news, :tokens, :journals, :journal_details, :trackers, :issue_statuses, :enumerations | |
|
22 | 22 | |
|
23 | 23 | # test mailer methods for each language |
|
24 | 24 | def test_issue_add |
@@ -37,7 +37,7 class MailerTest < Test::Unit::TestCase | |||
|
37 | 37 | end |
|
38 | 38 | end |
|
39 | 39 | |
|
40 | def test_document_add | |
|
40 | def test_document_added | |
|
41 | 41 | document = Document.find(1) |
|
42 | 42 | GLoc.valid_languages.each do |lang| |
|
43 | 43 | Setting.default_language = lang.to_s |
@@ -45,10 +45,46 class MailerTest < Test::Unit::TestCase | |||
|
45 | 45 | end |
|
46 | 46 | end |
|
47 | 47 | |
|
48 | def test_attachments_added | |
|
49 | attachements = [ Attachment.find_by_container_type('Document') ] | |
|
50 | GLoc.valid_languages.each do |lang| | |
|
51 | Setting.default_language = lang.to_s | |
|
52 | assert Mailer.deliver_attachments_added(attachements) | |
|
53 | end | |
|
54 | end | |
|
55 | ||
|
56 | def test_news_added | |
|
57 | news = News.find(:first) | |
|
58 | GLoc.valid_languages.each do |lang| | |
|
59 | Setting.default_language = lang.to_s | |
|
60 | assert Mailer.deliver_news_added(news) | |
|
61 | end | |
|
62 | end | |
|
63 | ||
|
64 | def test_message_posted | |
|
65 | message = Message.find(:first) | |
|
66 | recipients = ([message.root] + message.root.children).collect {|m| m.author.mail if m.author} | |
|
67 | recipients = recipients.compact.uniq | |
|
68 | GLoc.valid_languages.each do |lang| | |
|
69 | Setting.default_language = lang.to_s | |
|
70 | assert Mailer.deliver_message_posted(message, recipients) | |
|
71 | end | |
|
72 | end | |
|
73 | ||
|
74 | def test_account_information | |
|
75 | user = User.find(:first) | |
|
76 | GLoc.valid_languages.each do |lang| | |
|
77 | user.update_attribute :language, lang.to_s | |
|
78 | user.reload | |
|
79 | assert Mailer.deliver_account_information(user, 'pAsswORd') | |
|
80 | end | |
|
81 | end | |
|
82 | ||
|
48 | 83 | def test_lost_password |
|
49 | 84 | token = Token.find(2) |
|
50 | 85 | GLoc.valid_languages.each do |lang| |
|
51 | 86 | token.user.update_attribute :language, lang.to_s |
|
87 | token.reload | |
|
52 | 88 | assert Mailer.deliver_lost_password(token) |
|
53 | 89 | end |
|
54 | 90 | end |
@@ -57,6 +93,7 class MailerTest < Test::Unit::TestCase | |||
|
57 | 93 | token = Token.find(1) |
|
58 | 94 | GLoc.valid_languages.each do |lang| |
|
59 | 95 | token.user.update_attribute :language, lang.to_s |
|
96 | token.reload | |
|
60 | 97 | assert Mailer.deliver_register(token) |
|
61 | 98 | end |
|
62 | 99 | end |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now