summaries.email.html.mustache 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. <% define_content :link do %>
  2. <%= dashboard_url %>
  3. <% end %>
  4. <% define_content :subject do %>
  5. <%= t :subject, "Recent Canvas Notifications" %>
  6. <% end %>
  7. <% define_content :report_date do %>
  8. <%= (date_string(force_zone(m.send_at), :no_words) rescue t("#date.days.today_lower", "today")) %>
  9. <% end %>
  10. <% define_content :footer_link do %>
  11. <a href="<%= content(:link) %>">
  12. <%= t 'click_to_preferences', "Click here to edit your notification preferences" %>
  13. </a>
  14. <% end %>
  15. <% m = (delayed_messages || []).find{|m| m.frequency == Notification::FREQ_WEEKLY} || delayed_messages.first %>
  16. <% if !m || m.frequency == Notification::FREQ_DAILY %>
  17. <p><%= t :daily_body, "You're signed up to receive a daily report of some notifications from your Canvas account. Below is the report for %{date}:",
  18. :date => content(:report_date) %></p>
  19. <% elsif m.frequency == Notification::FREQ_WEEKLY %>
  20. <p><%= t :weekly_body, "You're signed up to receive a weekly report of some notifications from your Canvas account. Below is the report for the week ending %{date}:",
  21. :date => content(:report_date) %></p>
  22. <% end %>
  23. <% for delayed_message in delayed_messages do %>
  24. <p><strong><%= html_to_text(delayed_message.name_of_topic, :base_url => content(:link)) %></strong></p>
  25. <p><%= html_to_simple_html(delayed_message.summary, :base_url => content(:link)) %></p>
  26. <p><a href="<%= delayed_message.link %>"><%= t :view, "Click to view" %></a></p>
  27. <% end %>