Gui improvements and ideas
This commit is contained in:
parent
3f4c7d17bf
commit
2ae0b55e42
54 changed files with 639 additions and 237 deletions
|
|
@ -1,16 +1,32 @@
|
|||
<div id="<%= dom_id element %>" class="mt-3">
|
||||
<h2><i class="bi bi-card-checklist me-2"></i>
|
||||
<%= element.title %></h2>
|
||||
<p>
|
||||
<strong>Path:</strong>
|
||||
<%= element.path %>
|
||||
</p>
|
||||
<div id="<%= dom_id element %>" class="mt-4 border-top pt-3">
|
||||
<%= turbo_frame_tag dom_id(element, :frame) do %>
|
||||
<div class="d-flex">
|
||||
<h2 class="h3">
|
||||
<i class="bi bi-card-checklist">
|
||||
</i>
|
||||
<%= element.title %>
|
||||
<div class="badge text-bg-secondary">
|
||||
<%= element.path %>
|
||||
</div>
|
||||
</h2>
|
||||
<%= link_to [:edit, element], class: "btn btn-link text-secondary" do %>
|
||||
<i class="bi bi-pencil">
|
||||
</i>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="">
|
||||
|
||||
<%= element.description_html %>
|
||||
</div>
|
||||
|
||||
<%= element.description_html %>
|
||||
<% end %>
|
||||
|
||||
<% element.success_criteria.each do |sc| %>
|
||||
<%= turbo_frame_tag(dom_id(sc, :frame)) do %>
|
||||
<%= render sc %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if element.success_criteria.none? %>
|
||||
<p><i>Es sind (noch) keine Erfolgskriterien definiert.</i></p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,15 @@
|
|||
<%= bootstrap_form_with(model: element, data: { turbo_frame: "_top"}) do |form| %>
|
||||
<%= bootstrap_form_with(model: element) do |form| %>
|
||||
<%= form.hidden_field :report_id %>
|
||||
<%= form.collection_select(:checklist_id, Checklist.all, :id, :name) %>
|
||||
<%= form.text_field :path %>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<%= form.text_field :path %>
|
||||
</div>
|
||||
<div class="col">
|
||||
<%= form.collection_select(:checklist_id, Checklist.all, :id, :name) %>
|
||||
</div>
|
||||
</div>
|
||||
<%= form.text_field :title %>
|
||||
<%= form.rich_text_area :description_html %>
|
||||
<%= form.submit %>
|
||||
<%= form.submit class: "btn btn-warning" %>
|
||||
<%= link_to("Abbrechen", element.report, class: "btn btn-outline-secondary") %>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,18 @@
|
|||
<h1><%= t("scaffold.pagetitle_edit", model: Element.model_name.human) %></h1>
|
||||
|
||||
<%= render "form", element: @element %>
|
||||
<%= turbo_frame_tag dom_id(@element, :frame) do %>
|
||||
<div>
|
||||
<div class="d-flex">
|
||||
<h2 class="h3">
|
||||
<i class="bi bi-card-checklist">
|
||||
</i>
|
||||
<%= @element.title %>
|
||||
</h2>
|
||||
<%= link_to(tag.i(class: "bi bi-pencil"), @element, class: "btn btn-link text-warning") %>
|
||||
</div>
|
||||
<%= render "form", element: @element %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_show", model: Element.model_name.human), @element %>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
<h1><%= t("scaffold.pagetitle_new", model: Element.model_name.human) %></h1>
|
||||
|
||||
<%= turbo_frame_tag "new_element_frame" do %>
|
||||
<h2><i class="bi bi-plus"></i>Element hinzufügen</h2>
|
||||
<%= render "form", element: @element %>
|
||||
<div class="border border-info p-3">
|
||||
<h2><i class="bi bi-card-checklist me-2"></i>Neues Element</h2>
|
||||
<%= render "form", element: @element %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="action-row">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue