about summary refs log tree commit diff
path: root/app/views/disputes/strikes
diff options
context:
space:
mode:
authorFrancis Murillo <evacuee.overlap.vs3op@aleeas.com>2022-12-15 15:35:25 +0000
committerGitHub <noreply@github.com>2022-12-15 16:35:25 +0100
commitc50e9d078aa3c353afc140669f1cedcd354ee53e (patch)
tree2f0b24370f87f8eee6bd103cbaad1610de7ca457 /app/views/disputes/strikes
parentf0cebaee00f80270bef7a7ce8e03597dd118ad23 (diff)
Render current day formats in the client timezone (#21878)
* Fix remaining plain %time to %time.formatted

* Add %time.relative-formatted to client format dates on the current day

* Add missing comma dangle to formats

* Use client side message format instead of the server

* Add fallback message to relatve_format.today

* Remove unused translation key and fix js lint issue

Co-authored-by: Effy Elden <effy@effy.space>
Diffstat (limited to 'app/views/disputes/strikes')
-rw-r--r--app/views/disputes/strikes/show.html.haml7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/views/disputes/strikes/show.html.haml b/app/views/disputes/strikes/show.html.haml
index 4a3005f72..cab0a17eb 100644
--- a/app/views/disputes/strikes/show.html.haml
+++ b/app/views/disputes/strikes/show.html.haml
@@ -110,11 +110,8 @@
       .report-notes__item__header
         %span.username
           = link_to @appeal.account.username, can?(:show, @appeal.account) ? admin_account_path(@appeal.account_id) : short_account_url(@appeal.account)
-        %time{ datetime: @appeal.created_at.iso8601, title: l(@appeal.created_at) }
-          - if @appeal.created_at.today?
-            = t('admin.report_notes.today_at', time: l(@appeal.created_at, format: :time))
-          - else
-            = l @appeal.created_at.to_date
+        %time.relative-formatted{ datetime: @appeal.created_at.iso8601 }
+          = t('admin.report_notes.created_at')
 
       .report-notes__item__content
         = simple_format(h(@appeal.text))