mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
UX: emphasizes on local-dates being UTC in excerpts (#8208)
This commit is contained in:

committed by
Robin Ward

parent
ecfba0bb37
commit
54bc2bdba7
@ -53,6 +53,12 @@ after_initialize do
|
||||
custom_fields[DiscourseLocalDates::POST_CUSTOM_FIELD] || []
|
||||
end
|
||||
|
||||
on(:reduce_excerpt) do |fragment, post|
|
||||
fragment.css('.discourse-local-date').each do |container|
|
||||
container.content = "#{container.content} (UTC)"
|
||||
end
|
||||
end
|
||||
|
||||
on(:reduce_cooked) do |fragment|
|
||||
fragment.css('.discourse-local-date').each do |container|
|
||||
if container.attributes['data-email-preview']
|
||||
|
Reference in New Issue
Block a user