<% content_for :title, t(".documents", tail_number: @aircraft.tail_number) %> <%= render "shared/aircraft_header", aircraft: @aircraft %>
<% if owner? %> <%= more_menu do %> <%= link_to t(".upload_several_files"), new_bulk_aircraft_documents_path(@aircraft), class: "menu-item" %> <%= link_to t(".new_collection"), new_aircraft_document_collection_path(@aircraft), class: "menu-item" %> <% end %> <%= link_to t(".upload_document"), new_aircraft_document_path(@aircraft), class: "btn-primary" %> <% end %>
<% if @collections.empty? && @uncollected.empty? %>
<%= empty_state t(".no_documents_yet_upload_logbook") %>
<% end %>
<% @collections.each do |col| %>

<%= "★ " if col.starred? %><%= col.name %> (<%= col.documents.size %>)

<% if col.description.present? %>

<%= col.description %>

<% end %>
<%= visibility_badge(col.visibility) %> <% if owner? %> <%= link_to t(".document"), new_aircraft_document_path(@aircraft, collection_id: col.id), class: "btn-secondary btn-sm" %> <%= link_to t(".edit"), edit_aircraft_document_collection_path(@aircraft, col), class: "btn-secondary btn-sm" %> <% end %>
<% if col.documents.any? %> <% else %><%= empty_state t(".empty_collection") %><% end %>
<% end %> <% if @uncollected.any? %>

<%= t(".uncollected") %> (<%= @uncollected.size %>)

<% end %>