From: Tobias Jordans Date: Sat, 2 Jan 2021 21:36:49 +0000 (+0100) Subject: Traces#index: Introduce tab navigation, fix tag-filter X-Git-Tag: live~2048^2~7 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/f4e998804d57cedd16547e5e0c42611d60015d41 Traces#index: Introduce tab navigation, fix tag-filter - introduce bootstrap tabs to switch the views - introduce `content_for :heading_class` to remove the padding below the bootstrap tabs - update the rss-image to use a svg, adopted from https://icons.getbootstrap.com/icons/rss/ (without the outer border) - move rss- and new-button away from the view-switching actions - the `@tag` logic was broken. introduce new link to remove the tag-filter; the tabs keep the filter once given; use params[:tag] directly in the view - use `&.` syntax nil-safety so we can remove `@display_name` --- diff --git a/app/controllers/traces_controller.rb b/app/controllers/traces_controller.rb index 0d3a1aa33..b4853c6b8 100644 --- a/app/controllers/traces_controller.rb +++ b/app/controllers/traces_controller.rb @@ -67,7 +67,6 @@ class TracesController < ApplicationController # final helper vars for view @target_user = target_user - @display_name = target_user.display_name if target_user end def mine diff --git a/app/views/layouts/_content.html.erb b/app/views/layouts/_content.html.erb index a4d93cc0e..cfb8d712c 100644 --- a/app/views/layouts/_content.html.erb +++ b/app/views/layouts/_content.html.erb @@ -5,7 +5,7 @@ <%= render :partial => "layouts/flash", :locals => { :flash => flash } %> <% if content_for? :heading %>
-
+
<%= yield :heading %>
diff --git a/app/views/traces/index.html.erb b/app/views/traces/index.html.erb index b38436c0a..612a47e80 100644 --- a/app/views/traces/index.html.erb +++ b/app/views/traces/index.html.erb @@ -1,25 +1,61 @@ +<% content_for :heading_class, 'pb-0' %> <% content_for :heading do %>

<%= @title %>

-