From 633f2c5601006a7d835425fe6c90bfc70fd9edc4 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 23 Mar 2023 16:12:00 -0700 Subject: [PATCH] show basil commissions on show/edit content pages --- .../display/_image_card_header.html.erb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/app/views/content/display/_image_card_header.html.erb b/app/views/content/display/_image_card_header.html.erb index 4cc8c002..e53da2f6 100644 --- a/app/views/content/display/_image_card_header.html.erb +++ b/app/views/content/display/_image_card_header.html.erb @@ -27,5 +27,30 @@ <% end %> + <% @content.basil_commissions.where.not(saved_at: nil).each do |commission| %> +
  • + <%= image_tag commission.image %> +
    +

    + <% if @content.persisted? %> + <%= link_to @content do %> + <%= simple_format ContentFormatterService.show( + text: @content.name_field_value, + viewing_user: current_user + ) %> + <% end %> + + <%= simple_format ContentFormatterService.show( + text: @content.description, + viewing_user: current_user + ) %> + + <% else %> + New <%= @content.class.name %> + <% end %> +

    +
    +
  • + <% end %>