enrollment_notification.email.html.mustache 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <% define_content :link do %>
  2. <%= course_url(asset.course) %>
  3. <% end %>
  4. <% define_content :subject do %>
  5. <%= t :subject, "Course Enrollment" %>
  6. <% end %>
  7. <% define_content :footer_link do %>
  8. <% if !asset.user.registered? && asset.user.communication_channel %>
  9. <a href="<%= registration_confirmation_url(asset.user.communication_channel.confirmation_code, :host => HostUrl.context_host(asset.course)) %>">
  10. <%= t :complete_registration_link, "Click here to complete registration" %>
  11. </a>
  12. <% else %>
  13. <a href="<%= content(:link) %>">
  14. {{#t}}Click here to view the course page{{/t}}
  15. </a>
  16. <% end %>
  17. <% end %>
  18. <% email = asset.user.email; login = (asset.user.pseudonym.unique_id rescue "none") %>
  19. <% course = "<a href=\"#{content :link}\">#{h asset.course.name}</a>".html_safe %>
  20. <p>
  21. <%= t "You've been enrolled in the course, %{course}. Course role: %{role_type}", :course => asset.course.name, :role_type => asset.readable_role_name %>
  22. </p>
  23. <table border="0" style="font-size: 14px; color: #444444;
  24. font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif';
  25. border-collapse: collapse;">
  26. <tr>
  27. <td style="padding-right: 10px;">{{#t}}Name{{/t}}:</td>
  28. <td style="font-weight: bold;"><%= asset.user.name %></td>
  29. </tr>
  30. <tr>
  31. <td style="padding-right: 10px">{{#t}}Email{{/t}}:</td>
  32. <td style="font-weight: bold;"><%= email %></td>
  33. </tr>
  34. <% if email != login %>
  35. <tr>
  36. <td style="padding-right: 10px;">{{#t}}Username{{/t}}:</td>
  37. <td style="font-weight: bold;"><%= asset.user.pseudonym.unique_id rescue t(:none, "none") %></td>
  38. </tr>
  39. <% end %>
  40. </table>
  41. <br><br>
  42. <table width="100%" border="0" style="text-align:center;">
  43. <tr>
  44. <td>
  45. <a href="<%= content(:link) %>" style="color: #FFFFFF; background-color: #008EE2; padding: 8px 40px; border-radius: 3px; text-decoration: none; font-weight: bold;">
  46. {{#t}}Get Started{{/t}}
  47. </a>
  48. </td>
  49. </tr>
  50. </table>