diff --git a/Gemfile b/Gemfile index 5e2568540..b080fc5e7 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,7 @@ gem "cable_ready", "~> 4.1.0" gem "camo", "~> 0.1.0" gem "chroma", "~> 0.2.0" gem "chronic", "~> 0.10.2" +gem "closure_tree", "~> 7.1" gem "cloudflare-rails", "~> 0.6.0", group: :production gem "consolidated_screening_list", "~> 0.0.2" gem "countries", "~> 3.0.0" diff --git a/Gemfile.lock b/Gemfile.lock index 7bec289c3..56220906a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -135,6 +135,9 @@ GEM chronic (0.10.2) chunky_png (1.3.11) cliver (0.3.2) + closure_tree (7.1.0) + activerecord (>= 4.2.10) + with_advisory_lock (>= 4.0.0) cloudflare-rails (0.6.0) httparty rails (>= 5.0, < 6.1.0) @@ -590,6 +593,8 @@ GEM websocket-driver (0.7.1) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.4) + with_advisory_lock (4.6.0) + activerecord (>= 4.2) xpath (3.2.0) nokogiri (~> 1.8) yard (0.9.25) @@ -614,6 +619,7 @@ DEPENDENCIES capybara (>= 2.15) chroma (~> 0.2.0) chronic (~> 0.10.2) + closure_tree (~> 7.1) cloudflare-rails (~> 0.6.0) codecov consolidated_screening_list (~> 0.0.2) diff --git a/app/components/page_component.html.erb b/app/components/page_component.html.erb index e01df99f7..b0e3c1b9d 100644 --- a/app/components/page_component.html.erb +++ b/app/components/page_component.html.erb @@ -1,10 +1,10 @@ -
Find me in app/views/emails/index.html.erb
++ <% if !email.read_by?(current_user) && email.inbound? %> + + <% else %> + + <% end %> + | +
+ <% if sending_user = email.sending_user %>
+ <%= link_to sending_user.name, sending_user, class: "text-dark" %>
+ <% if org = email.participating_organizations.first %>
+ + <%= link_to org.name, org, class: "text-muted font-weight-light" %> + <% end %> + <% else %> + <%= email.sender %> + <% end %> + |
+
+
+
+ <% if session[:email_date_format] == "human" %>
+ <%= email.human_delivered_at %>
+ <% else %>
+ <%= email.delivered_at.to_s("bdy") %>
+ + <%= email.delivered_at.localtime.to_s("time") %> + <% end %> + + |
+
Find me in app/views/emails/show.html.erb
+<%= render(PageComponent.new) do |component| %> + <% component.with(:body) do %> + <%= render BackLinkComponent.new(title: "Emails", link: emails_path) %> + <%= render EmailComponent.new(email: @email) %> + <% end %> +<% end %> diff --git a/app/views/shared/_sidebar.html.erb b/app/views/shared/_sidebar.html.erb index 5ec9e1c48..d45a99339 100644 --- a/app/views/shared/_sidebar.html.erb +++ b/app/views/shared/_sidebar.html.erb @@ -34,7 +34,7 @@