From 2955fe4d4b5ef2d8c0f0fae850ffda8ab7493253 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 28 Apr 2021 17:28:30 +0100 Subject: [PATCH] Refactor user blocks information to use a dl This also standardises the labels to have the colon, in common with oauth_clients#show. --- app/views/user_blocks/show.html.erb | 28 ++++++++++++++-------------- config/locales/en.yml | 6 +++--- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/views/user_blocks/show.html.erb b/app/views/user_blocks/show.html.erb index 0204908dd..64f7299ef 100644 --- a/app/views/user_blocks/show.html.erb +++ b/app/views/user_blocks/show.html.erb @@ -21,18 +21,18 @@ <% end %> -<% if @user_block.revoker %> -

- <%= t ".revoker" %> - <%= link_to @user_block.revoker.display_name, user_path(@user_block.revoker) %> -

-<% end %> - -

<%= t ".created" %>: <%= friendly_date_ago(@user_block.created_at) %>

- -

<%= t ".duration" %>: <%= block_duration_in_words(@user_block.ends_at - @user_block.created_at) %>

- -

<%= t ".status" %>: <%= block_status(@user_block) %>

+
+ <% if @user_block.revoker %> +
<%= t ".revoker" %>
+
<%= link_to @user_block.revoker.display_name, user_path(@user_block.revoker) %>
+ <% end %> -

<%= t ".reason" %>

-
<%= @user_block.reason.to_html %>
+
<%= t ".created" %>
+
<%= friendly_date_ago(@user_block.created_at) %>
+
<%= t ".duration" %>
+
<%= block_duration_in_words(@user_block.ends_at - @user_block.created_at) %>
+
<%= t ".status" %>
+
<%= block_status(@user_block) %>
+
<%= t ".reason" %>
+
<%= @user_block.reason.to_html %>
+
diff --git a/config/locales/en.yml b/config/locales/en.yml index eb6d0e078..cfe717fe2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2610,9 +2610,9 @@ en: show: title: "%{block_on} blocked by %{block_by}" heading_html: "%{block_on} blocked by %{block_by}" - created: "Created" - duration: "Duration" - status: "Status" + created: "Created:" + duration: "Duration:" + status: "Status:" show: "Show" edit: "Edit" revoke: "Revoke!" -- 2.43.2