mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
ff4bbd9437
* Escape sharing info in mail correctly * Localize the shared permissions in the mail * Replace custom method with builtin `to_sentence` * Restructure sentence and use verbs explicitly for better wording in other languages
78 lines
2.6 KiB
Plaintext
78 lines
2.6 KiB
Plaintext
<table>
|
|
<tr>
|
|
<%= placeholder_cell("20px", vertical: false) %>
|
|
</tr>
|
|
</table>
|
|
|
|
<table <%= placeholder_table_styles(width: "100%", style: "width:100%;max-width:700px") %>>
|
|
<tr>
|
|
<%= placeholder_cell("12px", vertical: true) %>
|
|
<td>
|
|
<%
|
|
summary = if @group
|
|
I18n.t("mail.sharing.work_packages.summary.group", user: @sharer, group: @group, role_rights: @role_rights)
|
|
else
|
|
I18n.t("mail.sharing.work_packages.summary.user", user: @sharer, role_rights: @role_rights)
|
|
end
|
|
%>
|
|
|
|
<%= render partial: "mailer/mailer_header",
|
|
locals: {
|
|
user: @shared_with_user,
|
|
summary:,
|
|
button_href: @url,
|
|
button_text: I18n.t(:"mail.sharing.work_packages.open_work_package")
|
|
} %>
|
|
|
|
<%= render layout: "mailer/notification_row",
|
|
locals: {
|
|
work_package: @work_package,
|
|
unique_reasons: [:shared],
|
|
show_count: false,
|
|
notification_url: @url,
|
|
open_in_browser_path: @url
|
|
} do %>
|
|
<table <%= placeholder_table_styles(width: "100%", style: "width:100%;") %>>
|
|
<tr>
|
|
<td style="<%= placeholder_text_styles %>">
|
|
<%
|
|
allowed_actions = to_sentence(
|
|
@allowed_work_package_actions.map { |action| content_tag(:span, action, style: "font-weight: bold") }
|
|
)
|
|
%>
|
|
|
|
<%= t("mail.sharing.work_packages.allowed_actions_html", allowed_actions:) %>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<% end %>
|
|
|
|
<%= render partial: "mailer/notification_settings_table",
|
|
locals: {
|
|
button_url: my_notifications_url(tab: "reminders"),
|
|
button_text: I18n.t(:"mail.notification.settings")
|
|
} %>
|
|
|
|
<% if @shared_with_user.invited? %>
|
|
<table <%= placeholder_table_styles(width: "100%", style: "width:100%;") %>>
|
|
<tr>
|
|
<%= placeholder_cell("20px", vertical: false) %>
|
|
</tr>
|
|
<tr>
|
|
<td style="color: #333333; font-size: 16px;">
|
|
<%= t("mail.sharing.work_packages.create_account", instance: Setting.app_title) %>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<% end %>
|
|
|
|
<table>
|
|
<tr>
|
|
<%= placeholder_cell("40px", vertical: false) %>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<%= placeholder_cell("12px", vertical: true) %>
|
|
</tr>
|
|
</table>
|