Some UX improvements
This commit is contained in:
parent
48c0067076
commit
8c81237501
81 changed files with 791 additions and 151 deletions
|
|
@ -6,7 +6,11 @@
|
|||
<%= element.path %>
|
||||
</p>
|
||||
|
||||
<%= element.description_html %>
|
||||
|
||||
<% element.success_criteria.each do |sc| %>
|
||||
<%= render sc %>
|
||||
<%= turbo_frame_tag(dom_id(sc, :frame)) do %>
|
||||
<%= render sc %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
json.extract! element, :id, :report_id, :path, :title, :description, :created_at, :updated_at
|
||||
json.extract! element, :id, :report_id, :path, :title, :description_html, :created_at, :updated_at
|
||||
json.url element_url(element, format: :json)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<%= bootstrap_form_with(model: element) do |form| %>
|
||||
<%= form.text_field :report_id %>
|
||||
<%= form.text_field :path %>
|
||||
<%= form.text_field :title %>
|
||||
<%= form.text_area :description %>
|
||||
<%= form.submit %>
|
||||
<%= bootstrap_form_with(model: element, data: { turbo_frame: "_top"}) do |form| %>
|
||||
<%= form.hidden_field :report_id %>
|
||||
<%= form.collection_select(:checklist_id, Checklist.all, :id, :name) %>
|
||||
<%= form.text_field :path %>
|
||||
<%= form.text_field :title %>
|
||||
<%= form.rich_text_area :description_html %>
|
||||
<%= form.submit %>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<th><%= Element.human_attribute_name(:title) %></th>
|
||||
|
||||
<th><%= Element.human_attribute_name(:description) %></th>
|
||||
<th><%= Element.human_attribute_name(:description_html) %></th>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
<td><%= link_to(element.title, url_for(element)) %></td>
|
||||
|
||||
<td><%= link_to(element.description, url_for(element)) %></td>
|
||||
<td><%= link_to(truncate(strip_tags(element.description_html)), url_for(element)) %></td>
|
||||
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
<h1><%= t("scaffold.pagetitle_new", model: Element.model_name.human) %></h1>
|
||||
|
||||
<%= render "form", element: @element %>
|
||||
<%= turbo_frame_tag "new_element_frame" do %>
|
||||
<h2><i class="bi bi-plus"></i>Element hinzufügen</h2>
|
||||
<%= render "form", element: @element %>
|
||||
<% end %>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_index", model: Element.model_name.human(count: 2)), elements_path %>
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@
|
|||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_edit", model: @element.model_name.human), edit_element_path(@element) %>
|
||||
<%= link_to t("scaffold.link_index", model: @element.model_name.human(count: 2)), elements_path %>
|
||||
<%= button_to t("scaffold.link_destroy", model: @element.model_name.human), @element, method: :delete, class: "btn btn-warning" %>
|
||||
<%= button_to t("scaffold.link_destroy", model: @element.model_name.human), @element, method: :delete, class: "btn btn-outline-danger" %>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue