Traces: Migrate pagination to bootstrap

Same feature, different style.
- Change pagination to use bootstrap default styles
- … but with empty span-tags instead of non-active a-tags
- refactor partial to not use @-variables but get the variables via
the render-call, simplify render-call-syntax
- remove the additional `if @traces.size > 1` inside the pagination
partial since that caused the pagination to disappear on the last page.
The partial will be visible with inactive links.
- Add bootstrap spacer-classes to overwrite commons-css so removing. Eg.
commons also has a pagination class same as bootstrap.
This commit is contained in:
Tobias Jordans 2021-01-02 22:48:25 +01:00
parent 430872ad7b
commit 18ec273038
2 changed files with 28 additions and 19 deletions

View file

@ -23,15 +23,15 @@
<% end %>
<% if @traces.size > 0 %>
<%= render :partial => "trace_paging_nav" %>
<%= render "trace_paging_nav", :page => @page, :page_size => @page_size, :traces => @traces, :params => @params %>
<table id="trace_list" class="table table-borderless table-striped">
<table id="trace_list" class="table table-borderless table-striped mb-0">
<tbody>
<%= render @traces unless @traces.nil? %>
</tbody>
</table>
<%= render :partial => "trace_paging_nav" %>
<%= render "trace_paging_nav", :page => @page, :page_size => @page_size, :traces => @traces, :params => @params %>
<% else %>
<h4><%= t ".empty_html", :upload_link => new_trace_path %></h4>
<% end %>