From: polarbearing
Date: Tue, 23 Mar 2021 11:37:14 +0000 (+0100)
Subject: Show the crafted duration of a block independent of the reading time
X-Git-Tag: live~2555^2~1
X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/b4e2f8e34f35c345ee1a582fddbcbd4152c5389e
Show the crafted duration of a block independent of the reading time
Fixes #3143.
Not tested by myself. Treat like pseudocode, I don't speak Ruby.
---
diff --git a/app/views/user_blocks/show.html.erb b/app/views/user_blocks/show.html.erb
index 52c099ee4..1b5609e25 100644
--- a/app/views/user_blocks/show.html.erb
+++ b/app/views/user_blocks/show.html.erb
@@ -28,7 +28,10 @@
<% end %>
-<%= t ".created" %>: <%= friendly_date_ago(@user_block.created_at) %>
+
+ <%= t ".created" %>: <%= friendly_date_ago(@user_block.created_at) %>
+ (<%= block_duration_in_words(@user_block.ends_at - @user_block.created_at) %>)
+
<%= t ".status" %>: <%= block_status(@user_block) %>