From a57472d28203459b0765e08a4bd004050b97e0ed Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 3 Apr 2024 11:21:32 +0300 Subject: [PATCH 1/1] Add "All Blocks" nav tab to block list/show pages --- app/views/user_blocks/_navigation.html.erb | 7 +++++++ app/views/user_blocks/blocks_by.html.erb | 3 +++ app/views/user_blocks/blocks_on.html.erb | 3 +++ app/views/user_blocks/index.html.erb | 3 +++ app/views/user_blocks/show.html.erb | 7 ++----- config/locales/en.yml | 3 ++- 6 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 app/views/user_blocks/_navigation.html.erb diff --git a/app/views/user_blocks/_navigation.html.erb b/app/views/user_blocks/_navigation.html.erb new file mode 100644 index 000000000..5ca67afe5 --- /dev/null +++ b/app/views/user_blocks/_navigation.html.erb @@ -0,0 +1,7 @@ + diff --git a/app/views/user_blocks/blocks_by.html.erb b/app/views/user_blocks/blocks_by.html.erb index 87ff7f5b2..7fa0a4fbb 100644 --- a/app/views/user_blocks/blocks_by.html.erb +++ b/app/views/user_blocks/blocks_by.html.erb @@ -1,6 +1,9 @@ <% @title = t(".title", :name => @user.display_name) %> + +<% content_for :heading_class, "pb-0" %> <% content_for :heading do %>

<%= t(".heading_html", :name => link_to(@user.display_name, @user)) %>

+ <%= render :partial => "navigation" %> <% end %> <% unless @user_blocks.empty? %> diff --git a/app/views/user_blocks/blocks_on.html.erb b/app/views/user_blocks/blocks_on.html.erb index ed03342dc..0c15b8866 100644 --- a/app/views/user_blocks/blocks_on.html.erb +++ b/app/views/user_blocks/blocks_on.html.erb @@ -1,6 +1,9 @@ <% @title = t(".title", :name => @user.display_name) %> + +<% content_for :heading_class, "pb-0" %> <% content_for :heading do %>

<%= t(".heading_html", :name => link_to(@user.display_name, @user)) %>

+ <%= render :partial => "navigation" %> <% end %> <% unless @user_blocks.empty? %> diff --git a/app/views/user_blocks/index.html.erb b/app/views/user_blocks/index.html.erb index 57cef6055..4d200b516 100644 --- a/app/views/user_blocks/index.html.erb +++ b/app/views/user_blocks/index.html.erb @@ -1,6 +1,9 @@ <% @title = t(".title") %> + +<% content_for :heading_class, "pb-0" %> <% content_for :heading do %>

<%= t(".heading") %>

+ <%= render :partial => "navigation" %> <% end %> <% unless @user_blocks.empty? %> diff --git a/app/views/user_blocks/show.html.erb b/app/views/user_blocks/show.html.erb index 7e6566365..7b30d1920 100644 --- a/app/views/user_blocks/show.html.erb +++ b/app/views/user_blocks/show.html.erb @@ -2,15 +2,12 @@ :block_on => @user_block.user.display_name, :block_by => @user_block.creator.display_name) %> +<% content_for :heading_class, "pb-0" %> <% content_for :heading do %>

<%= t(".heading_html", :block_on => link_to(@user_block.user.display_name, @user_block.user), :block_by => link_to(@user_block.creator.display_name, @user_block.creator)) %>

- + <%= render :partial => "navigation" %> <% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 95edb8bb5..d4fedb46e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2970,7 +2970,6 @@ en: revoke: "Revoke!" confirm: "Are you sure?" reason: "Reason for block:" - back: "View all blocks" revoker: "Revoker:" needs_view: "The user needs to log in before this block will be cleared." block: @@ -2986,6 +2985,8 @@ en: revoker_name: "Revoked by" older: "Older Blocks" newer: "Newer Blocks" + navigation: + all_blocks: "All Blocks" user_mutes: index: title: "Muted Users" -- 2.39.5