From f4e998804d57cedd16547e5e0c42611d60015d41 Mon Sep 17 00:00:00 2001 From: Tobias Jordans Date: Sat, 2 Jan 2021 22:36:49 +0100 Subject: [PATCH] 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` --- app/controllers/traces_controller.rb | 1 - app/views/layouts/_content.html.erb | 2 +- app/views/traces/index.html.erb | 66 +++++++++++++++++++++------- 3 files changed, 52 insertions(+), 17 deletions(-) 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 %>

-