From 031dc0fe1b638a45849c8fa36e51f077fe2cf9c1 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 3 Apr 2024 12:17:01 +0300 Subject: [PATCH] Add "Blocks on user" nav tab to block list/show pages --- app/views/user_blocks/_navigation.html.erb | 8 ++++++++ config/locales/en.yml | 1 + 2 files changed, 9 insertions(+) diff --git a/app/views/user_blocks/_navigation.html.erb b/app/views/user_blocks/_navigation.html.erb index b7cc19ecf..bd389edbf 100644 --- a/app/views/user_blocks/_navigation.html.erb +++ b/app/views/user_blocks/_navigation.html.erb @@ -11,6 +11,14 @@ :class => ["nav-link", { :active => action_name == "blocks_on" && current_user == @user }] %> <% end %> + <% on_user = @user || @user_block&.user %> + <% if on_user != current_user && on_user&.blocks&.exists? %> + + <% end %> <% if current_user&.blocks_created&.exists? %>