<% content_for :title, @document.name %> <%= render "shared/aircraft_header", aircraft: @aircraft %>

<%= @document.name %>

<%= @document.type_label %><%= " ยท #{@document.document_collection.name}" if @document.document_collection %>

<%= visibility_badge(@document.effective_visibility) %> <% if owner? %><%= link_to t(".edit"), edit_aircraft_document_path(@aircraft, @document), class: "btn-secondary btn-sm" %><% end %>
<% if @document.description.present? %>

<%= @document.description %>

<% end %> <%= render "documents/viewer", document: @document, page: @page %>