Project

General

Profile

Feature #22177 » html-mail-style.patch

Yonghwan SO, 2016-03-11 04:07

View differences:

app/views/layouts/mailer.html.erb
13 13
a:hover, a:active { color: #c61a1a; }
14 14
a.wiki-anchor { display: none; }
15 15
fieldset.attachments {border-width: 1px 0 0 0;}
16
hr {
17
  width: 100%;
18
  height: 1px;
19
  background: #ccc;
20
  border: 0;
21
  margin: 1.2em 0;
22
}
23
span.footer {
24
  font-size: 0.8em;
25
  font-style: italic;
26
}
16
<% if Setting.emails_style.present? -%><%= Setting.emails_style %><% end -%>
27 17
</style>
28 18
</head>
29 19
<body>
30 20
<% if Setting.emails_header.present? -%>
31
<span class="header"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_header).html_safe %></span>
21
<div class="header"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_header).html_safe %></div>
32 22
<% end -%>
23
<div class="mail body">
33 24
<%= yield %>
34
<hr />
25
</div>
35 26
<% if Setting.emails_footer.present? -%>
36
<span class="footer"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_footer).html_safe %></span>
27
<div class="footer"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_footer).html_safe %></div>
37 28
<% end -%>
38 29
</body>
39 30
</html>
app/views/settings/_notifications.html.erb
29 29
<%= setting_text_area :emails_footer, :label => false, :class => 'wiki-edit', :rows => 5 %>
30 30
</fieldset>
31 31

  
32
<fieldset class="box"><legend><%= l(:setting_emails_style) %></legend>
33
<%= setting_text_area :emails_style, :label => false, :class => 'wiki-edit', :rows => 5 %>
34
</fieldset>
35

  
32 36
<div style="float:right;">
33 37
<%= link_to l(:label_send_test_email), test_email_path, :method => :post %>
34 38
</div>
config/locales/ar.yml
1196 1196
    receives notifications.
1197 1197
  mail_body_settings_updated: ! 'The following settings were changed:'
1198 1198
  field_remote_ip: IP address
1199
  setting_emails_style: Custom styles
config/locales/az.yml
1291 1291
    receives notifications.
1292 1292
  mail_body_settings_updated: ! 'The following settings were changed:'
1293 1293
  field_remote_ip: IP address
1294
  setting_emails_style: Custom styles
config/locales/bg.yml
1187 1187
    receives notifications.
1188 1188
  mail_body_settings_updated: ! 'The following settings were changed:'
1189 1189
  field_remote_ip: IP address
1190
  setting_emails_style: Custom styles
config/locales/bs.yml
1209 1209
    receives notifications.
1210 1210
  mail_body_settings_updated: ! 'The following settings were changed:'
1211 1211
  field_remote_ip: IP address
1212
  setting_emails_style: Custom styles
config/locales/ca.yml
1189 1189
    receives notifications.
1190 1190
  mail_body_settings_updated: ! 'The following settings were changed:'
1191 1191
  field_remote_ip: IP address
1192
  setting_emails_style: Custom styles
config/locales/cs.yml
1197 1197
    receives notifications.
1198 1198
  mail_body_settings_updated: ! 'The following settings were changed:'
1199 1199
  field_remote_ip: IP address
1200
  setting_emails_style: Custom styles
config/locales/da.yml
1213 1213
    receives notifications.
1214 1214
  mail_body_settings_updated: ! 'The following settings were changed:'
1215 1215
  field_remote_ip: IP address
1216
  setting_emails_style: Custom styles
config/locales/de.yml
1203 1203
  label_default_values_for_new_users: Standardwerte für neue Benutzer
1204 1204
  error_ldap_bind_credentials: Invalid LDAP Account/Password
1205 1205
  mail_body_settings_updated: ! 'The following settings were changed:'
1206
  setting_emails_style: Custom styles
config/locales/el.yml
1196 1196
    receives notifications.
1197 1197
  mail_body_settings_updated: ! 'The following settings were changed:'
1198 1198
  field_remote_ip: IP address
1199
  setting_emails_style: Custom styles
config/locales/en-GB.yml
1198 1198
    receives notifications.
1199 1199
  mail_body_settings_updated: ! 'The following settings were changed:'
1200 1200
  field_remote_ip: IP address
1201
  setting_emails_style: Custom styles
config/locales/en.yml
1181 1181
  description_date_from: Enter start date
1182 1182
  description_date_to: Enter end date
1183 1183
  text_repository_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed.<br />Once saved, the identifier cannot be changed.'
1184
  setting_emails_style: Custom styles
config/locales/es-PA.yml
1230 1230
    receives notifications.
1231 1231
  mail_body_settings_updated: ! 'The following settings were changed:'
1232 1232
  field_remote_ip: IP address
1233
  setting_emails_style: Custom styles
config/locales/es.yml
1228 1228
    receives notifications.
1229 1229
  mail_body_settings_updated: ! 'The following settings were changed:'
1230 1230
  field_remote_ip: IP address
1231
  setting_emails_style: Custom styles
config/locales/et.yml
1200 1200
    receives notifications.
1201 1201
  mail_body_settings_updated: ! 'The following settings were changed:'
1202 1202
  field_remote_ip: IP address
1203
  setting_emails_style: Custom styles
config/locales/eu.yml
1197 1197
    receives notifications.
1198 1198
  mail_body_settings_updated: ! 'The following settings were changed:'
1199 1199
  field_remote_ip: IP address
1200
  setting_emails_style: Custom styles
config/locales/fa.yml
1197 1197
    receives notifications.
1198 1198
  mail_body_settings_updated: ! 'The following settings were changed:'
1199 1199
  field_remote_ip: IP address
1200
  setting_emails_style: Custom styles
config/locales/fi.yml
1217 1217
    receives notifications.
1218 1218
  mail_body_settings_updated: ! 'The following settings were changed:'
1219 1219
  field_remote_ip: IP address
1220
  setting_emails_style: Custom styles
config/locales/fr.yml
1203 1203
  mail_body_security_notification_notify_disabled: Email address %{value} no longer
1204 1204
    receives notifications.
1205 1205
  field_remote_ip: IP address
1206
  setting_emails_style: Custom styles
config/locales/gl.yml
1204 1204
    receives notifications.
1205 1205
  mail_body_settings_updated: ! 'The following settings were changed:'
1206 1206
  field_remote_ip: IP address
1207
  setting_emails_style: Custom styles
config/locales/he.yml
1201 1201
    receives notifications.
1202 1202
  mail_body_settings_updated: ! 'The following settings were changed:'
1203 1203
  field_remote_ip: IP address
1204
  setting_emails_style: Custom styles
config/locales/hr.yml
1195 1195
    receives notifications.
1196 1196
  mail_body_settings_updated: ! 'The following settings were changed:'
1197 1197
  field_remote_ip: IP address
1198
  setting_emails_style: Custom styles
config/locales/hu.yml
1215 1215
    receives notifications.
1216 1216
  mail_body_settings_updated: ! 'The following settings were changed:'
1217 1217
  field_remote_ip: IP address
1218
  setting_emails_style: Custom styles
config/locales/id.yml
1200 1200
    receives notifications.
1201 1201
  mail_body_settings_updated: ! 'The following settings were changed:'
1202 1202
  field_remote_ip: IP address
1203
  setting_emails_style: Custom styles
config/locales/it.yml
1191 1191
    receives notifications.
1192 1192
  mail_body_settings_updated: ! 'The following settings were changed:'
1193 1193
  field_remote_ip: IP address
1194
  setting_emails_style: Custom styles
config/locales/ja.yml
1209 1209
    receives notifications.
1210 1210
  mail_body_settings_updated: ! 'The following settings were changed:'
1211 1211
  field_remote_ip: IP address
1212
  setting_emails_style: Custom styles
config/locales/ko.yml
1240 1240
    receives notifications.
1241 1241
  mail_body_settings_updated: ! 'The following settings were changed:'
1242 1242
  field_remote_ip: IP address
1243
  setting_emails_style: Custom styles
config/locales/lt.yml
1255 1255
    receives notifications.
1256 1256
  mail_body_settings_updated: ! 'The following settings were changed:'
1257 1257
  field_remote_ip: IP address
1258
  setting_emails_style: Custom styles
config/locales/lv.yml
1190 1190
    receives notifications.
1191 1191
  mail_body_settings_updated: ! 'The following settings were changed:'
1192 1192
  field_remote_ip: IP address
1193
  setting_emails_style: Custom styles
config/locales/mk.yml
1196 1196
    receives notifications.
1197 1197
  mail_body_settings_updated: ! 'The following settings were changed:'
1198 1198
  field_remote_ip: IP address
1199
  setting_emails_style: Custom styles
config/locales/mn.yml
1197 1197
    receives notifications.
1198 1198
  mail_body_settings_updated: ! 'The following settings were changed:'
1199 1199
  field_remote_ip: IP address
1200
  setting_emails_style: Custom styles
config/locales/nl.yml
1175 1175
    receives notifications.
1176 1176
  mail_body_settings_updated: ! 'The following settings were changed:'
1177 1177
  field_remote_ip: IP address
1178
  setting_emails_style: Custom styles
config/locales/no.yml
1186 1186
    receives notifications.
1187 1187
  mail_body_settings_updated: ! 'The following settings were changed:'
1188 1188
  field_remote_ip: IP address
1189
  setting_emails_style: Custom styles
config/locales/pl.yml
1211 1211
    receives notifications.
1212 1212
  mail_body_settings_updated: ! 'The following settings were changed:'
1213 1213
  field_remote_ip: IP address
1214
  setting_emails_style: Custom styles
config/locales/pt-BR.yml
1215 1215
    receives notifications.
1216 1216
  mail_body_settings_updated: ! 'The following settings were changed:'
1217 1217
  field_remote_ip: IP address
1218
  setting_emails_style: Custom styles
config/locales/pt.yml
1198 1198
    receives notifications.
1199 1199
  mail_body_settings_updated: ! 'The following settings were changed:'
1200 1200
  field_remote_ip: IP address
1201
  setting_emails_style: Custom styles
config/locales/ro.yml
1191 1191
    receives notifications.
1192 1192
  mail_body_settings_updated: ! 'The following settings were changed:'
1193 1193
  field_remote_ip: IP address
1194
  setting_emails_style: Custom styles
config/locales/ru.yml
1297 1297
    receives notifications.
1298 1298
  mail_body_settings_updated: ! 'The following settings were changed:'
1299 1299
  field_remote_ip: IP address
1300
  setting_emails_style: Custom styles
config/locales/sk.yml
1186 1186
    receives notifications.
1187 1187
  mail_body_settings_updated: ! 'The following settings were changed:'
1188 1188
  field_remote_ip: IP address
1189
  setting_emails_style: Custom styles
config/locales/sl.yml
1196 1196
    receives notifications.
1197 1197
  mail_body_settings_updated: ! 'The following settings were changed:'
1198 1198
  field_remote_ip: IP address
1199
  setting_emails_style: Custom styles
config/locales/sq.yml
1192 1192
    receives notifications.
1193 1193
  mail_body_settings_updated: ! 'The following settings were changed:'
1194 1194
  field_remote_ip: IP address
1195
  setting_emails_style: Custom styles
config/locales/sr-YU.yml
1198 1198
    receives notifications.
1199 1199
  mail_body_settings_updated: ! 'The following settings were changed:'
1200 1200
  field_remote_ip: IP address
1201
  setting_emails_style: Custom styles
config/locales/sr.yml
1197 1197
    receives notifications.
1198 1198
  mail_body_settings_updated: ! 'The following settings were changed:'
1199 1199
  field_remote_ip: IP address
1200
  setting_emails_style: Custom styles
config/locales/sv.yml
1229 1229
    receives notifications.
1230 1230
  mail_body_settings_updated: ! 'The following settings were changed:'
1231 1231
  field_remote_ip: IP address
1232
  setting_emails_style: Custom styles
config/locales/th.yml
1193 1193
    receives notifications.
1194 1194
  mail_body_settings_updated: ! 'The following settings were changed:'
1195 1195
  field_remote_ip: IP address
1196
  setting_emails_style: Custom styles
config/locales/tr.yml
1203 1203
    receives notifications.
1204 1204
  mail_body_settings_updated: ! 'The following settings were changed:'
1205 1205
  field_remote_ip: IP address
1206
  setting_emails_style: Custom styles
config/locales/uk.yml
1191 1191
    receives notifications.
1192 1192
  mail_body_settings_updated: ! 'The following settings were changed:'
1193 1193
  field_remote_ip: IP address
1194
  setting_emails_style: Custom styles
config/locales/vi.yml
1249 1249
    receives notifications.
1250 1250
  mail_body_settings_updated: ! 'The following settings were changed:'
1251 1251
  field_remote_ip: IP address
1252
  setting_emails_style: Custom styles
config/locales/zh-TW.yml
1270 1270
    receives notifications.
1271 1271
  mail_body_settings_updated: ! 'The following settings were changed:'
1272 1272
  field_remote_ip: IP address
1273
  setting_emails_style: Custom styles
config/locales/zh.yml
1191 1191
    receives notifications.
1192 1192
  mail_body_settings_updated: ! 'The following settings were changed:'
1193 1193
  field_remote_ip: IP address
1194
  setting_emails_style: Custom styles
config/settings.yml
275 275
  default:
276 276
  - '6'
277 277
  - '7'
278
emails_style:
279
  default: |-
280
    .header {
281
      text-align: center;
282
    }
283
    .mail.body {
284
      padding: 1rem 2rem;
285
    }
286
    .footer {
287
      border-top: 1px solid #444; font-size: 0.8em; font-style: italic;
288
    }
    (1-1/1)