canvas-lms/app/messages/new_context_group_membershi...

28 lines
1.2 KiB
Plaintext

<% define_content :link do %>
<%= HostUrl.protocol %>://<%= HostUrl.context_host(asset.group.context) %>/<%= asset.group.context.class.to_s.downcase.pluralize %>/<%= asset.group.context_id %>/groups
<% end %>
<% define_content :subject do %>
<%= t :subject, "New Group Membership for %{course_or_account}", :course_or_account => asset.group.context.name %>
<% end %>
<%= t :title, "New Group Membership: %{group_name}", :group_name => asset.group.name %>
<%=
case asset.group.context_type
when 'Account'
t :body_account, "You've been added to a new group for the account %{account}. The name of the group is %{group_name}.", :account => asset.group.context.name, :group_name => asset.group.name
else
t :body_course, "You've been added to a new group for the course %{course}. The name of the group is %{group_name}.", :course => asset.group.context.name, :group_name => asset.group.name
end
%>
<%=
case asset.group.context_type
when 'Account'
t :details_account, "You can see which groups you're a part of for this account by clicking the link below:"
else
t :details_account, "You can see which groups you're a part of for this account by clicking the link below:"
end
%>
<%= content :link %>