2023-02-05 23:10:37 +01:00
|
|
|
<div class="mt-2 row row-cols-4" id="count-list">
|
|
|
|
<div class="col mt-1 mb-2 text-center d-none" id="template" data-count-id="">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col text-end">
|
|
|
|
<button type="button" class="btn btn-lg btn-outline-danger fw-bold my-auto fs-3 minus">-</button>
|
|
|
|
</div>
|
|
|
|
<span class="col fw-bold fs-1 count"></span>
|
|
|
|
<div class="col text-start">
|
|
|
|
<button type="button" class="btn btn-lg btn-outline-success fw-bold my-auto fs-3 plus">+</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="fw-light fs-4">
|
|
|
|
<span class="name"></span>
|
|
|
|
<span><%= link_to "", "", class: "btn btn-sm btn-primary bi-pen-fill edit" %></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-02-05 21:01:07 +01:00
|
|
|
<% @counts.each { |c| %>
|
|
|
|
<div class="col mt-1 mb-2 text-center" data-count-id="<%= c.id %>">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col text-end">
|
|
|
|
<button type="button" class="btn btn-lg btn-outline-danger fw-bold my-auto fs-3 minus">-</button>
|
|
|
|
</div>
|
|
|
|
<span class="col fw-bold fs-1 count"><%= c.count %></span>
|
|
|
|
<div class="col text-start">
|
|
|
|
<button type="button" class="btn btn-lg btn-outline-success fw-bold my-auto fs-3 plus">+</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="fw-light fs-4">
|
2023-02-05 23:10:37 +01:00
|
|
|
<span class="name"><%= c.name %></span>
|
2023-02-05 21:01:07 +01:00
|
|
|
<span><%= link_to "", edit_count_path(c), class: "btn btn-sm btn-primary bi-pen-fill" %></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-02-05 23:10:37 +01:00
|
|
|
<% } %>
|
2023-02-05 21:01:07 +01:00
|
|
|
</div>
|
|
|
|
<div class="fixed-bottom text-end m-5">
|
|
|
|
<%= link_to "", new_count_path, class: "btn btn-lg btn-success fs-3 bi-plus-lg" %>
|
|
|
|
</div>
|