submission_comment.email.html.mustache 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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}",
  6. :user => submission_comment_submittor(asset, user),
  7. :assignment => asset.submission.assignment.title,
  8. :context => asset.submission.assignment.context.name %>
  9. <% end %>
  10. <% define_content :footer_link do %>
  11. <a href="<%= content(:link) %>">
  12. <%= t :link_message, "Click here to view the comment" %>
  13. </a>
  14. <% end %>
  15. <p><%= t :body, "%{author} just made a new comment on the submission for %{user} for %{assignment}",
  16. :author => submission_comment_author(asset, user),
  17. :user => submission_comment_submittor(asset, user),
  18. :assignment => asset.submission.assignment.title %></p>
  19. <%= format_message(asset.comment).first %>
  20. <% if asset.can_read_author?(user, nil) %>
  21. <% if avatar_enabled? %>
  22. <table border="0" style="border-collapse: collapse">
  23. <tr height="30px">
  24. <td></td>
  25. </tr>
  26. <tr >
  27. <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>
  28. <td width="10"></td>
  29. <td>
  30. <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">
  31. <tr>
  32. <td valign="bottom" align="left">
  33. <b><%= author_short_name%></b>
  34. </td>
  35. </tr>
  36. <tr>
  37. <td valign="top" align="left">
  38. <a href="mailto:<%= author_email_address %>">
  39. <%= author_email_address%>
  40. </a>
  41. </td>
  42. </tr>
  43. </table>
  44. </td>
  45. </tr>
  46. </table>
  47. <% else %>
  48. <p height="30px"></p>
  49. <p>
  50. <b><%= author_short_name%></b>
  51. <br/>
  52. <a href="mailto:<%= author_email_address %>">
  53. <%= author_email_address%>
  54. </a>
  55. </p>
  56. <% end %>
  57. <% end %>
  58. <% if asset.media_comment? %>
  59. <p><%= t "#messages.conversation_message.email.audio_comment", "This message includes media comments. To listen or reply, click the link below:" %></p>
  60. <% elsif IncomingMailProcessor::MailboxAccount.reply_to_enabled %>
  61. <p><%= t :submission_comment_link_message, "You can review the submission details using the link below, or can reply to this comment by responding to this message." %></p>
  62. <% else %>
  63. <p><%= t "You can review the submission details using the link below." %></p>
  64. <% end %>
  65. <% unless asset.attachments.empty? %>
  66. <div style="margin-top: 20px; padding: 10px; border: 1px solid #f1f1f1; background-color: #f3f3f3;">
  67. <p style="margin: 0px;"><%= t "#messages.conversation_message.email.attached_files", "Attached Files:" %></p>
  68. <ul style="padding-left: 20px;">
  69. <% asset.attachments.each do |attachment| %>
  70. <li><a href="<%= file_download_url(attachment) %>"><%= attachment.display_name %> - <%= attachment.readable_size %></a></li>
  71. <% end %>
  72. </ul>
  73. </div>
  74. <% end %>