aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/action_mailroom/inbound_emails
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-09-27 16:45:59 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2018-09-27 16:45:59 -0700
commitb1e08b468b7041ef5df179213f686722b0ead358 (patch)
treefee5085088a1b24f323f5e67f6dd2534dbb49d5e /app/views/action_mailroom/inbound_emails
parent4f0d6c87b15d96a4dba252be833b367bcd675e2b (diff)
downloadrails-b1e08b468b7041ef5df179213f686722b0ead358.tar.gz
rails-b1e08b468b7041ef5df179213f686722b0ead358.tar.bz2
rails-b1e08b468b7041ef5df179213f686722b0ead358.zip
Provide a basic admin interface
BEHOLD THE CONDUCTOR!
Diffstat (limited to 'app/views/action_mailroom/inbound_emails')
-rw-r--r--app/views/action_mailroom/inbound_emails/index.html.erb15
-rw-r--r--app/views/action_mailroom/inbound_emails/new.html.erb8
-rw-r--r--app/views/action_mailroom/inbound_emails/show.html.erb8
3 files changed, 31 insertions, 0 deletions
diff --git a/app/views/action_mailroom/inbound_emails/index.html.erb b/app/views/action_mailroom/inbound_emails/index.html.erb
new file mode 100644
index 0000000000..6636e351be
--- /dev/null
+++ b/app/views/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_inbound_email_path(inbound_email) %></td>
+ <td><%= inbound_email.status %></td>
+ </tr>
+ <% end %>
+</table>
+
+<%= link_to "Deliver new inbound email", main_app.new_rails_inbound_email_path %> \ No newline at end of file
diff --git a/app/views/action_mailroom/inbound_emails/new.html.erb b/app/views/action_mailroom/inbound_emails/new.html.erb
new file mode 100644
index 0000000000..dfd0bd7ea5
--- /dev/null
+++ b/app/views/action_mailroom/inbound_emails/new.html.erb
@@ -0,0 +1,8 @@
+<% provide :title, "Deliver new inbound email" %>
+
+<h1>Deliver new inbound email</h1>
+
+<%= form_with(url: main_app.rails_inbound_emails_url, remote: false) do |form| %>
+ <%= form.file_field :message, size: "150x50", autofocus: true %><br>
+ <%= form.submit "Deliver inbound email" %>
+<% end %>
diff --git a/app/views/action_mailroom/inbound_emails/show.html.erb b/app/views/action_mailroom/inbound_emails/show.html.erb
new file mode 100644
index 0000000000..bc443775e4
--- /dev/null
+++ b/app/views/action_mailroom/inbound_emails/show.html.erb
@@ -0,0 +1,8 @@
+<% provide :title, @inbound_email.message_id %>
+
+<h1><%= @inbound_email.message_id %>: <%= @inbound_email.status %></h1>
+
+<ul>
+ <li>Retry</li>
+ <li>Incinerate</li>
+</ul>