Files
fixin.me/app/views/units/new.turbo_stream.erb
T
cryptogopher 9c51887024 Improve index tables
Stretch inputs to column width in place of fixed sizing.
Set minimum column widths for columns with form inputs.
Simplify table operations by removing `thead` and adding sentinel.
Manage empty table display with CSS only.
2026-10-17 19:25:46 +02:00

16 lines
525 B
Plaintext

<% target_id = dom_target(:new, @unit.base || :unit) %>
<% ids = {row: target_id,
hidden_row: nil,
link: dom_target(target_id, :link),
form_tag: dom_target(target_id, :form)} %>
<%= turbo_stream.disable ids[:link] -%>
<%= turbo_stream.append_all 'body' do %>
<%- tabular_form_with model: @unit, html: {id: ids[:form_tag]} do |form| %>
<%= form.hidden_field :base_id if @unit.base_id? %>
<% end %>
<% end %>
<%= turbo_stream.after @unit.base || :unit_, partial: 'form', locals: ids %>