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

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

View file

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