From: Anton Khorev Date: Wed, 3 Apr 2024 10:05:48 +0000 (+0300) Subject: Add "Blocks by user" nav tab to block list/show pages X-Git-Tag: live~784^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/5273b4357888a931ac9cd0513770d4350eb27723 Add "Blocks by user" nav tab to block list/show pages --- 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"