tabletop-companion/app/views/counters/_counter.html.erb

18 lines
821 B
Plaintext
Raw Normal View History

2024-06-12 16:51:57 +00:00
<div class="counter" id="<%= dom_id(counter) %>">
<% if @editable %>
2024-06-18 07:43:39 +00:00
<div class="feature-edit-buttons">
<%= icon_link_to("cod-triangle_left", reorder_down_character_sheet_feature_path(counter),
data: { turbo_method: :patch }) %>
<%= icon_link_to("md-delete", counter,
data: { turbo_method: :delete, turbo_confirm: t(".confirm_delete", name: counter.name) }) %>
<%= icon_link_to("cod-triangle_right", reorder_up_character_sheet_feature_path(counter),
data: { turbo_method: :patch }) %>
</div>
2024-06-12 16:51:57 +00:00
<% end %>
<h6><%= counter.name %></h6>
<%= form_with model: counter, class: "counter-form",
data: { controller: "auto-update", auto_update_update_url_value: counter_path(counter) } do |f| %>
<%= f.number_field :value %>
<% end %>
</div>