]> git.openstreetmap.org Git - rails.git/blob - app/views/user_blocks/_navigation.html.erb
Remove unused #container css
[rails.git] / app / views / user_blocks / _navigation.html.erb
1 <ul class="nav nav-tabs">
2   <li class="nav-item">
3     <%= link_to t(".all_blocks"),
4                 user_blocks_path,
5                 :class => ["nav-link", { :active => action_name == "index" }] %>
6   </li>
7   <% if current_user&.blocks&.exists? %>
8     <li class="nav-item">
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 }] %>
12     </li>
13   <% end %>
14   <% on_user = @user || @user_block&.user %>
15   <% if on_user != current_user && on_user&.blocks&.exists? %>
16     <li class="nav-item">
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" }] %>
20     </li>
21   <% end %>
22   <% if current_user&.blocks_created&.exists? %>
23     <li class="nav-item">
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 }] %>
27     </li>
28   <% end %>
29   <% by_user = @user || @user_block&.creator %>
30   <% if by_user != current_user && by_user&.blocks_created&.exists? %>
31     <li class="nav-item">
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" }] %>
35     </li>
36   <% end %>
37   <% if @user_block %>
38     <li class="nav-item">
39       <%= link_to t(".block", :id => @user_block.id),
40                   user_block_path(@user_block),
41                   :class => ["nav-link", { :active => action_name == "show" }] %>
42     </li>
43   <% end %>
44 </ul>