1 <ul class="nav nav-tabs">
3 <%= link_to t(".all_blocks"),
5 :class => ["nav-link", { :active => action_name == "index" }] %>
7 <% if current_user&.blocks&.exists? %>
9 <%= link_to t(".blocks_on_me"),
10 user_blocks_on_path(current_user),
11 :class => ["nav-link", { :active => action_name == "blocks_on" && current_user == @user }] %>
14 <% on_user = @user || @user_block&.user %>
15 <% if on_user != current_user && on_user&.blocks&.exists? %>
17 <%= link_to t(".blocks_on_user", :user => on_user.display_name),
18 user_blocks_on_path(on_user),
19 :class => ["nav-link", { :active => action_name == "blocks_on" }] %>
22 <% if current_user&.blocks_created&.exists? %>
24 <%= link_to t(".blocks_by_me"),
25 user_blocks_by_path(current_user),
26 :class => ["nav-link", { :active => action_name == "blocks_by" && current_user == @user }] %>
29 <% by_user = @user || @user_block&.creator %>
30 <% if by_user != current_user && by_user&.blocks_created&.exists? %>
32 <%= link_to t(".blocks_by_user", :user => by_user.display_name),
33 user_blocks_by_path(by_user),
34 :class => ["nav-link", { :active => action_name == "blocks_by" }] %>