mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 03:19:10 +00:00
minor refactoring to improve code readability
This commit is contained in:
parent
dcd7b92532
commit
e0c16d3a8a
@ -54,19 +54,16 @@
|
||||
%>
|
||||
<%= t("js.action_codes.#{post.action_code}", when: "", who: who_username).html_safe %>
|
||||
<% end %>
|
||||
<%
|
||||
if post.updated_at > post.created_at
|
||||
display_time, display_time_prop = post.updated_at, "dateModified"
|
||||
%>
|
||||
<meta itemprop='datePublished' content='<%= post.created_at.to_formatted_s(:iso8601) %>'>
|
||||
<%
|
||||
else
|
||||
display_time, display_time_prop = post.created_at, "datePublished"
|
||||
end
|
||||
%>
|
||||
<time datetime='<%= display_time.to_formatted_s(:iso8601) %>' itemprop='<%= display_time_prop %>'>
|
||||
<%= display_time %>
|
||||
</time>
|
||||
<% if post.updated_at > post.created_at %>
|
||||
<meta itemprop='datePublished' content='<%= post.created_at.to_formatted_s(:iso8601) %>'>
|
||||
<time itemprop='dateModified' datetime='<%= post.updated_at.to_formatted_s(:iso8601) %>'>
|
||||
<%= post.updated_at %>
|
||||
</time>
|
||||
<% else %>
|
||||
<time itemprop='datePublished' datetime='<%= post.created_at.to_formatted_s(:iso8601) %>'>
|
||||
<%= post.created_at %>
|
||||
</time>
|
||||
<% end %>
|
||||
</span>
|
||||
<span itemprop='position'>#<%= post.post_number %></span>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user