canvas-lms/app/messages/enrollment_invitation.email...

64 lines
2.3 KiB
Plaintext

<% define_content :link do %>
<%= course_url(asset.course, invitation: asset.uuid) %>
<% end %>
<% define_content :subject do %>
<%= t :subject, "Course Invitation" %>
<% end %>
<% define_content :footer_link do %>
<a href="<%= content(:link) %>">
<%= t(:link, "Click here to view the course page") %>
</a>
<% end %>
<% email = asset.user.email; login = (asset.user.pseudonym.unique_id rescue "none") %>
<p>
<%=
case asset.type
when 'TeacherEnrollment'
t :body_teacher, "You've been invited to participate in the course, %{course}, as a teacher.", :course => asset.course.name
when 'TaEnrollment'
t :body_ta, "You've been invited to participate in the course, %{course}, as a TA.", :course => asset.course.name
when 'ObserverEnrollment'
t :body_observer, "You've been invited to participate in the course, %{course}, as an observer.", :course => asset.course.name
when 'DesignerEnrollment'
t :body_designer, "You've been invited to participate in the course, %{course}, as a designer.", :course => asset.course.name
else
t :body_student, "You've been invited to participate in the course, %{course}, as a student.", :course => asset.course.name
end
%>
</p>
<table border="0" style="font-size: 14px; color: #444444;
font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif';
border-collapse: collapse;">
<tr>
<td style="padding-right: 10px;"><%= t(:name, 'Name') %>:</td>
<td style="font-weight: bold;"><%= asset.user.name %></td>
</tr>
<tr>
<td style="padding-right: 10px"><%= t(:email, 'Email') %>:</td>
<td style="font-weight: bold;"><%= email %></td>
</tr>
<% if email != login %>
<tr>
<td style="padding-right: 10px;"><%= t(:username, 'Username') %>:</td>
<td style="font-weight: bold;"><%= asset.user.pseudonym.unique_id rescue t(:none, "none") %></td>
</tr>
<% end %>
</table>
<br><br>
<table width="100%" border="0" style="text-align:center;">
<tr>
<td>
<a href="<%= content(:link) %>">
<img src="<%= "#{HostUrl.protocol}://#{HostUrl.context_host(asset_context)}" %>/images/get-started-btn.png" alt="Get Started"/>
</a>
</td>
</tr>
</table>