31 lines
1.2 KiB
Text
31 lines
1.2 KiB
Text
<h1><i class="bi bi-card-checklist me-2"></i><%= "#{@checklist.name}" %></h1>
|
|
|
|
<div class="row">
|
|
<div class="col col-md-12">
|
|
<%= render @checklist %>
|
|
</div>
|
|
<div class="col col-md-12">
|
|
<div class="mt-3">
|
|
<%= link_to tag.i(class: "bi bi-plus-lg"), new_checklist_entry_path(checklist_id: @checklist.id), class: "btn btn-primary float-end", data: { turbo_frame: "checklist_entries" } %>
|
|
<h2>Checks</h2>
|
|
</div>
|
|
<div class="mb-2">
|
|
<%= turbo_frame_tag "new_checklist_entry" do %>
|
|
<% end %>
|
|
</div>
|
|
<%= turbo_frame_tag "checklist_entries" do %>
|
|
<% @checklist.checklist_entries.each do |entry| %>
|
|
<%= turbo_frame_tag dom_id(entry, :frame) do %>
|
|
<%= render entry %>
|
|
<% end %>
|
|
<% end %>
|
|
<%= tag.i "Es sind keine Checks zugewiesen." if @checklist.empty? %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="action-row">
|
|
<%= link_to t("scaffold.link_edit", model: @checklist.model_name.human), edit_checklist_path(@checklist) %>
|
|
<%= link_to t("scaffold.link_index", model: @checklist.model_name.human(count: 2)), checklists_path %>
|
|
<%= button_to t("scaffold.link_destroy", model: @checklist.model_name.human), @checklist, method: :delete, class: "btn btn-outline-danger" %>
|
|
</div>
|