generated from dxw/rails-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sending emails to additional contacts
- Loading branch information
1 parent
fec2b5a
commit 4c25599
Showing
17 changed files
with
160 additions
and
45 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
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
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
20 changes: 9 additions & 11 deletions
20
app/views/support/cases/message_threads/_recipient_table.html.erb
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,11 +1,9 @@ | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-three-quarters"> | ||
<table id="recipient-table" class="govuk-table added_recipients_table"> | ||
<tbody class="govuk-table__body"> | ||
<%= render "support/cases/message_threads/recipients", recipients: email.to_recipients, recipient_type: "TO" %> | ||
<%= render "support/cases/message_threads/recipients", recipients: email.cc_recipients, recipient_type: "CC" %> | ||
<%= render "support/cases/message_threads/recipients", recipients: email.bcc_recipients, recipient_type: "BCC" %> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
<%= turbo_frame_tag "recipient-frame" do %> | ||
<table id="recipient-table" class="govuk-table added_recipients_table"> | ||
<tbody id="recipient-table-body" class="govuk-table__body"> | ||
<%= render "support/cases/message_threads/recipients", recipients: email.to_recipients, recipient_type: "TO" %> | ||
<%= render "support/cases/message_threads/recipients", recipients: email.cc_recipients, recipient_type: "CC" %> | ||
<%= render "support/cases/message_threads/recipients", recipients: email.bcc_recipients, recipient_type: "BCC" %> | ||
</tbody> | ||
</table> | ||
<% end %> |
30 changes: 24 additions & 6 deletions
30
app/views/support/cases/message_threads/_recipients.html.erb
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,6 +1,24 @@ | ||
<% if recipients.present? %> | ||
<tr class="govuk-table__row"> | ||
<th scope="row" class="govuk-table__header"><%= recipient_type %></th> | ||
<td class="govuk-table__cell"><%= recipients %></td> | ||
</tr> | ||
<% end %> | ||
<% if recipients.present?%> | ||
<%if params[:action] == "add_recipient" || params[:action] == "remove_recipient"%> | ||
<%recipients.each do |recipient|%> | ||
<tr class="govuk-table__row"> | ||
<th scope="row" class="govuk-table__header"><%= recipient_type %></th> | ||
<td class="govuk-table__cell"><%= recipient[0] %></td> | ||
<td class="govuk-table__cell"><%= recipient[1].join(", ").titleize %></td> | ||
<td class="govuk-table__cell"> | ||
<% unless @sender_email.present? && (@sender_email.include?(recipient[0]))%> | ||
<%= link_to "remove", | ||
remove_recipient_support_case_message_replies_path(id: params[:id], email: recipient[0], role: recipient[1]), | ||
data: { turbo_frame: "recipient-frame", turbo_method: "post" }, | ||
class: "govuk-link" %> | ||
<%end%> | ||
</td> | ||
</tr> | ||
<%end%> | ||
<%else%> | ||
<tr class="govuk-table__row"> | ||
<th scope="row" class="govuk-table__header"><%= recipient_type %></th> | ||
<td class="govuk-table__cell"><%= recipients %></td> | ||
</tr> | ||
<%end%> | ||
<%end%> |
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
1 change: 1 addition & 0 deletions
1
app/views/support/cases/messages/replies/add_recipient.html.erb
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 @@ | ||
<%= render "support/cases/message_threads/recipient_table", email: @reply_form%> |
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
Oops, something went wrong.