Add "All Blocks" nav tab to block list/show pages
This commit is contained in:
parent
7d7126736e
commit
a57472d282
6 changed files with 20 additions and 6 deletions
7
app/views/user_blocks/_navigation.html.erb
Normal file
7
app/views/user_blocks/_navigation.html.erb
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<ul class="nav nav-tabs">
|
||||||
|
<li class="nav-item">
|
||||||
|
<%= link_to t(".all_blocks"),
|
||||||
|
user_blocks_path,
|
||||||
|
:class => ["nav-link", { :active => action_name == "index" }] %>
|
||||||
|
</li>
|
||||||
|
</ul>
|
|
@ -1,6 +1,9 @@
|
||||||
<% @title = t(".title", :name => @user.display_name) %>
|
<% @title = t(".title", :name => @user.display_name) %>
|
||||||
|
|
||||||
|
<% content_for :heading_class, "pb-0" %>
|
||||||
<% content_for :heading do %>
|
<% content_for :heading do %>
|
||||||
<h1><%= t(".heading_html", :name => link_to(@user.display_name, @user)) %></h1>
|
<h1><%= t(".heading_html", :name => link_to(@user.display_name, @user)) %></h1>
|
||||||
|
<%= render :partial => "navigation" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% unless @user_blocks.empty? %>
|
<% unless @user_blocks.empty? %>
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<% @title = t(".title", :name => @user.display_name) %>
|
<% @title = t(".title", :name => @user.display_name) %>
|
||||||
|
|
||||||
|
<% content_for :heading_class, "pb-0" %>
|
||||||
<% content_for :heading do %>
|
<% content_for :heading do %>
|
||||||
<h1><%= t(".heading_html", :name => link_to(@user.display_name, @user)) %></h1>
|
<h1><%= t(".heading_html", :name => link_to(@user.display_name, @user)) %></h1>
|
||||||
|
<%= render :partial => "navigation" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% unless @user_blocks.empty? %>
|
<% unless @user_blocks.empty? %>
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<% @title = t(".title") %>
|
<% @title = t(".title") %>
|
||||||
|
|
||||||
|
<% content_for :heading_class, "pb-0" %>
|
||||||
<% content_for :heading do %>
|
<% content_for :heading do %>
|
||||||
<h1><%= t(".heading") %></h1>
|
<h1><%= t(".heading") %></h1>
|
||||||
|
<%= render :partial => "navigation" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% unless @user_blocks.empty? %>
|
<% unless @user_blocks.empty? %>
|
||||||
|
|
|
@ -2,15 +2,12 @@
|
||||||
:block_on => @user_block.user.display_name,
|
:block_on => @user_block.user.display_name,
|
||||||
:block_by => @user_block.creator.display_name) %>
|
:block_by => @user_block.creator.display_name) %>
|
||||||
|
|
||||||
|
<% content_for :heading_class, "pb-0" %>
|
||||||
<% content_for :heading do %>
|
<% content_for :heading do %>
|
||||||
<h1><%= t(".heading_html",
|
<h1><%= t(".heading_html",
|
||||||
:block_on => link_to(@user_block.user.display_name, @user_block.user),
|
:block_on => link_to(@user_block.user.display_name, @user_block.user),
|
||||||
:block_by => link_to(@user_block.creator.display_name, @user_block.creator)) %></h1>
|
:block_by => link_to(@user_block.creator.display_name, @user_block.creator)) %></h1>
|
||||||
<nav class='secondary-actions'>
|
<%= render :partial => "navigation" %>
|
||||||
<ul class='clearfix'>
|
|
||||||
<li><%= link_to t(".back"), user_blocks_path %></li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<dl class="row">
|
<dl class="row">
|
||||||
|
|
|
@ -2970,7 +2970,6 @@ en:
|
||||||
revoke: "Revoke!"
|
revoke: "Revoke!"
|
||||||
confirm: "Are you sure?"
|
confirm: "Are you sure?"
|
||||||
reason: "Reason for block:"
|
reason: "Reason for block:"
|
||||||
back: "View all blocks"
|
|
||||||
revoker: "Revoker:"
|
revoker: "Revoker:"
|
||||||
needs_view: "The user needs to log in before this block will be cleared."
|
needs_view: "The user needs to log in before this block will be cleared."
|
||||||
block:
|
block:
|
||||||
|
@ -2986,6 +2985,8 @@ en:
|
||||||
revoker_name: "Revoked by"
|
revoker_name: "Revoked by"
|
||||||
older: "Older Blocks"
|
older: "Older Blocks"
|
||||||
newer: "Newer Blocks"
|
newer: "Newer Blocks"
|
||||||
|
navigation:
|
||||||
|
all_blocks: "All Blocks"
|
||||||
user_mutes:
|
user_mutes:
|
||||||
index:
|
index:
|
||||||
title: "Muted Users"
|
title: "Muted Users"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue