60 lines
3.7 KiB
Text
60 lines
3.7 KiB
Text
- placeholders = { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe, project_or_group_name: member_source.human_name, project_or_group: member_source.model_name.singular, br_tag: '<br/>'.html_safe, role: member.human_access.downcase }
|
|
|
|
- experiment('members/invite_email', actor: member) do |experiment_instance|
|
|
- experiment_instance.use do
|
|
%tr
|
|
%td.text-content
|
|
%h2.invite-header
|
|
= s_('InviteEmail|You are invited!')
|
|
%p
|
|
- if member.created_by
|
|
= html_escape(s_("InviteEmail|%{inviter} invited you to join the %{strong_start}%{project_or_group_name}%{strong_end}%{br_tag}%{project_or_group} as a %{role}")) % placeholders.merge({ inviter: (link_to member.created_by.name, user_url(member.created_by)).html_safe })
|
|
- else
|
|
= html_escape(s_("InviteEmail|You are invited to join the %{strong_start}%{project_or_group_name}%{strong_end}%{br_tag}%{project_or_group} as a %{role}")) % placeholders
|
|
%p.invite-actions
|
|
= link_to s_('InviteEmail|Join now'), invite_url(@token, invite_type: Members::InviteEmailExperiment::INVITE_TYPE), class: 'invite-btn-join'
|
|
- experiment_instance.try(:activity) do
|
|
%tr
|
|
%td.text-content{ colspan: 2 }
|
|
%img.mail-avatar{ height: "60", src: avatar_icon_for_user(member.created_by, 60, only_path: false), width: "60", alt: "" }
|
|
%p
|
|
= html_escape(s_("InviteEmail|%{inviter} invited you to join the %{strong_start}%{project_or_group_name}%{strong_end}%{br_tag}%{project_or_group} as a %{role}")) % placeholders.merge({ inviter: (link_to member.created_by.name, user_url(member.created_by)).html_safe })
|
|
%p.invite-actions
|
|
= link_to s_('InviteEmail|Join now'), invite_url(@token, invite_type: Members::InviteEmailExperiment::INVITE_TYPE), class: 'invite-btn-join'
|
|
%tr.border-top
|
|
%td.text-content.mailer-align-left.half-width
|
|
%h4
|
|
= s_('InviteEmail|%{project_or_group} details') % { project_or_group: member_source.model_name.singular.capitalize }
|
|
%ul
|
|
%li
|
|
%div
|
|
%img.mailer-icon{ alt: '', src: image_url("mailers/members/users.png") }
|
|
%span
|
|
- member_count = member_source.members.size
|
|
= n_('%{bold_start}%{count}%{bold_end} member', '%{bold_start}%{count}%{bold_end} members',
|
|
member_count).html_safe % { count: number_with_delimiter(member_count),
|
|
bold_start: '<b>'.html_safe,
|
|
bold_end: '</b>'.html_safe }
|
|
%li
|
|
%div
|
|
%img.mailer-icon{ alt: '', src: image_url("mailers/members/issues.png") }
|
|
%span
|
|
- issue_count = member_source.open_issues_count(member.created_by)
|
|
= n_('%{bold_start}%{count}%{bold_end} issue', '%{bold_start}%{count}%{bold_end} issues',
|
|
issue_count).html_safe % { count: number_with_delimiter(issue_count),
|
|
bold_start: '<b>'.html_safe,
|
|
bold_end: '</b>'.html_safe }
|
|
%li
|
|
%div
|
|
%img.mailer-icon{ alt: '', src: image_url("mailers/members/merge-request-open.png") }
|
|
%span
|
|
- mr_count = member_source.open_merge_requests_count(member.created_by)
|
|
= n_('%{bold_start}%{count}%{bold_end} opened merge request', '%{bold_start}%{count}%{bold_end} opened merge requests',
|
|
mr_count).html_safe % { count: number_with_delimiter(mr_count),
|
|
bold_start: '<b>'.html_safe,
|
|
bold_end: '</b>'.html_safe }
|
|
%td.text-content.mailer-align-left.half-width
|
|
%h4
|
|
= s_("InviteEmail|What's it about?")
|
|
%p
|
|
= invited_to_description(member_source)
|