conversation_created.email.html.mustache 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <% define_content :link do %>
  2. <%= conversation_url(asset.conversation_id) %>
  3. <% end %>
  4. <% define_content :user_name do %>
  5. <%= asset.author_short_name_with_shared_contexts(user) rescue t(:unknown_user, "Unknown User") %>
  6. <% end %>
  7. <% define_content :subject do %>
  8. <%= t :subject, "%{user_name}, you just sent a message in Canvas.", :user_name => content(:user_name) %>
  9. <% end %>
  10. <% define_content :footer_link do %>
  11. <a href="<%= content :link %>">
  12. <%= t :view_message, "View this message in Conversations" %>
  13. </a>
  14. <% end %>
  15. <% if asset.conversation.subject.present? %>
  16. <h4>
  17. <%= format_message(asset.conversation.subject).first %>
  18. </h4>
  19. <% end %>
  20. <p>
  21. <%= format_message(asset.body).first %>
  22. </p>
  23. <% if avatar_enabled? %>
  24. <table border="0" style="border-collapse: collapse">
  25. <tr height="30px">
  26. <td></td>
  27. </tr>
  28. <tr >
  29. <td align="left" width="50px" ><img style="border-radius: 50px;" height= 50px width = 50px src= <%=author_avatar_url%> alt=<%=author_short_name%>> </td>
  30. <td width="10"></td>
  31. <td>
  32. <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">
  33. <tr>
  34. <td valign="bottom" align="left">
  35. <b><%= author_short_name%></b>
  36. </td>
  37. </tr>
  38. <tr>
  39. <td valign="top" align="left">
  40. <a href="<%= content :link %>">
  41. <%= author_email_address%>
  42. </a>
  43. </td>
  44. </tr>
  45. </table>
  46. </td>
  47. </tr>
  48. </table>
  49. <% else %>
  50. <p height="30px"></p>
  51. <p>
  52. <b><%= author_short_name%></b>
  53. <br/>
  54. <a href="<%= content :link %>">
  55. <%= author_email_address%>
  56. </a>
  57. </p>
  58. <% end %>
  59. <% if asset.has_media_objects? %>
  60. <p><%= t :audio_comment, "This message includes media comments. To listen or reply, click the link below:" %></p>
  61. <% elsif IncomingMailProcessor::MailboxAccount.reply_to_enabled %>
  62. <p><%= t :reply_to_conversation_message, "You can reply to this message in Canvas by replying directly to this email." %></p>
  63. <% end %>
  64. <% unless asset.attachments.empty? %>
  65. <div style="margin-top: 20px; padding: 10px; background-color: #f3f3f3;">
  66. <p style="margin: 0px;"><%= t :attached_files, "Attached Files:" %></p>
  67. <ul style="padding-left: 20px;">
  68. <% asset.attachments.each do |attachment| %>
  69. <li><%= attachment.display_name %> - <%= attachment.readable_size %> <a href="<%= file_download_url(attachment, verifier: attachment.uuid) %>">[<%= t :download, "download" %>]</a></li>
  70. <% end %>
  71. </ul>
  72. </div>
  73. <% end %>