show basil commissions on show/edit content pages

This commit is contained in:
Andrew Brown 2023-03-23 16:12:00 -07:00
parent 0fdc522f25
commit 633f2c5601

View File

@ -27,5 +27,30 @@
</div>
</li>
<% end %>
<% @content.basil_commissions.where.not(saved_at: nil).each do |commission| %>
<li>
<%= image_tag commission.image %>
<div class="caption bordered-text center">
<h3>
<% if @content.persisted? %>
<%= link_to @content do %>
<%= simple_format ContentFormatterService.show(
text: @content.name_field_value,
viewing_user: current_user
) %>
<% end %>
<small>
<%= simple_format ContentFormatterService.show(
text: @content.description,
viewing_user: current_user
) %>
</small>
<% else %>
New <%= @content.class.name %>
<% end %>
</h3>
</div>
</li>
<% end %>
</ul>
</div>