Basic feature implemented, very basic poc
This commit is contained in:
parent
216089a3e7
commit
48c0067076
118 changed files with 2113 additions and 20 deletions
21
app/views/reports/work.html.erb
Normal file
21
app/views/reports/work.html.erb
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<div class="container">
|
||||
<h1><i class="bi bi-journal-text me-2"></i><%= @report.name %></h1>
|
||||
|
||||
<% @report.elements.each do |element| %>
|
||||
<%= render element %>
|
||||
<% end %>
|
||||
<hr>
|
||||
<h2><i class="bi bi-plus"></i>Element hinzufügen</h2>
|
||||
<%= bootstrap_form_with(model: @report.elements.build, layout: :horizontal) do |form| %>
|
||||
<%= form.collection_select(:checklist_id, Checklist.all, :id, :name) %>
|
||||
<%= form.hidden_field :report_id %>
|
||||
<%= form.text_field :path %>
|
||||
<%= form.submit %>
|
||||
<% end %>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_edit", model: @report.model_name.human), edit_report_path(@report) %>
|
||||
<%= link_to t("scaffold.link_index", model: @report.model_name.human(count: 2)), reports_path %>
|
||||
<%= button_to t("scaffold.link_destroy", model: @report.model_name.human), @report, method: :delete, class: "btn btn-warning" %>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue