From 9681897e9ace534c4559fa9be20aa86af1a42e13 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 7 Dec 2024 10:33:07 -0500 Subject: Add daily upvote email like AO3 kudos --- app/views/vote_mailer/daily_report_email.html.haml | 8 ++++++++ app/views/vote_mailer/daily_report_email.text.erb | 5 +++++ 2 files changed, 13 insertions(+) create mode 100644 app/views/vote_mailer/daily_report_email.html.haml create mode 100644 app/views/vote_mailer/daily_report_email.text.erb (limited to 'app/views/vote_mailer') diff --git a/app/views/vote_mailer/daily_report_email.html.haml b/app/views/vote_mailer/daily_report_email.html.haml new file mode 100644 index 0000000..ab54df2 --- /dev/null +++ b/app/views/vote_mailer/daily_report_email.html.haml @@ -0,0 +1,8 @@ +%p + Users have upvoted content on Four Island in the last day! +%ul + - @entries.each do |entry| + %li + %strong= pluralize(entry.size, "person") + left an upvote on + = link_to entry.first.votable.title, entry.first.votable, style: "font-weight: bold; font-style: italic" diff --git a/app/views/vote_mailer/daily_report_email.text.erb b/app/views/vote_mailer/daily_report_email.text.erb new file mode 100644 index 0000000..22ea368 --- /dev/null +++ b/app/views/vote_mailer/daily_report_email.text.erb @@ -0,0 +1,5 @@ +Users have upvoted content on Four Island in the last day! + +<% @entries.each do |entry| %> +- <%= pluralize(entry.size, "person") %> left an upvote on <%= entry.first.votable.title %> (<%= url_for(entry.first.votable) %>) +<% end %> -- cgit 1.4.1