Skip to content
Snippets Groups Projects
Unverified Commit d8d3c892 authored by ArtOfCode's avatar ArtOfCode Committed by GitHub
Browse files

Merge pull request #151 from galegosimpatico/edit-time-20200826

parents b7d87d7d 9bab1738
No related branches found
No related tags found
No related merge requests found
...@@ -101,6 +101,9 @@ ...@@ -101,6 +101,9 @@
<div class="post--body"> <div class="post--body">
<%= raw(sanitize(post.body, scrubber: scrubber)) %> <%= raw(sanitize(post.body, scrubber: scrubber)) %>
<% been_edited = post.last_activity_by_id != nil %>
<% if (been_edited) then last_edited_by_self = post.user_id == post.last_activity_by_id end %>
<div class="post--meta has-margin-bottom-4"> <div class="post--meta has-margin-bottom-4">
<%= render 'users/post_usercard', post: post %> <%= render 'users/post_usercard', post: post %>
<% if has_tags %> <% if has_tags %>
...@@ -118,16 +121,29 @@ ...@@ -118,16 +121,29 @@
<% end %> <% end %>
</div> </div>
<% end %> <% end %>
<% if post.license.present? || been_edited %>
<div class="post--licensing--edited has-margin-left-2">
<% if post.license.present? %> <% if post.license.present? %>
<div class="post--licensing has-margin-left-2">
<i class="fas fa-balance-scale" title="License"></i> <i class="fas fa-balance-scale" title="License"></i>
<%= link_to post.license.name, post.license.url %> <%= link_to post.license.name, post.license.url %>
<% end %>
<% if post.license.present? && been_edited %>
&nbsp;
<% end %>
<% if been_edited %>
<i class="fa fa-pencil-alt" title="Edited"></i>
<span class="has-color-tertiary">
<%= time_ago_in_words(post.last_activity, locale: :en_abbrev) %> ago
<% if ! last_edited_by_self %>
by <%= link_to post.last_activity_by.username, user_path(post.last_activity_by_id) %>
<% end %>
</span>
<% end %>
</div> </div>
<% end %> <% end %>
</div> </div>
<div class="has-clear-clear"></div> <div class="has-clear-clear"></div>
<div class="post--actions"> <div class="post--actions">
<div class="tools"> <div class="tools">
<%= link_to generic_share_link(post), class: 'tools--item' do %> <%= link_to generic_share_link(post), class: 'tools--item' do %>
......
en-ABBREV: en_abbrev:
datetime: datetime:
distance_in_words: distance_in_words:
x_seconds: '%{count}s' x_seconds: '%{count}s'
x_minutes: '%{count}m' x_minutes: '%{count}m'
about_x_hours: '%{count}h' about_x_hours: '~%{count}h'
x_hours: '%{count}h' x_hours: '%{count}h'
x_days: '%{count}d' x_days: '%{count}d'
x_weeks: '%{count}w' x_weeks: '%{count}w'
about_x_months: '%{count}mo' about_x_months: '~%{count}mo'
x_months: '%{count}mo' x_months: '%{count}mo'
x_years: '%{count}y' x_years: '%{count}y'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment