16 lines
795 B
Plaintext
16 lines
795 B
Plaintext
<% content_target = @section.parent_section.present? ? "#{dom_id(@section.parent_section)}_sections"
|
|
: "character_sheet" %>
|
|
<%= turbo_stream.append(content_target) do %>
|
|
<%= render @section %>
|
|
<% end %>
|
|
|
|
<% form_target = @section.parent_section.present? ? "#{dom_id(@section.parent_section)}_add_section"
|
|
: "character_sheet_add_section" %>
|
|
<%= turbo_stream.replace(form_target) do %>
|
|
<% id = @section.parent_section.present? ? "#{dom_id(@section.parent_section)}_add_section"
|
|
: "character_sheet_add_section" %>
|
|
<div id=<%= id %>>
|
|
<%= render partial: "edit_links", locals: { section: @section, parent: @section, id: } %>
|
|
</div>
|
|
<% end %>
|