Reload only changeset element subpages

This commit is contained in:
Anton Khorev 2024-03-06 15:55:37 +03:00
parent fee3a08368
commit 5add2d7e1d
6 changed files with 71 additions and 21 deletions

View file

@ -1,6 +1,6 @@
<div>
<%= turbo_frame_tag "changeset_#{type.pluralize}" do %>
<%= render :partial => "paging_nav", :locals => { :type => type, :pages => pages } %>
<ul class="list-unstyled">
<ul class="list-unstyled" data-turbo="false">
<% elements.each do |element| %>
<%= element_list_item type, element do
t "printable_name.current_and_old_links_html",
@ -9,4 +9,4 @@
end %>
<% end %>
</ul>
</div>
<% end %>

View file

@ -1,6 +1,11 @@
<div class="d-flex flex-wrap gap-2">
<h4 class="fs-5 mb-0"><%= type_and_paginated_count(type, pages) %></h4>
<% if pages.page_count > 1 %>
<%= sidebar_classic_pagination(pages, "#{type}_page") { |page| type_and_paginated_count(type, pages, page) } %>
<%= sidebar_classic_pagination(pages, "#{type}_page") do |page|
{
:title => type_and_paginated_count(type, pages, page),
:data => { :turbo => "true" }
}
end %>
<% end %>
</div>