From a39b0711eefb07fb75294a68d635fb1323d24cf3 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 21 Oct 2023 12:36:21 -0400 Subject: Quotes can be submitted, although it is not encouraged --- app/views/quote_mailer/pending_quote_email.html.haml | 12 ++++++++++++ app/views/quote_mailer/pending_quote_email.text.erb | 15 +++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 app/views/quote_mailer/pending_quote_email.html.haml create mode 100644 app/views/quote_mailer/pending_quote_email.text.erb (limited to 'app/views/quote_mailer') diff --git a/app/views/quote_mailer/pending_quote_email.html.haml b/app/views/quote_mailer/pending_quote_email.html.haml new file mode 100644 index 0000000..fff825d --- /dev/null +++ b/app/views/quote_mailer/pending_quote_email.html.haml @@ -0,0 +1,12 @@ +%p + A new quote has been submitted for moderation. +- unless @quote.submitter.nil? + %p + It was submitted by: + = succeed "." do + = @quote.submitter +%p The body of the quote: +%pre= @quote.content +%p + Submitted: + = @quote.created_at.strftime("%B #{@quote.created_at.day.ordinalize}, %Y at %-I:%M:%S%P") diff --git a/app/views/quote_mailer/pending_quote_email.text.erb b/app/views/quote_mailer/pending_quote_email.text.erb new file mode 100644 index 0000000..818fc4a --- /dev/null +++ b/app/views/quote_mailer/pending_quote_email.text.erb @@ -0,0 +1,15 @@ +A new quote has been submitted for moderation. + +<% unless @quote.submitter.nil? %> +It was submitted by: <%= @quote.submitter %>. + +<% end %> +Here is the quote: + +--- + +<%= @quote.content %> + +--- + +Posted: <%= @quote.created_at.strftime("%B #{@quote.created_at.day.ordinalize}, %Y at %-I:%M:%S%P") %> -- cgit 1.4.1