Add {committee_review} to emails and support HTML

This commit is contained in:
Michael Ball 2021-04-16 01:08:28 -07:00
parent 9786843eac
commit f6c7a50bba
4 changed files with 12 additions and 7 deletions

View file

@ -91,6 +91,8 @@ class EmailSettings < ApplicationRecord
h['eventtitle'] = event.title h['eventtitle'] = event.title
h['proposalslink'] = Rails.application.routes.url_helpers.conference_program_proposals_url( h['proposalslink'] = Rails.application.routes.url_helpers.conference_program_proposals_url(
conference.short_title, host: (ENV['OSEM_HOSTNAME'] || 'localhost:3000')) conference.short_title, host: (ENV['OSEM_HOSTNAME'] || 'localhost:3000'))
h['committee_review'] = event.committee_review
h['committee_review_html'] = ApplicationController.helpers.markdown(event.committee_review)
end end
if booth if booth

View file

@ -17,6 +17,12 @@
%tr %tr
%td {eventtitle} %td {eventtitle}
%td The title of an accepted or rejected proposal %td The title of an accepted or rejected proposal
%tr
%td {committee_review}
%td The raw text in the committee review for the proposal
%tr
%td {committee_review_html}
%td The committee review markdown rendered as HTML.
%tr %tr
%td {conference_start_date} %td {conference_start_date}
%td The start date of the conference %td The start date of the conference
@ -56,9 +62,6 @@
%td {conference_splash_link} %td {conference_splash_link}
%td The link to conference splash page %td The link to conference splash page
- if @conference.booths - if @conference.booths
%tr
%td {submitter_name}
%td Submitter's name
%tr %tr
%td {booth_title} %td {booth_title}
%td Booth's title %td Booth's title

View file

@ -73,7 +73,7 @@
%td %td
= link_to @event.submitter.name, admin_user_path(@event.submitter) = link_to @event.submitter.name, admin_user_path(@event.submitter)
- if @event.submitter.email_public - if @event.submitter.email_public
= "(#{mail_to(@event.submitter.email)})" (#{mail_to(@event.submitter.email)})
%tr %tr
%td %td
%b Speakers %b Speakers
@ -82,7 +82,7 @@
%div %div
= link_to speaker.name, admin_user_path(speaker) = link_to speaker.name, admin_user_path(speaker)
- if speaker.email_public - if speaker.email_public
= "(#{mail_to(speaker.email)})" (#{mail_to(speaker.email)})
%tr %tr
%td %td
%b Volunteers %b Volunteers

View file

@ -1,7 +1,7 @@
<%= render partial: "layouts/mailbot_header" %> <%= render partial: "layouts/mailbot_header" %>
<div id="content"> <div id="content">
<span style="white-space: pre-line"> <span style="white-space: pre-line">
<%= @email_body %> <%= @email_body.html_safe %>
</span> </span>
</div> </div>
<%= render partial: "layouts/mailbot_footer" %> <%= render partial: "layouts/mailbot_footer" %>