% content_for :title, t(".oil_analysis", tail_number: @aircraft.tail_number) %> <%= render "shared/aircraft_header", aircraft: @aircraft %> <%= render "shared/oil_subnav", aircraft: @aircraft %> <% recent = @analyses.first(OilAnalysesController::COMPARE_SAMPLES) %>
<%= t(".avlab_or_blackstone_pdf_reports") %>
<%= t(".lead_is_left_out_of_html", excluded_from_averages: (t(".samples_marked_leave_out_of") if @analyses.any?(&:excluded_from_averages?))) %>
<% else %> <%= empty_state @analyses.any? ? t(".add_another_sample_to_see") : t(".no_oil_analyses_yet_add") %> <% end %>| <%= t(".element") %> | <% recent.each do |a| %><%= link_to fmt_date(a.sample_date), aircraft_oil_analysis_path(@aircraft, a), class: "link" %> | <% end %>
|---|---|
| <%= t(".engine_oil_hrs") %> | <% recent.each do |a| %><%= a.engine_hours ? hours(a.engine_hours) : "—" %> / <%= a.oil_hours ? hours(a.oil_hours) : "—" %> | <% end %>
| <%= label %> | <% recent.each do |a| %><%= ppm_cell(a, el) %> | <% end %>
| <%= OilAnalysis::PROPERTIES[key] %> | <% recent.each do |a| %><%= oil_property(a, key) %> | <% end %>
| <%= t(".sampled") %> | <%= t(".result") %> | <%= t(".engine") %> | <%= t(".engine_hrs") %> | <%= t(".oil_hrs") %> | <%= t(".lab") %> | <%= t(".report") %> |
|---|---|---|---|---|---|---|
| <%= link_to fmt_date(a.sample_date), aircraft_oil_analysis_path(@aircraft, a), class: "link" %>
<% if a.excluded_from_averages? %> <%= t(".left_out_of_trends") %> <% end %> |
<%= oil_status_badge(a) %> <% if (flags = a.flagged_elements).any? %><%= t(".above_average_html", to_sentence: (flags.map { OilAnalysis.element_label(_1) }.to_sentence)) %><% end %> | <%= a.component&.to_s || "—" %> | <%= a.engine_hours ? hours(a.engine_hours) : "—" %> | <%= a.oil_hours ? hours(a.oil_hours) : "—" %> | <%= [ a.lab, a.sample_number ].compact.join(" · ").presence || "—" %> | <%= a.report.attached? ? link_to(t(".pdf"), rails_blob_path(a.report, disposition: :inline), class: "link", target: "_blank", rel: "noopener") : "—" %> |