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

12 lines
485 B
Plaintext

<div class="counter" id="<%= dom_id(counter) %>">
<% if @editable %>
<%= link_to(t(".delete"), counter,
data: { turbo_method: :delete, turbo_confirm: t(".confirm_delete", name: counter.name) }) %>
<% 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>