-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #302 from fnf-org/mfl/event-emails
Mfl/event emails
- Loading branch information
Showing
18 changed files
with
202 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.3.18 | ||
1.3.19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
= form_with url: email_ticket_holders_event_ticket_requests_path(event_id: @event.id), method: :get, data: { event: @event, turbo: true, controller: 'flatpickr', target: '_blank' } do |f| | ||
.container-fluid | ||
.card-header.bg-primary-subtle | ||
%legend Email All Ticket Holders | ||
Tickets Holders Confirmed and Awaiting Payment: | ||
%b #{count} | ||
%hr | ||
|
||
%h6 Subject | ||
= f.text_field :subject, value: "#{@event.name}: ", maxlength: 80, class: 'form-control', required: true | ||
%hr | ||
%h6 Email Message | ||
%p | ||
%i Format: Plain text and simple HTML are allowed. | ||
|
||
= f.text_area :body, rows: 5, cols: 80, class: 'form-control', required: true | ||
= f.submit "▶︎ Send Emails", class: 'btn btn-primary btn-large', | ||
id: 'submit-email', data: { disable_with: 'Submitting...' } | ||
%br |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
= render partial: 'shared/nav_event', locals: { event: @event, active_tab: { email_ticket_holders: 'active' } } | ||
|
||
.card | ||
.card-body | ||
- @tr_count = @ticket_requests.count | ||
= render '/events/email_form', resource: @event, count: @tr_count | ||
%table.table.table-condensed | ||
%thead | ||
%tr | ||
%th Ticket Requesters (#{@tr_count}) | ||
%tbody | ||
- @ticket_requests.each do |ticket_request| | ||
%tr | ||
%td | ||
- user = "#{ticket_request.user.name} <#{ticket_request.user.email}>" | ||
= link_to event_ticket_request_path(@event, ticket_request) do | ||
%span= user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,25 @@ | |
Got ticket questions or think something is wrong with your order? We are still | ||
here for you, drop us a line at | ||
= succeed '.' do | ||
= mail_to '[email protected]' | ||
= mail_to '[email protected]' | ||
|
||
%p | ||
|
||
We care deeply about the health, safety, and comfort of attendees at our events and members | ||
of our community. To help achieve this, we ask all of our members and guests to read, | ||
understand, and share with each guest our | ||
%b=link_to 'Code of Conduct', 'https://fnf.page.link/coc', target: '_blank', onclick: "popupWindow('https://fnf.page.link/coc', 'Code of Conduct', window, 800, 900); return false;" | ||
|
||
%p | ||
We are a community driven by volunteerism in the service of the community. As such, we depend upon the energy | ||
and vision of members and guests to make our events happen! | ||
%br | ||
Please (re)acquaint yourself with | ||
%b=link_to 'The FnF Way', 'https://fnf.events/the-fnf-way/', target: '_blank', onclick: "popupWindow('https://fnf.events/the-fnf-way/', 'The FnF Way', window, 700, 900); return false;" | ||
and get involved with helping make the event happen! | ||
%br | ||
%b=link_to 'Volunteer Signups', 'https://signup.app.fnf.org/' | ||
%p | ||
|
||
%p | ||
Friends and Family reminds you to | ||
|
@@ -43,3 +61,5 @@ | |
So soon! | ||
%br | ||
Your #{@event.name} Ticketing Team | ||
= succeed '.' do | ||
= mail_to '[email protected]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,4 +33,4 @@ | |
|
||
%p | ||
When in doubt, contact us at | ||
= mail_to 'tickets@fnf.org' | ||
= mail_to 'ticket-support@fnf.org' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
app/views/ticket_request_mailer/email_ticket_holder.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
%p | ||
Hi #{@ticket_request.user.first_name}, | ||
|
||
%p | ||
- if @payment_url.present? | ||
Your tickets still need to be purchased. | ||
= link_to @payment_url do | ||
Buy your tickets now! | ||
%p | ||
= @body | ||
|
||
%p | ||
With love ❤️, | ||
%br | ||
Your FnF Ticket Team | ||
|
||
%p | ||
- if @payment_url.present? | ||
= link_to @payment_url do | ||
Buy your tickets now! | ||
%p | ||
You can view the status of your request at any time by visiting | ||
= link_to "#{@ticket_request_url}", @ticket_request_url | ||
|
||
%p | ||
%p | ||
%i This email was generated by a very friendly #{Faker::Creature::Animal.name} at: #{Time.now} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
class TicketRequestMailerPreview < ActionMailer::Preview | ||
def email_ticket_holder | ||
ticket_request = TicketRequest.last | ||
subject = 'Test Subject' | ||
body = "This is my message test | ||
<p> | ||
We care deeply about the health, safety, and comfort of attendees at our events | ||
and member of our community. <br> | ||
To help achieve this, we ask all of our members and guests to read, | ||
and abide by our <a href='https://fnf.page.link/coc'>Code Of Conduct</a> | ||
<p> | ||
We ask that you share this with each of your guests whom you may bring to the event. | ||
<p> | ||
We are a community driven by volunteerism in the service of the community. | ||
<p> | ||
As such, we depend upon the energy and vision of members and guests to make our events happen!<br> | ||
Please (re)acquaint yourself with The FnF Way, https://cfaea.net/the-fnf-way/,<br> | ||
and get involved with helping make the event happen! | ||
" | ||
TicketRequestMailer.with(ticket_request:).email_ticket_holder(ticket_request, subject, body) | ||
end | ||
end |