Rework browse pages to avoid raw html in translations

This commit is contained in:
Andy Allan 2023-03-22 18:36:13 +00:00
parent a859fe1acf
commit 4ac0c9c1e8
4 changed files with 15 additions and 19 deletions

View file

@ -21,14 +21,10 @@ module ChangesetsHelper
end
if params.key?(:display_name)
t "browse.#{action}_html",
:time => time,
:title => title
t "browse.#{action}_ago_html", :time_ago => tag.abbr(time, :title => title)
else
t "browse.#{action}_by_html",
:time => time,
:title => title,
:user => changeset_user_link(changeset)
t "browse.#{action}_ago_by_html", :time_ago => tag.abbr(time, :title => title),
:user => changeset_user_link(changeset)
end
end

View file

@ -13,10 +13,10 @@
<ul class="list-unstyled">
<li>
<%= t "browse.#{common_details.visible? ? :edited : :deleted}_by_html",
:time => time_ago_in_words(common_details.timestamp, :scope => :"datetime.distance_in_words_ago"),
:user => changeset_user_link(common_details.changeset),
:title => l(common_details.timestamp) %>
<%= t "browse.#{common_details.visible? ? :edited : :deleted}_ago_by_html",
:time_ago => tag.abbr(time_ago_in_words(common_details.timestamp, :scope => :"datetime.distance_in_words_ago"),
:title => l(common_details.timestamp)),
:user => changeset_user_link(common_details.changeset) %>
</li>
<li>
<%= t "browse.in_changeset" %>