Rework trace index to use secondary-actions

The border between items is familiar UI, so we can keep it, but lets
use the secondary-actions approach instead.

This avoids using left-right specific border, margin and padding
classes
This commit is contained in:
Andy Allan 2022-07-20 17:36:01 +01:00
parent 698d7a0668
commit 4e06fe054a

View file

@ -1,12 +1,18 @@
<% content_for :heading_class, "pb-0" %> <% content_for :heading_class, "pb-0" %>
<% content_for :heading do %> <% content_for :heading do %>
<h1><%= @title %></h1> <h1><%= @title %></h1>
<p> <nav class="secondary-actions mb-3">
<%= t(".description") %> <ul>
<% if params[:tag] %> <li>
<%= link_to t(".remove_tag_filter", :tag => params[:tag]), { :controller => "traces", :action => "index", :display_name => nil, :tag => nil, :page => nil }, { :class => "border-left ml-2 pl-2" } %> <%= t(".description") %>
<% end %> </li>
</p> <% if params[:tag] %>
<li>
<%= link_to t(".remove_tag_filter", :tag => params[:tag]), { :controller => "traces", :action => "index", :display_name => nil, :tag => nil, :page => nil } %>
</li>
<% end %>
</ul>
</nav>
<ul class="nav nav-tabs flex-column flex-sm-row"> <ul class="nav nav-tabs flex-column flex-sm-row">
<% if @target_user.blank? %> <% if @target_user.blank? %>
<!-- public traces --> <!-- public traces -->