docbrown/app/views/comments/_comment_date.erb
Efereyan Karen Simisola fc7ed20a9f
Publicly indicate if someone edits their comments (#10524)
* Publicly indicate if someone edits their comments

Signed-off-by: Efereyan Karen Simisola <thedevkaren@gmail.com>

* Implement required changes for date edited

* Add methods for readable publish date and edited at in comment decorator

Signed-off-by: Efereyan Karen Simisola <thedevkaren@gmail.com>

* Fix syntax error and decorator naming error

* Add tests

* Update app/views/comments/_comment_date.erb

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

Co-authored-by: rhymes <rhymes@hey.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2021-03-02 09:47:25 +07:00

15 lines
579 B
Text

<span class="color-base-30 px-2" role="presentation">&bull;</span>
<a href="<%= URL.comment(decorated_comment) %>" class="comment-date crayons-link crayons-link--secondary fs-s">
<time datetime="<%= decorated_comment.published_timestamp %>">
<%= decorated_comment.readable_publish_date %>
</time>
<% if decorated_comment.edited_at.present? %>
&bull; Edited
<span class="hidden m:inline-block">
on <time datetime="<%= decorated_comment.edited_timestamp %>">
<%= decorated_comment.edited_at.strftime('%b %-d') %></time>
</span>
<% end %>
</a>