submission_comment_for_teacher.email.html.mustache 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <% define_content :link do %>
  2. <%= polymorphic_url([asset.submission.assignment.context, asset.submission.assignment, :submission], id: asset.submission.user) %>
  3. <% end %>
  4. <% define_content :subject do %>
  5. <%= t :subject, "Submission Comment: %{user}, %{assignment}, %{context}", :user => asset.submission.user.name, :assignment => asset.submission.assignment.title, :context => asset.submission.assignment.context.name %>
  6. <% end %>
  7. <% define_content :footer_link do %>
  8. <a href="<%= content(:link) %>">
  9. <%= t :review_submission, "Click here to review the submission" %>
  10. </a>
  11. <% end %>
  12. <p><%= t :body, "%{author} just made a new comment on the submission for %{user} for %{assignment}",
  13. :author => (asset.author_name || t(:someone, "Someone")),
  14. :user => asset.submission.user.short_name,
  15. :assignment => asset.submission.assignment.title %></p>
  16. <%= format_message(asset.comment).first %>
  17. <% if avatar_enabled? %>
  18. <table border="0" style="border-collapse: collapse">
  19. <tr height="30px">
  20. <td></td>
  21. </tr>
  22. <tr >
  23. <td align="left" width="50" style="width: 50px"><img style="border-radius: 50px; height: 50px; width: 50px;" height="50" width="50" src="<%=author_avatar_url%>" alt="<%=author_short_name%>"> </td>
  24. <td width="10"></td>
  25. <td>
  26. <table border="0" style="font-size: 14px; color: #444444; background-color: #ffffff; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif';" valign="top" align="left">
  27. <tr>
  28. <td valign="bottom" align="left">
  29. <b><%= author_short_name%></b>
  30. </td>
  31. </tr>
  32. <tr>
  33. <td valign="top" align="left">
  34. <a href="mailto:<%= author_email_address %>">
  35. <%= author_email_address%>
  36. </a>
  37. </td>
  38. </tr>
  39. </table>
  40. </td>
  41. </tr>
  42. </table>
  43. <% else %>
  44. <p height="30px"></p>
  45. <p>
  46. <b><%= author_short_name%></b>
  47. <br/>
  48. <a href="mailto:<%= author_email_address %>">
  49. <%= author_email_address%>
  50. </a>
  51. </p>
  52. <% end %>
  53. <% if asset.media_comment? %>
  54. <p><%= t "#messages.conversation_message.email.audio_comment", "This message includes media comments. To listen or reply, click the link below:" %></p>
  55. <% else %>
  56. <p><%= t :link_message, "You can review the submission details by clicking the link below:" %></p>
  57. <% end %>
  58. <% unless asset.attachments.empty? %>
  59. <div style="margin-top: 20px; padding: 10px; border: 1px solid #f1f1f1; background-color: #f3f3f3;">
  60. <p style="margin: 0px;"><%= t "#messages.conversation_message.email.attached_files", "Attached Files:" %></p>
  61. <ul style="padding-left: 20px;">
  62. <% asset.attachments.each do |attachment| %>
  63. <li><a href="<%= file_download_url(attachment) %>"><%= attachment.display_name %> - <%= attachment.readable_size %></a></li>
  64. <% end %>
  65. </ul>
  66. </div>
  67. <% end %>