:class => ["nav-link", { :active => action_name == "blocks_by" }] %>
</li>
<% end %>
- <% if @user_block %>
+ <% if @user_block&.persisted? %>
<li class="nav-item">
<%= link_to t(".block", :id => @user_block.id),
user_block_path(@user_block),
:class => "nav-link active" %>
</li>
+ <% elsif @user_block&.new_record? %>
+ <li class="nav-item">
+ <%= link_to t(".new_block"),
+ new_user_block_path,
+ :class => "nav-link active" %>
+ </li>
<% end %>
</ul>
<% @title = t ".title", :name => @user.display_name %>
+
+<% content_for :heading_class, "pb-0" %>
<% content_for :heading do %>
<h1><%= t(".heading_html", :name => link_to(@user.display_name, @user)) %></h1>
+ <%= render :partial => "navigation" %>
<% end %>
+
<%= bootstrap_form_for(@user_block) do |f| %>
<%= hidden_field_tag "display_name", @user.display_name, :autocomplete => "off" %>
<%= f.richtext_field :reason, :cols => 80, :rows => 20 %>
<% end %>
<%= f.primary %>
- <%= link_to t(".back"), user_blocks_path, :class => "btn btn-link" %>
<% end %>
title: "Creating block on %{name}"
heading_html: "Creating block on %{name}"
period: "How long, starting now, the user will be blocked from the API for."
- back: "View all blocks"
edit:
title: "Editing block on %{name}"
heading_html: "Editing block on %{name}"
blocks_by_me: "Blocks by Me"
blocks_by_user: "Blocks by %{user}"
block: "Block #%{id}"
+ new_block: "New Block"
user_mutes:
index:
title: "Muted Users"