]> git.openstreetmap.org Git - rails.git/commitdiff
Rework trace index to use secondary-actions
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 20 Jul 2022 16:36:01 +0000 (17:36 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 20 Jul 2022 16:45:35 +0000 (17:45 +0100)
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

app/views/traces/index.html.erb

index 693de7e1ab71946f1ab6a2ab83bb98fc8cc0bd54..840069a02b45e956c47de8add746e949dfbfd22d 100644 (file)
@@ -1,12 +1,18 @@
 <% content_for :heading_class, "pb-0" %>
 <% content_for :heading do %>
   <h1><%= @title %></h1>
-  <p>
-    <%= t(".description") %>
-    <% if params[:tag] %>
-      <%= 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" } %>
-    <% end %>
-  </p>
+  <nav class="secondary-actions mb-3">
+    <ul>
+      <li>
+        <%= t(".description") %>
+      </li>
+      <% 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">
     <% if @target_user.blank? %>
       <!-- public traces -->