]> git.openstreetmap.org Git - rails.git/commitdiff
Show the crafted duration of a block independent of the reading time
authorpolarbearing <polarbearing@users.noreply.github.com>
Tue, 23 Mar 2021 11:37:14 +0000 (12:37 +0100)
committerGitHub <noreply@github.com>
Tue, 23 Mar 2021 11:37:14 +0000 (12:37 +0100)
Fixes #3143.
Not tested by myself. Treat like pseudocode, I don't speak Ruby.

app/views/user_blocks/show.html.erb

index 52c099ee40318654f27bfc188bace36aad21dc42..1b5609e25b32130e2e80d9f9b69a5c6397ce242c 100644 (file)
 </p>
 <% end %>
 
-<p><b><%= t ".created" %></b>: <%= friendly_date_ago(@user_block.created_at) %></p>
+<p>
+  <b><%= t ".created" %></b>: <%= friendly_date_ago(@user_block.created_at) %>
+  (<%= block_duration_in_words(@user_block.ends_at - @user_block.created_at) %>)
+</p>
 
 <p><b><%= t ".status" %></b>: <%= block_status(@user_block) %></p>