From e58d8c8dcc883a9c247a74c44d1828c3ebf9f8fd Mon Sep 17 00:00:00 2001 From: Josh Pigford Date: Wed, 20 Nov 2024 13:43:46 -0600 Subject: [PATCH] Refactor insider trading display in widget view --- .../content/_inside_trading_tracker.html.erb | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/app/views/tools/widgets/content/_inside_trading_tracker.html.erb b/app/views/tools/widgets/content/_inside_trading_tracker.html.erb index 1c0aa45..c74de96 100644 --- a/app/views/tools/widgets/content/_inside_trading_tracker.html.erb +++ b/app/views/tools/widgets/content/_inside_trading_tracker.html.erb @@ -9,15 +9,20 @@
<% if first_trade = tool.insider_trades.first %> -

<%= first_trade[:company] %> (<%= first_trade[:ticker] %>) Insider Trading Activity

- <% if first_trade[:company_industry].present? %> -

- <%= first_trade[:company_sector] %> • <%= first_trade[:company_industry] %> - <% if first_trade[:company_employees].present? %> - • <%= number_with_delimiter(first_trade[:company_employees]) %> employees +

+ <%= image_tag "https://logo.synthfinance.com/ticker/#{first_trade[:ticker]}", class: "h-14 w-14 rounded-full" %> +
+

<%= first_trade[:company] %> (<%= first_trade[:ticker] %>) Insider Trading Activity

+ <% if first_trade[:company_industry].present? %> +

+ <%= first_trade[:company_sector] %> • <%= first_trade[:company_industry] %> + <% if first_trade[:company_employees].present? %> + • <%= number_with_delimiter(first_trade[:company_employees]) %> employees + <% end %> +

<% end %> -

- <% end %> +
+
<% if first_trade[:company_description].present? %>

<%= first_trade[:company_description] %>