Avoid full page reloads on report#show
This commit is contained in:
parent
916b370905
commit
c44c9ccaba
7 changed files with 19 additions and 8 deletions
1
app/views/reports/_new_element_button.html.erb
Normal file
1
app/views/reports/_new_element_button.html.erb
Normal file
|
|
@ -0,0 +1 @@
|
|||
<%= link_to "#{tag.i(class: "bi bi-plus-lg")} Neues Element".html_safe, new_element_path(report_id: report.id), class: "btn btn-primary" %>
|
||||
|
|
@ -12,15 +12,17 @@
|
|||
|
||||
<div class="border-top pt-3">
|
||||
<%= turbo_frame_tag "new_element_frame" do %>
|
||||
<%= link_to "#{tag.i(class: "bi bi-plus-lg")} Neues Element".html_safe, new_element_path(report_id: @report.id), class: "btn btn-primary" %>
|
||||
<%= render partial: "reports/new_element_button", locals: { report: @report } %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% @report.elements.each do |element| %>
|
||||
<%= turbo_frame_tag dom_id(element, :frame) do %>
|
||||
<%= render element %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div id="element_list">
|
||||
<% @report.elements.each do |element| %>
|
||||
<%= turbo_frame_tag dom_id(element, :frame) do %>
|
||||
<%= render element %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="action-row">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue