summaries.email.mustache 1.3 KB

123456789101112131415161718192021222324252627
  1. <% define_content :link do -%>
  2. <%= dashboard_url %>
  3. <% end -%>
  4. <% define_content :subject do -%>
  5. <%= t :subject, "Recent Canvas Notifications" %>
  6. <% end -%>
  7. <% m = (delayed_messages || []).find{|m| m.frequency == Notification::FREQ_WEEKLY} || delayed_messages.first %>
  8. <% if !m || m.frequency == Notification::FREQ_DAILY %>
  9. <%= 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}:", :date => (date_string(force_zone(m.send_at), :no_words) rescue t("#date.days.today_lower", "today")) %>
  10. <% elsif m.frequency == Notification::FREQ_WEEKLY %>
  11. <%= 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}:", :date => (date_string(force_zone(m.send_at), :no_words) rescue t("#date.days.today_lower", "today")) %>
  12. <% end %>
  13. <% for delayed_message in delayed_messages do %>
  14. --------------------------------
  15. <%= delayed_message.name_of_topic %>
  16. <%= CanvasTextHelper.indent(html_to_text(delayed_message.summary, :base_url => content(:link)), 4) %>
  17. <%= delayed_message.link %>
  18. <% end %>
  19. <%= t :notifications_link, "You can change your notification settings by visiting the following page:" %>
  20. <%= communication_profile_url %>