Improve behaviour of secondary action lists when wrapping

Based on https://stackoverflow.com/a/31732902 this ensure that when
a secondary action list wraps the additional lines don't start with
an item delimiter by pushing it to the left, outside of a parent nav
element which then hides it.
This commit is contained in:
Tom Hughes 2021-08-21 15:32:47 +01:00
parent 3f8cf32272
commit 29e9857145
10 changed files with 247 additions and 223 deletions

View file

@ -44,14 +44,16 @@
</td>
<td>
<% if trace.inserted? %>
<ul class="secondary-actions">
<li>
<%= link_to t(".view_map"), { :controller => "site", :action => "index", :mlat => trace.latitude, :mlon => trace.longitude, :anchor => "map=14/#{trace.latitude}/#{trace.longitude}" } %>
</li>
<li>
<%= link_to t(".edit_map"), { :controller => "site", :action => "edit", :gpx => trace.id } %>
</li>
</ul>
<nav class="secondary-actions">
<ul>
<li>
<%= link_to t(".view_map"), { :controller => "site", :action => "index", :mlat => trace.latitude, :mlon => trace.longitude, :anchor => "map=14/#{trace.latitude}/#{trace.longitude}" } %>
</li>
<li>
<%= link_to t(".edit_map"), { :controller => "site", :action => "edit", :gpx => trace.id } %>
</li>
</ul>
</nav>
<% end %>
</td>
</tr>