From: Anton Khorev Date: Wed, 6 Mar 2024 12:22:02 +0000 (+0300) Subject: Refactor common changeset element subpages code X-Git-Tag: live~255^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/fee3a0836842d32fbeeb8b7e96c5ec77eb356d20?ds=sidebyside Refactor common changeset element subpages code --- diff --git a/app/views/changesets/_elements.html.erb b/app/views/changesets/_elements.html.erb new file mode 100644 index 000000000..37ef2d122 --- /dev/null +++ b/app/views/changesets/_elements.html.erb @@ -0,0 +1,12 @@ +
+ <%= render :partial => "paging_nav", :locals => { :type => type, :pages => pages } %> + +
diff --git a/app/views/changesets/show.html.erb b/app/views/changesets/show.html.erb index d44ccfc07..110caab03 100644 --- a/app/views/changesets/show.html.erb +++ b/app/views/changesets/show.html.erb @@ -77,42 +77,15 @@ <% end %> <% unless @ways.empty? %> - <%= render :partial => "paging_nav", :locals => { :type => "way", :pages => @way_pages } %> - + <%= render :partial => "elements", :locals => { :type => "way", :elements => @ways, :pages => @way_pages } %> <% end %> <% unless @relations.empty? %> - <%= render :partial => "paging_nav", :locals => { :type => "relation", :pages => @relation_pages } %> - + <%= render :partial => "elements", :locals => { :type => "relation", :elements => @relations, :pages => @relation_pages } %> <% end %> <% unless @nodes.empty? %> - <%= render :partial => "paging_nav", :locals => { :type => "node", :pages => @node_pages } %> - + <%= render :partial => "elements", :locals => { :type => "node", :elements => @nodes, :pages => @node_pages } %> <% end %>