2024-06-06 13:18:10 +00:00
|
|
|
<%# locals: (section:, parent:, id:) -%>
|
|
|
|
<%= link_to t(".add_subsection"),
|
2024-06-07 15:53:32 +00:00
|
|
|
new_character_character_sheet_section_path(@character, parent_section_id: parent&.id),
|
|
|
|
data: { turbo_stream: true } %>
|
|
|
|
<% if section.present? %>
|
|
|
|
<%= link_to t(".add_stat"),
|
2024-06-10 19:39:46 +00:00
|
|
|
new_character_sheet_section_stat_path(section), data: { turbo_stream: true }, class: "add-stat" %>
|
2024-06-12 16:51:57 +00:00
|
|
|
<%= link_to t(".add_counter"),
|
|
|
|
new_character_sheet_section_counter_path(section), data: { turbo_stream: true }, class: "add-counter" %>
|
2024-06-07 15:53:32 +00:00
|
|
|
<% end %>
|
2024-06-06 13:18:10 +00:00
|
|
|
<% unless id == "character_sheet_add_section" %>
|
2024-06-07 15:53:32 +00:00
|
|
|
<%= link_to t(".delete_section", name: section.name), character_sheet_section_path(section),
|
|
|
|
data: { turbo_method: :delete, turbo_confirm: t(".confirm_delete", name: section.name) } %>
|
2024-06-06 13:18:10 +00:00
|
|
|
<% end %>
|