Files
old-holivud2/app/views/directories/_directory.html.erb
2020-05-31 22:38:19 +02:00

30 lines
1.6 KiB
Plaintext

<div class="col-sm-6 col-md-4 col-lg-3 mt-4">
<li class="card h-100 shadow-sm">
<div class="card-header d-flex justify-content-between align-items-end bg-white border-bottom-0 pr-2">
<small class="text-more-muted text-uppercase font-weight-bold"><%= directory.permissions %></small>
<div class="dropdown">
<%= button_tag fa_icon("gear"), class: "btn btn-white btn-sm border text-muted", data: { toggle: "dropdown" }, aria: { haspopup: true, expanded: false } %>
<div class="dropdown-menu dropdown-menu-right">
<% if policy(directory).edit? %>
<%= link_to fa_icon("pencil fw", text: t(".actions.edit")), [:edit, project, directory], class: "dropdown-item" %>
<% end %>
<% if policy(directory).destroy? %>
<%= link_to fa_icon("trash fw", text: t(".actions.delete")), [project, directory], method: :delete, class: "dropdown-item", data: { confirm: t(".confirm_delete", count: directory.files.count) } %>
<% end %>
</div>
</div>
</div>
<div class="card-body py-0">
<%= link_to [project, directory], class: "d-block pb-5 text-decoration-none text-reset link-stretched" do %>
<h2 class="h5"><%= directory.name %></h2>
<% end %>
</div>
<div class="card-footer bg-white border-top-0 px-2">
<div class="d-flex flex-row justify-content-start align-items-center flex-wrap">
<%#= team_member_list project.users.first(3) %>
<small class="ml-1"><%#= link_to pluralize(project.account.users.size, t(".team_member")), [project, :project_memberships], class: "text-muted" %></small>
</div>
</div>
</li>
</div>