Files
manyfold/app/views/creators/_creator.html.erb
T

21 lines
1.0 KiB
ERB

<div class="col mb-4">
<div class="card">
<div class="card-body">
<div class="card-title"><%= creator.name %></div>
<% if creator.caption %>
<h6 class="card-subtitle mb-2 text-muted"><%= sanitize creator.caption %></h6>
<% end %>
<% if creator.notes %>
<p class="card-text"><%= sanitize creator.notes %></p>
<% end %>
<ul class='links'>
<% creator.links.each do |link| %>
<li><%= link_to t("sites.%{site}" % {site: link.site}), link.url %></li>
<% end %>
</ul>
<%= link_to "#{creator.models.count} #{Model.model_name.human count: creator.models.count}", models_path(creator: creator.id), {class: "btn btn-primary", "aria-label": translate(".models_button.label", name: creator.name)} if policy(creator).show? %>
<%= link_to icon("pencil-fill", t(".edit_button.text")), edit_creator_path(creator), {class: "btn btn-outline-secondary", "aria-label": translate(".edit_button.label", name: creator.name)} if policy(creator).edit? %>
</div>
</div>
</div>