Add "Blocks on Me" nav tab to block list/show pages

This commit is contained in:
Anton Khorev 2024-04-03 11:36:42 +03:00
parent a57472d282
commit 288b8e1104
2 changed files with 8 additions and 0 deletions

View file

@ -4,4 +4,11 @@
user_blocks_path,
:class => ["nav-link", { :active => action_name == "index" }] %>
</li>
<% if current_user&.blocks&.exists? %>
<li class="nav-item">
<%= link_to t(".blocks_on_me"),
user_blocks_on_path(current_user),
:class => ["nav-link", { :active => action_name == "blocks_on" && current_user == @user }] %>
</li>
<% end %>
</ul>