From 5273b4357888a931ac9cd0513770d4350eb27723 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 3 Apr 2024 13:05:48 +0300 Subject: [PATCH] Add "Blocks by 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 bd389edbf..a84ba1339 100644 --- a/app/views/user_blocks/_navigation.html.erb +++ b/app/views/user_blocks/_navigation.html.erb @@ -26,4 +26,12 @@ :class => ["nav-link", { :active => action_name == "blocks_by" && current_user == @user }] %> <% end %> + <% by_user = @user || @user_block&.creator %> + <% if by_user != current_user && by_user&.blocks_created&.exists? %> + + <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 96dd67956..0634fc2a0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2990,6 +2990,7 @@ en: blocks_on_me: "Blocks on Me" blocks_on_user: "Blocks on %{user}" blocks_by_me: "Blocks by Me" + blocks_by_user: "Blocks by %{user}" user_mutes: index: title: "Muted Users" -- 2.39.5