diff options
author | George Claghorn <george.claghorn@gmail.com> | 2018-12-26 11:02:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-26 11:02:59 -0500 |
commit | 9b35b9ff417e8ec9888deac1e66c2855677164cd (patch) | |
tree | 82dc9a20a23b855f91f743c5029ec7a97a35b824 /actionmailbox/app/views/rails/conductor | |
parent | b5ed468492387d42a44ca6af525d4a274cda756d (diff) | |
parent | a5b2fff64ca0c1fa7be5124f40a251d991c10a85 (diff) | |
download | rails-9b35b9ff417e8ec9888deac1e66c2855677164cd.tar.gz rails-9b35b9ff417e8ec9888deac1e66c2855677164cd.tar.bz2 rails-9b35b9ff417e8ec9888deac1e66c2855677164cd.zip |
Merge pull request #34786 from georgeclaghorn/actionmailbox
Import Action Mailbox
Diffstat (limited to 'actionmailbox/app/views/rails/conductor')
3 files changed, 72 insertions, 0 deletions
diff --git a/actionmailbox/app/views/rails/conductor/action_mailbox/inbound_emails/index.html.erb b/actionmailbox/app/views/rails/conductor/action_mailbox/inbound_emails/index.html.erb new file mode 100644 index 0000000000..19c53984e2 --- /dev/null +++ b/actionmailbox/app/views/rails/conductor/action_mailbox/inbound_emails/index.html.erb @@ -0,0 +1,15 @@ +<% provide :title, "Deliver new inbound email" %> + +<h1>All inbound emails</h1> + +<table> + <tr><th>Message ID</th><th>Status</th></tr> + <% @inbound_emails.each do |inbound_email| %> + <tr> + <td><%= link_to inbound_email.message_id, main_app.rails_conductor_inbound_email_path(inbound_email) %></td> + <td><%= inbound_email.status %></td> + </tr> + <% end %> +</table> + +<%= link_to "Deliver new inbound email", main_app.new_rails_conductor_inbound_email_path %>
\ No newline at end of file diff --git a/actionmailbox/app/views/rails/conductor/action_mailbox/inbound_emails/new.html.erb b/actionmailbox/app/views/rails/conductor/action_mailbox/inbound_emails/new.html.erb new file mode 100644 index 0000000000..7f1ec74496 --- /dev/null +++ b/actionmailbox/app/views/rails/conductor/action_mailbox/inbound_emails/new.html.erb @@ -0,0 +1,42 @@ +<% provide :title, "Deliver new inbound email" %> + +<h1>Deliver new inbound email</h1> + +<%= form_with(url: main_app.rails_conductor_inbound_emails_path, scope: :mail, local: true) do |form| %> + <div> + <%= form.label :from, "From" %><br> + <%= form.text_field :from %> + </div> + + <div> + <%= form.label :to, "To" %><br> + <%= form.text_field :to %> + </div> + + <div> + <%= form.label :cc, "CC" %><br> + <%= form.text_field :cc %> + </div> + + <div> + <%= form.label :bcc, "BCC" %><br> + <%= form.text_field :bcc %> + </div> + + <div> + <%= form.label :in_reply_to, "In-Reply-To" %><br> + <%= form.text_field :in_reply_to %> + </div> + + <div> + <%= form.label :subject, "Subject" %><br> + <%= form.text_field :subject %> + </div> + + <div> + <%= form.label :body, "Body" %><br> + <%= form.text_area :body, size: "40x20" %> + </div> + + <%= form.submit "Deliver inbound email" %> +<% end %> diff --git a/actionmailbox/app/views/rails/conductor/action_mailbox/inbound_emails/show.html.erb b/actionmailbox/app/views/rails/conductor/action_mailbox/inbound_emails/show.html.erb new file mode 100644 index 0000000000..e761904196 --- /dev/null +++ b/actionmailbox/app/views/rails/conductor/action_mailbox/inbound_emails/show.html.erb @@ -0,0 +1,15 @@ +<% provide :title, @inbound_email.message_id %> + +<h1><%= @inbound_email.message_id %>: <%= @inbound_email.status %></h1> + +<ul> + <li><%= button_to "Route again", main_app.rails_conductor_inbound_email_reroute_path(@inbound_email), method: :post %></li> + <li>Incinerate</li> +</ul> + +<details> + <summary>Full email source</summary> + <pre><%= @inbound_email.source %></pre> +</details> + +<%= link_to "Back to all inbound emails", main_app.rails_conductor_inbound_emails_path %>
\ No newline at end of file |