[feat] Modify alt text for logo; Support user-defined color for header and footer

This commit is contained in:
Jimmy 2021-03-11 21:10:26 -08:00
parent 899d4c91f6
commit ee7c906f17
6 changed files with 55 additions and 41 deletions

View file

@ -7,8 +7,11 @@
<%= stylesheet_link_tag "mailbot" %>
</head>
<body>
</span>
<% if @conference.present? && @conference.color.present? %>
<div id="border" style="background-color: <%= @conference.color %>">
<% else %>
<div id="border">
<% end %>
</div>
<div id="border"></div>
</body>
</html>

View file

@ -9,18 +9,21 @@
<meta content="Michael Ball, Brian Harvey, Jens Moenig, Bernat Romagosa, Dan Garcia, Lauren Mock" name="author"/>
<%= stylesheet_link_tag "mailbot" %>
</head>
<body>
<div id="border">
<body>
<% if @conference.present? && @conference.color.present? %>
<div id="border" style="background-color: <%= @conference.color %>">
<% else %>
<div id="border">
<% end %>
<div class="row">
<div class="col-md-2">
<% if @logo_url.present? %>
<%= image_tag(@logo_url, style: "display:block;height:70px;width:auto;", alt: 'conference logo') %>
<%= image_tag(@logo_url, style: "display:block;height:70px;width:auto;", alt: @conference.title + ' logo') %>
<% end %>
</div>
</div>
</div>
<div id="content">
<span style="white-space: pre-line"></span>
</body>

View file

@ -1,14 +1,16 @@
<%= render partial: "layouts/mailbot_header" %>
<span style="white-space: pre-line">
Dear <%= @user.name %>,
<div id="content">
<span style="white-space: pre-line">
Dear <%= @user.name %>,
User <%= @comment.user.name %> posted a new comment for event <%= @event.title %> of <%= @conference.short_title %> .
"<%= @comment.body %>"
To reply to this comment, please go to <%= h(admin_conference_program_event_url(@conference.short_title, @event, only_path: false)) %>
Best wishes,
<%= @conference.title %> Team
</span>
User <%= @comment.user.name %> posted a new comment for event <%= @event.title %> of <%= @conference.short_title %> .
"<%= @comment.body %>"
To reply to this comment, please go to <%= h(admin_conference_program_event_url(@conference.short_title, @event, only_path: false)) %>
Best wishes,
<%= @conference.title %> Team
</span>
</div>
<%= render partial: "layouts/mailbot_footer" %>

View file

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

View file

@ -1,12 +1,14 @@
<%= render partial: "layouts/mailbot_header" %>
<span style="white-space: pre-line">
Dear <%= @user.name %>,
<div id="content">
<span style="white-space: pre-line">
Dear <%= @user.name %>,
Thanks! You have successfully booked <%= @ticket_purchase.quantity %> <%= @ticket_purchase.ticket.title %> ticket(s) for the event <%= @conference.title %>. Your transaction id is <%= @ticket_purchase.id %>.
Please, find the ticket(s) pdf attached.
Best wishes,
<%= @conference.title %> Team
</span>
Thanks! You have successfully booked <%= @ticket_purchase.quantity %> <%= @ticket_purchase.ticket.title %> ticket(s) for the event <%= @conference.title %>. Your transaction id is <%= @ticket_purchase.id %>.
Please, find the ticket(s) pdf attached.
Best wishes,
<%= @conference.title %> Team
</span>
</div>
<%= render partial: "layouts/mailbot_footer" %>

View file

@ -1,14 +1,16 @@
<%= render partial: "layouts/mailbot_header" %>
<span style="white-space: pre-line">
Dear <%= @user.name %>,
<div id="content">
<span style="white-space: pre-line">
Dear <%= @user.name %>,
Thanks! You have successfully booked <%= @ticket_purchase.quantity %> <%= @ticket_purchase.ticket.title %> ticket(s) for the event <%= @conference.title %>. Your transaction id is <%= @ticket_purchase.id %>.
Please, find the ticket(s) pdf attached.
The SAP Young Thinkers team will reach out to you with information on how to participate in the event soon. In the meantime, you can check the event page (https://events.sap.com/yt-learning-festival-at-snapcon-2020/en/home) or send an email with your questions to youngthinkers@sap.com.
Best wishes,
<%= @conference.title %> Team
</span>
Thanks! You have successfully booked <%= @ticket_purchase.quantity %> <%= @ticket_purchase.ticket.title %> ticket(s) for the event <%= @conference.title %>. Your transaction id is <%= @ticket_purchase.id %>.
Please, find the ticket(s) pdf attached.
The SAP Young Thinkers team will reach out to you with information on how to participate in the event soon. In the meantime, you can check the event page (https://events.sap.com/yt-learning-festival-at-snapcon-2020/en/home) or send an email with your questions to youngthinkers@sap.com.
Best wishes,
<%= @conference.title %> Team
</span>
</div>
<%= render partial: "layouts/mailbot_footer" %>