2016-10-05 16:52:27 +08:00
|
|
|
<p>Hello <%= @user.name %>!</p>
|
|
|
|
|
2016-10-07 15:45:30 +08:00
|
|
|
<p><%= I18n.t("notifications.email_title") %></p>
|
2016-10-05 16:52:27 +08:00
|
|
|
|
|
|
|
<p>Type: <%= I18n.t("notifications.types.#{@notification.type_of}") %></p>
|
|
|
|
|
2017-02-10 22:13:33 +08:00
|
|
|
<p>
|
2017-03-24 19:10:07 +08:00
|
|
|
<% if @notification.system_message? || @notification.deliver? %>
|
2017-02-10 22:13:33 +08:00
|
|
|
<% # We assume the system notification is clean %>
|
|
|
|
<%= @notification.title.html_safe %>
|
|
|
|
<% else %>
|
|
|
|
<%= sanitize_input(prepend_server_url_to_links(@notification.title)) %>
|
|
|
|
<% end %>
|
|
|
|
</p>
|
2016-10-05 16:52:27 +08:00
|
|
|
|
2017-02-10 22:13:33 +08:00
|
|
|
<p>
|
|
|
|
<% if @notification.system_message? %>
|
|
|
|
<% # We assume the system notification is clean %>
|
|
|
|
<%= @notification.message.html_safe %>
|
2017-03-24 19:10:07 +08:00
|
|
|
<% elsif @notification.deliver? %>
|
|
|
|
<% # work around the problem with inserting the link of zipExport %>
|
|
|
|
<% zip_id = /data-id='(\d*)'/.match(@notification.message)[1] %>
|
|
|
|
<%= @notification.message.gsub(/href='.+'/, "href='#{zip_exports_download_url(zip_id)}'").html_safe %>
|
2017-02-10 22:13:33 +08:00
|
|
|
<% else %>
|
|
|
|
<%= sanitize_input(prepend_server_url_to_links(@notification.message)) %>
|
|
|
|
<% end %>
|
|
|
|
</p>
|