forked from rDrama/rDrama
Add exact timestamps to mod log.
Modlog only had ModAction.age_string visible. However, we sometimes need to know the exact time an action was taken. Adds `created_string` to ModAction, and exposes that to log.html.master
parent
42e0b77ca7
commit
b6339ca95f
|
@ -60,6 +60,10 @@ class ModAction(Base):
|
|||
years = int(months / 12)
|
||||
return f"{years}yr ago"
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def created_string(self):
|
||||
return time.strftime('%d %b %Y %H:%M:%S UTC', time.gmtime(self.created_utc))
|
||||
|
||||
@property
|
||||
def note(self):
|
||||
|
|
|
@ -106,7 +106,9 @@
|
|||
<span>{{ma.string | safe}}</span>
|
||||
</div>
|
||||
|
||||
<div class="text-gray-500">{{ma.age_string}} <a href="{{ma.permalink}}"><i class="far fa-link ml-1 text-muted"></i></a>
|
||||
<div class="text-gray-500">
|
||||
<span class="log--item-age" title="{{ ma.created_string }}">{{ma.age_string}}</span>
|
||||
<a href="{{ma.permalink}}"><i class="far fa-link ml-1 text-muted"></i></a>
|
||||
<a role="button" class="copy-link" role="button" data-clipboard-text="{{ma.permalink}}"><i class="far fa-copy ml-1 text-muted"></i></a>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue