1 <% @title = t(".title",
2 :block_on => @user_block.user.display_name,
3 :block_by => @user_block.creator.display_name) %>
5 <% content_for :heading do %>
6 <h1><%= t(".heading_html",
7 :block_on => link_to(@user_block.user.display_name, @user_block.user),
8 :block_by => link_to(@user_block.creator.display_name, @user_block.creator)) %></h1>
9 <nav class='secondary-actions'>
11 <li><%= link_to t(".back"), user_blocks_path %></li>
17 <% if @user_block.revoker %>
18 <dt class="col-sm-3"><%= t ".revoker" %></dt>
19 <dd class="col-sm-9"><%= link_to @user_block.revoker.display_name, @user_block.revoker %></dd>
22 <dt class="col-sm-3"><%= t ".created" %></dt>
23 <dd class="col-sm-9"><%= friendly_date_ago(@user_block.created_at) %></dd>
24 <dt class="col-sm-3"><%= t ".duration" %></dt>
25 <dd class="col-sm-9"><%= block_duration_in_words(@user_block.ends_at - @user_block.created_at) %></dd>
26 <dt class="col-sm-3"><%= t ".status" %></dt>
27 <dd class="col-sm-9"><%= block_status(@user_block) %></dd>
28 <dt class="col-sm-3"><%= t ".reason" %></dt>
29 <dd class="col-sm-9"><div class="richtext text-break"><%= @user_block.reason.to_html %></div></dd>
32 <% if @user_block.ends_at > Time.now.getutc && (current_user&.id == @user_block.creator_id ||
33 can?(:revoke, UserBlock)) %>
35 <% if current_user&.id == @user_block.creator_id %>
36 <%= link_to t(".edit"), edit_user_block_path(@user_block), :class => "btn btn-outline-primary" %>
38 <% if can?(:revoke, UserBlock) %>
39 <%= link_to t(".revoke"), revoke_user_block_path(@user_block), :class => "btn btn-outline-danger" %>