<%= render "shared/aircraft_header", aircraft: @aircraft %>

<%= @record.type_label %>: <%= @record.title %>

<% if owner? %><%= link_to "Edit", edit_aircraft_major_record_path(@aircraft, @record), class: "btn-secondary btn-sm" %><% end %>
Date
<%= fmt_date(@record.date_performed) %>
Aircraft hours
<%= hours(@record.aircraft_hours) %>
Performed by
<%= @record.performed_by.presence || "—" %>
Component
<%= @record.component || "—" %>
Form 337
<%= @record.form_337_document ? link_to(@record.form_337_document.name, aircraft_document_path(@aircraft, @record.form_337_document), class: "link") : "—" %>
STC
<%= [@record.stc_number, @record.stc_holder].compact_blank.join(" · ").presence || "—" %> <%= link_to("(docs)", aircraft_document_path(@aircraft, @record.stc_document), class: "link") if @record.stc_document %>
Logbook
<%= @record.logbook_entry ? link_to(@record.logbook_entry.date, aircraft_logbook_entry_path(@aircraft, @record.logbook_entry), class: "link") : "—" %>
ICAs
<%= @record.has_ica? ? "Yes" : "No" %>
<% [["Description", @record.description], ["ICA notes", @record.ica_notes], ["Notes", @record.notes]].each do |title, text| %> <% if text.present? %>

<%= title %>

<%= simple_format text %>
<% end %> <% end %>