aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/rails
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-09-27 17:39:13 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2018-09-27 17:39:13 -0700
commite1486aa3535005175ae9859daba44b1e1d67f1d1 (patch)
treed1623ac451b3662531f81ad439a4832dfa144665 /app/views/rails
parentab92058bbdb3240dca2fbf51d86a720ee7bce1ca (diff)
downloadrails-e1486aa3535005175ae9859daba44b1e1d67f1d1.tar.gz
rails-e1486aa3535005175ae9859daba44b1e1d67f1d1.tar.bz2
rails-e1486aa3535005175ae9859daba44b1e1d67f1d1.zip
Flesh out conductor interface
Diffstat (limited to 'app/views/rails')
-rw-r--r--app/views/rails/conductor/action_mailroom/inbound_emails/index.html.erb15
-rw-r--r--app/views/rails/conductor/action_mailroom/inbound_emails/new.html.erb27
-rw-r--r--app/views/rails/conductor/action_mailroom/inbound_emails/show.html.erb13
3 files changed, 55 insertions, 0 deletions
diff --git a/app/views/rails/conductor/action_mailroom/inbound_emails/index.html.erb b/app/views/rails/conductor/action_mailroom/inbound_emails/index.html.erb
new file mode 100644
index 0000000000..19c53984e2
--- /dev/null
+++ b/app/views/rails/conductor/action_mailroom/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/app/views/rails/conductor/action_mailroom/inbound_emails/new.html.erb b/app/views/rails/conductor/action_mailroom/inbound_emails/new.html.erb
new file mode 100644
index 0000000000..be989ff0bc
--- /dev/null
+++ b/app/views/rails/conductor/action_mailroom/inbound_emails/new.html.erb
@@ -0,0 +1,27 @@
+<% 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 :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/app/views/rails/conductor/action_mailroom/inbound_emails/show.html.erb b/app/views/rails/conductor/action_mailroom/inbound_emails/show.html.erb
new file mode 100644
index 0000000000..e6f40b19e2
--- /dev/null
+++ b/app/views/rails/conductor/action_mailroom/inbound_emails/show.html.erb
@@ -0,0 +1,13 @@
+<% provide :title, @inbound_email.message_id %>
+
+<h1><%= @inbound_email.message_id %>: <%= @inbound_email.status %></h1>
+
+<ul>
+ <li>Retry</li>
+ <li>Incinerate</li>
+</ul>
+
+<details>
+ <summary>Full email source</summary>
+ <pre><%= @inbound_email.source %></pre>
+</details>