Add "Blocks on user" nav tab to block list/show pages
This commit is contained in:
parent
1861bcf640
commit
031dc0fe1b
2 changed files with 9 additions and 0 deletions
|
@ -11,6 +11,14 @@
|
|||
:class => ["nav-link", { :active => action_name == "blocks_on" && current_user == @user }] %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% on_user = @user || @user_block&.user %>
|
||||
<% if on_user != current_user && on_user&.blocks&.exists? %>
|
||||
<li class="nav-item">
|
||||
<%= link_to t(".blocks_on_user", :user => on_user.display_name),
|
||||
user_blocks_on_path(on_user),
|
||||
:class => ["nav-link", { :active => action_name == "blocks_on" }] %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if current_user&.blocks_created&.exists? %>
|
||||
<li class="nav-item">
|
||||
<%= link_to t(".blocks_by_me"),
|
||||
|
|
|
@ -2988,6 +2988,7 @@ en:
|
|||
navigation:
|
||||
all_blocks: "All Blocks"
|
||||
blocks_on_me: "Blocks on Me"
|
||||
blocks_on_user: "Blocks on %{user}"
|
||||
blocks_by_me: "Blocks by Me"
|
||||
user_mutes:
|
||||
index:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue