Implementing angular-moment to automatically update dates / durations

This commit is contained in:
Andy Gardner
2015-02-12 12:18:12 +02:00
parent 48622ea9f5
commit f64bb1df9b
5 changed files with 23 additions and 17 deletions

View File

@@ -8,14 +8,14 @@
</div>
<dl ng-if="commit.duration != 0">
<dd><h1>{{ commit.duration | toDuration}}</h1></dd>
<dd><h1>{{ commit.duration | amDurationFormat:'seconds':false }}</h1></dd>
</dl>
<dl ng-include="'/static/views/commit_detail.html'" ng-show="commit.pull_request.length == 0"></dl>
<dl ng-include="'/static/views/commit_detail_pr.html'" ng-show="commit.pull_request.length != 0"></dl>
<dd ng-if="commit.finished_at != 0">{{ commit.finished_at | fromNow }}</dd>
<dd ng-if="commit.finished_at == 0 && commit.started_at != 0">Started {{ commit.started_at | fromNow }}</dd>
<dd ng-if="commit.finished_at == 0 && commit.started_at == 0">Created {{ commit.created_at}}</dd>
<dd ng-if="commit.finished_at != 0" am-time-ago="{{ commit.finished_at }}"></dd>
<dd ng-if="commit.finished_at == 0 && commit.started_at != 0">Started <span am-time-ago="{{ commit.started_at }}"></span></dd>
<dd ng-if="commit.finished_at == 0 && commit.started_at == 0">Created <span am-time-ago="{{ commit.created_at }}"></span></dd>
</div>
</aside>