@@ -25,6 +25,7 hr { | |||||
25 | </style> |
|
25 | </style> | |
26 | </head> |
|
26 | </head> | |
27 | <body> |
|
27 | <body> | |
|
28 | <span class="header"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_header) %></span> | |||
28 | <%= yield %> |
|
29 | <%= yield %> | |
29 | <hr /> |
|
30 | <hr /> | |
30 | <span class="footer"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_footer) %></span> |
|
31 | <span class="footer"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_footer) %></span> |
@@ -1,3 +1,4 | |||||
|
1 | <%= Setting.emails_header %> | |||
1 | <%= yield %> |
|
2 | <%= yield %> | |
2 | -- |
|
3 | -- | |
3 | <%= Setting.emails_footer %> |
|
4 | <%= Setting.emails_footer %> |
@@ -21,6 +21,10 | |||||
21 | <p><%= check_all_links('notified_events') %></p> |
|
21 | <p><%= check_all_links('notified_events') %></p> | |
22 | </fieldset> |
|
22 | </fieldset> | |
23 |
|
23 | |||
|
24 | <fieldset class="box"><legend><%= l(:setting_emails_header) %></legend> | |||
|
25 | <%= setting_text_area :emails_header, :label => false, :class => 'wiki-edit', :rows => 5 %> | |||
|
26 | </fieldset> | |||
|
27 | ||||
24 | <fieldset class="box"><legend><%= l(:setting_emails_footer) %></legend> |
|
28 | <fieldset class="box"><legend><%= l(:setting_emails_footer) %></legend> | |
25 | <%= setting_text_area :emails_footer, :label => false, :class => 'wiki-edit', :rows => 5 %> |
|
29 | <%= setting_text_area :emails_footer, :label => false, :class => 'wiki-edit', :rows => 5 %> | |
26 | </fieldset> |
|
30 | </fieldset> |
@@ -325,6 +325,7 en: | |||||
325 | setting_issue_list_default_columns: Default columns displayed on the issue list |
|
325 | setting_issue_list_default_columns: Default columns displayed on the issue list | |
326 | setting_repositories_encodings: Repositories encodings |
|
326 | setting_repositories_encodings: Repositories encodings | |
327 | setting_commit_logs_encoding: Commit messages encoding |
|
327 | setting_commit_logs_encoding: Commit messages encoding | |
|
328 | setting_emails_header: Emails header | |||
328 | setting_emails_footer: Emails footer |
|
329 | setting_emails_footer: Emails footer | |
329 | setting_protocol: Protocol |
|
330 | setting_protocol: Protocol | |
330 | setting_per_page_options: Objects per page options |
|
331 | setting_per_page_options: Objects per page options |
@@ -186,3 +186,5 rest_api_enabled: | |||||
186 | default: 0 |
|
186 | default: 0 | |
187 | default_notification_option: |
|
187 | default_notification_option: | |
188 | default: 'only_my_events' |
|
188 | default: 'only_my_events' | |
|
189 | emails_header: | |||
|
190 | default: '' |
@@ -393,4 +393,21 class MailerTest < ActiveSupport::TestCase | |||||
393 | # should restore perform_deliveries |
|
393 | # should restore perform_deliveries | |
394 | assert ActionMailer::Base.perform_deliveries |
|
394 | assert ActionMailer::Base.perform_deliveries | |
395 | end |
|
395 | end | |
|
396 | ||||
|
397 | context "layout" do | |||
|
398 | should "include the emails_header" do | |||
|
399 | with_settings(:emails_header => "*Header content*") do | |||
|
400 | assert Mailer.deliver_test(User.find(1)) | |||
|
401 | ||||
|
402 | assert_select_email do | |||
|
403 | assert_select ".header" do | |||
|
404 | assert_select "strong", :text => "Header content" | |||
|
405 | end | |||
|
406 | end | |||
|
407 | end | |||
|
408 | ||||
|
409 | end | |||
|
410 | ||||
|
411 | end | |||
|
412 | ||||
396 | end |
|
413 | end |
General Comments 0
You need to be logged in to leave comments.
Login now