From e1486aa3535005175ae9859daba44b1e1d67f1d1 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 27 Sep 2018 17:39:13 -0700 Subject: Flesh out conductor interface --- .../action_mailroom/inbound_emails/index.html.erb | 15 ------------ .../action_mailroom/inbound_emails/new.html.erb | 8 ------- .../action_mailroom/inbound_emails/show.html.erb | 8 ------- app/views/layouts/action_mailroom.html.erb | 7 ------ app/views/layouts/rails/conductor.html.erb | 7 ++++++ .../action_mailroom/inbound_emails/index.html.erb | 15 ++++++++++++ .../action_mailroom/inbound_emails/new.html.erb | 27 ++++++++++++++++++++++ .../action_mailroom/inbound_emails/show.html.erb | 13 +++++++++++ 8 files changed, 62 insertions(+), 38 deletions(-) delete mode 100644 app/views/action_mailroom/inbound_emails/index.html.erb delete mode 100644 app/views/action_mailroom/inbound_emails/new.html.erb delete mode 100644 app/views/action_mailroom/inbound_emails/show.html.erb delete mode 100644 app/views/layouts/action_mailroom.html.erb create mode 100644 app/views/layouts/rails/conductor.html.erb create mode 100644 app/views/rails/conductor/action_mailroom/inbound_emails/index.html.erb create mode 100644 app/views/rails/conductor/action_mailroom/inbound_emails/new.html.erb create mode 100644 app/views/rails/conductor/action_mailroom/inbound_emails/show.html.erb (limited to 'app/views') diff --git a/app/views/action_mailroom/inbound_emails/index.html.erb b/app/views/action_mailroom/inbound_emails/index.html.erb deleted file mode 100644 index 6636e351be..0000000000 --- a/app/views/action_mailroom/inbound_emails/index.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -<% provide :title, "Deliver new inbound email" %> - -

All inbound emails

- - - - <% @inbound_emails.each do |inbound_email| %> - - - - - <% end %> -
Message IDStatus
<%= link_to inbound_email.message_id, main_app.rails_inbound_email_path(inbound_email) %><%= inbound_email.status %>
- -<%= 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 deleted file mode 100644 index dfd0bd7ea5..0000000000 --- a/app/views/action_mailroom/inbound_emails/new.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<% provide :title, "Deliver new inbound email" %> - -

Deliver new inbound email

- -<%= form_with(url: main_app.rails_inbound_emails_url, remote: false) do |form| %> - <%= form.file_field :message, size: "150x50", autofocus: true %>
- <%= 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 deleted file mode 100644 index bc443775e4..0000000000 --- a/app/views/action_mailroom/inbound_emails/show.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<% provide :title, @inbound_email.message_id %> - -

<%= @inbound_email.message_id %>: <%= @inbound_email.status %>

- - diff --git a/app/views/layouts/action_mailroom.html.erb b/app/views/layouts/action_mailroom.html.erb deleted file mode 100644 index 3efa8c3989..0000000000 --- a/app/views/layouts/action_mailroom.html.erb +++ /dev/null @@ -1,7 +0,0 @@ - - - <%= yield :title %> - - -<%= yield %> - diff --git a/app/views/layouts/rails/conductor.html.erb b/app/views/layouts/rails/conductor.html.erb new file mode 100644 index 0000000000..75157feb78 --- /dev/null +++ b/app/views/layouts/rails/conductor.html.erb @@ -0,0 +1,7 @@ + + + Rails Conductor: <%= yield :title %> + + +<%= yield %> + 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" %> + +

All inbound emails

+ + + + <% @inbound_emails.each do |inbound_email| %> + + + + + <% end %> +
Message IDStatus
<%= link_to inbound_email.message_id, main_app.rails_conductor_inbound_email_path(inbound_email) %><%= inbound_email.status %>
+ +<%= 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" %> + +

Deliver new inbound email

+ +<%= form_with(url: main_app.rails_conductor_inbound_emails_path, scope: :mail, local: true) do |form| %> +
+ <%= form.label :from, "From" %>
+ <%= form.text_field :from %> +
+ +
+ <%= form.label :to, "To" %>
+ <%= form.text_field :to %> +
+ +
+ <%= form.label :subject, "Subject" %>
+ <%= form.text_field :subject %> +
+ +
+ <%= form.label :body, "Body" %>
+ <%= form.text_area :body, size: "40x20" %> +
+ + <%= 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 %> + +

<%= @inbound_email.message_id %>: <%= @inbound_email.status %>

+ + + +
+ Full email source +
<%= @inbound_email.source %>
+
-- cgit v1.2.3