Refactorings and gui improvements
This commit is contained in:
parent
c965e03e5a
commit
d1294c2fc4
46 changed files with 358 additions and 128020 deletions
|
|
@ -1,4 +1,5 @@
|
|||
<div id="<%= dom_id element %>" class="mb-5">
|
||||
<a id="<%= dom_id(element, :scroll) %>"></a>
|
||||
<%= turbo_frame_tag dom_id(element, :frame) do %>
|
||||
<div class="d-flex">
|
||||
<h2 class="h4">
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<%= link_to "#{tag.i(class: "bi bi-plus-lg")} Neue Checkliste".html_safe, new_from_checklist_element_success_criteria_path(element), class: "btn btn-primary" %>
|
||||
<%= link_to "#{tag.i(class: "bi bi-plus-lg")} Checkliste".html_safe, new_from_checklist_element_success_criteria_path(element), class: "btn btn-primary" %>
|
||||
|
||||
<%= link_to "#{tag.i(class: "bi bi-plus-lg")} Neues Erfolgskriterium".html_safe, new_element_success_criterion_path(element), class: "btn btn-primary" %>
|
||||
<%= link_to "#{tag.i(class: "bi bi-plus-lg")} Erfolgskriterium".html_safe, new_element_success_criterion_path(element), class: "btn btn-secondary" %>
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
<%= turbo_stream.update "new_element_frame", partial: "pages/new_element_button", locals: { page: @element.page } %>
|
||||
<%= turbo_stream.append "element_list", @element %>
|
||||
5
app/views/elements/create.turbo_stream.slim
Normal file
5
app/views/elements/create.turbo_stream.slim
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
= turbo_stream.update "new_element_frame", partial: "pages/new_element_button", locals: { page: @element.page }
|
||||
= turbo_stream.append "element_list", @element
|
||||
= turbo_stream.append dom_id(@element.page, :page_nav_elements) do
|
||||
i.bi.bi-boxes.me-1
|
||||
= link_to("#{@element.number} #{@element.title}", "##{dom_id(@element)}", data: { "turbo": false })
|
||||
|
|
@ -5,33 +5,24 @@
|
|||
<tr>
|
||||
<th><%= Element.human_attribute_name(:id) %></th>
|
||||
|
||||
<th><%= Element.human_attribute_name(:report_id) %></th>
|
||||
|
||||
<th><%= Element.human_attribute_name(:path) %></th>
|
||||
<th><%= Element.human_attribute_name(:page_id) %></th>
|
||||
|
||||
<th><%= Element.human_attribute_name(:title) %></th>
|
||||
|
||||
<th><%= Element.human_attribute_name(:description_html) %></th>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @elements.each do |element| %>
|
||||
<tr>
|
||||
<td><%= link_to(element.id, url_for(element)) %></td>
|
||||
|
||||
<td><%= link_to(element.report_id, url_for(element)) %></td>
|
||||
|
||||
<td><%= link_to(element.path, url_for(element)) %></td>
|
||||
<td><%= link_to(element.page_id, url_for(element)) %></td>
|
||||
|
||||
<td><%= link_to(element.title, url_for(element)) %></td>
|
||||
|
||||
<td><%= link_to(truncate(element.description_html&.to_plain_text), url_for(element)) %></td>
|
||||
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_new", model: Element.model_name.human), new_element_path %>
|
||||
<%= link_to t("scaffold.link_new", model: Element.model_name.human), new_page_element_path(@page) %>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue