Secondary actions behind More menus; tidier aircraft header and tabs

- more_menu helper (menu / menu-item styles): each section keeps its main
  action as a button; imports, exports, printing and tools move under More
  (flights, logbook, logbook entry, documents, inspections, fleet)
- Aircraft header: More with status report and, for owners, access &
  sharing, edit, .sam.zip and records package; Access & Sharing and Oil
  Analysis tabs removed (oil analysis is under Oil & Fuel with a switch)
- Logbook: Print selected appears once an entry is ticked; filters apply on
  change; dates use fmt_date (also AirTrail, notes, audits, About)
- Header shows the role on the aircraft and hides the usual Available badge;
  no second Grounded badge on the Overview; AD DRS import listed once
- Flights: stat cards 2x2 on phones; By year opens visibly, only with more
  than one year; duplicate + Log Flight removed
- Remove unused hello_controller.js; guide and README updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-13 21:21:57 -05:00
1 parent bff6a05173
commit 3f45b557c2
38 files changed
+159 -63

No files matched your search

+9 -6
View File
@@ -6,14 +6,17 @@
<div class="flex flex-wrap items-center gap-2">
<%= form_with url: aircraft_logbook_entries_path(@aircraft), method: :get, class: "flex w-full flex-wrap gap-2 sm:w-auto" do |f| %>
<%= f.search_field :q, value: @query, placeholder: "Search entries…", class: "input min-w-0 flex-1 sm:w-48 sm:flex-none" %>
<%= f.select :log_type, LogbookEntry::LOG_TYPES.invert, { include_blank: "All logs", selected: @log_type }, class: "input w-32" %>
<%= f.select :log_type, LogbookEntry::LOG_TYPES.invert, { include_blank: "All logs", selected: @log_type }, class: "input w-32", data: { submit_on_change: true } %>
<% if @unverified_count.positive? || @unverified_only %>
<label class="flex items-center gap-1 text-sm text-slate-700"><%= f.check_box :unverified, { checked: @unverified_only }, "1", nil %> Unverified (<%= @unverified_count %>)</label>
<label class="flex items-center gap-1 text-sm text-slate-700"><%= f.check_box :unverified, { checked: @unverified_only, data: { submit_on_change: true } }, "1", nil %> Unverified (<%= @unverified_count %>)</label>
<% end %>
<%= f.submit "Filter", class: "btn-secondary" %>
<%= f.submit "Filter", class: "sr-only" %>
<% end %>
<% if @entries.any? %><button type="submit" form="print-entries" class="btn-secondary" hidden data-needs-selection="print-entries" title="Print the ticked entries on labels or pages for the paper logbook">Print selected</button><% end %>
<% if owner? %>
<%= more_menu do %><%= link_to "Import scans", new_aircraft_logbook_import_path(@aircraft), class: "menu-item" %><% end %>
<%= link_to "+ New Entry", new_aircraft_logbook_entry_path(@aircraft), class: "btn-primary" %>
<% end %>
<% if @entries.any? %><button type="submit" form="print-entries" class="btn-secondary" title="Print the ticked entries on labels or pages for the paper logbook">Print selected</button><% end %>
<% if owner? %><%= link_to "Import scans", new_aircraft_logbook_import_path(@aircraft), class: "btn-secondary" %><%= link_to "+ New Entry", new_aircraft_logbook_entry_path(@aircraft), class: "btn-primary" %><% end %>
</div>
</div>
<% if @entries.any? %>
@@ -24,7 +27,7 @@
<tbody>
<% @entries.each do |e| %>
<tr>
<td class="whitespace-nowrap"><input type="checkbox" name="ids[]" value="<%= e.id %>" form="print-entries" class="mr-1 align-middle" aria-label="Select the <%= fmt_date(e.date) %> entry"><%= link_to e.date, aircraft_logbook_entry_path(@aircraft, e), class: "link" %></td>
<td class="whitespace-nowrap"><input type="checkbox" name="ids[]" value="<%= e.id %>" form="print-entries" class="mr-1 align-middle" aria-label="Select the <%= fmt_date(e.date) %> entry"><%= link_to fmt_date(e.date), aircraft_logbook_entry_path(@aircraft, e), class: "link" %></td>
<td><span class="badge-gray"><%= LogbookEntry::LOG_TYPES[e.log_type] %></span></td>
<td class="text-xs"><%= LogbookEntry::ENTRY_TYPES[e.entry_type] %></td>
<td class="text-right tabular-nums"><%= hours(e.aircraft_hours_at_entry) %></td>
+8 -5
View File
@@ -3,14 +3,17 @@
<div class="card-header">
<h2 class="card-title"><%= LogbookEntry::LOG_TYPES[@entry.log_type] %> log — <%= fmt_date(@entry.date) %></h2>
<div class="flex gap-2">
<%= link_to "Print for logbook", new_aircraft_logbook_print_path(@aircraft, ids: [ @entry.id ]), class: "btn-secondary btn-sm" %>
<% if @entry.signed? %>
<% if owner? && !@entry.superseded? && !@entry.superseded_by %><%= link_to "Correct this entry", new_aircraft_logbook_entry_path(@aircraft, supersedes: @entry.id), class: "btn-secondary btn-sm" %><% end %>
<%= link_to "Print for logbook", new_aircraft_logbook_print_path(@aircraft, ids: [ @entry.id ]), class: "btn-secondary btn-sm" %>
<% if owner? && !@entry.superseded? && !@entry.superseded_by %>
<%= more_menu(small: true) do %><%= link_to "Correct this entry", new_aircraft_logbook_entry_path(@aircraft, supersedes: @entry.id), class: "menu-item" %><% end %>
<% end %>
<% else %>
<%= link_to "Sign", new_aircraft_logbook_entry_signature_path(@aircraft, @entry), class: "btn-primary btn-sm" %>
<% if owner? %>
<%= link_to "Ask someone to sign", new_aircraft_logbook_entry_signing_invitation_path(@aircraft, @entry), class: "btn-secondary btn-sm" %>
<%= link_to "Edit", edit_aircraft_logbook_entry_path(@aircraft, @entry), class: "btn-secondary btn-sm" %>
<% if owner? %><%= link_to "Edit", edit_aircraft_logbook_entry_path(@aircraft, @entry), class: "btn-secondary btn-sm" %><% end %>
<%= more_menu(small: true) do %>
<% if owner? %><%= link_to "Ask someone to sign", new_aircraft_logbook_entry_signing_invitation_path(@aircraft, @entry), class: "menu-item" %><% end %>
<%= link_to "Print for logbook", new_aircraft_logbook_print_path(@aircraft, ids: [ @entry.id ]), class: "menu-item" %>
<% end %>
<% end %>
</div>