a11yist/app/views/checklists/show.html.erb

34 lines
1.3 KiB
Text
Raw Normal View History

2024-10-31 23:13:18 +01:00
<h1><i class="bi bi-boxes me-2"></i><%= "#{@checklist.name}" %></h1>
2024-07-20 16:52:12 +02:00
<div class="row">
2024-10-27 22:37:11 +01:00
<div class="col col-12 col-lg-8">
2024-11-01 03:26:46 +01:00
<div>
2024-07-20 16:52:12 +02:00
<%= 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 %>
2024-10-27 22:37:11 +01:00
<div data-controller="drag">
<% @checklist.checklist_entries.each do |entry| %>
<%= turbo_frame_tag dom_id(entry, :frame), data: { id: entry.id, "sortable-url": url_for(entry) } do %>
<%= render entry %>
<% end %>
2024-07-20 16:52:12 +02:00
<% end %>
2024-10-27 22:37:11 +01:00
<%= tag.i "Es sind keine Checks zugewiesen." if @checklist.empty? %>
2024-07-20 16:52:12 +02:00
<% end %>
2024-10-27 22:37:11 +01:00
</div>
</div>
<div class="col col-12 col-lg-4">
<%= render @checklist %>
2024-07-20 16:52:12 +02:00
</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 %>
2024-07-19 02:29:18 +02:00
<%= button_to t("scaffold.link_destroy", model: @checklist.model_name.human), @checklist, method: :delete, class: "btn btn-outline-danger" %>
</div>