Merge pull request #519 from sharelatex/ja-relative-dates-in-v2

Display last modified as a relative date in v2
This commit is contained in:
James Allen 2018-05-01 08:48:14 +01:00 committed by GitHub
commit a294fe795c
3 changed files with 9 additions and 2 deletions

View file

@ -38,4 +38,7 @@
tooltip-append-to-body="true"
)
.col-xs-4
span.last-modified {{project.lastUpdated | formatDate}}
if settings.overleaf
span.last-modified(tooltip="{{project.lastUpdated | formatDate}}") {{project.lastUpdated | fromNowDate}}
else
span.last-modified {{project.lastUpdated | formatDate}}

View file

@ -22,4 +22,4 @@
span.owner {{ownerName()}}
.col-xs-4
span.last-modified {{project.lastUpdated | formatDate}}
span.last-modified(tooltip="{{project.lastUpdated | formatDate}}") {{project.lastUpdated | fromNowDate}}

View file

@ -17,3 +17,7 @@ define [
App.filter "relativeDate", () ->
(date) ->
moment(date).calendar()
App.filter "fromNowDate", () ->
(date) ->
moment(date).fromNow()