diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-15 13:52:56 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-15 13:52:56 +0200 |
commit | 506dc652ff9fd76fde684f621cda2fa2783313a4 (patch) | |
tree | 1315991537367b014534903786041a53a8fc650f /templates | |
parent | 360966ab4bdafd15cdef21e34492f5d7d3151b74 (diff) |
add support for relative dates, fix #28
Diffstat (limited to 'templates')
-rw-r--r-- | templates/main.php | 4 | ||||
-rw-r--r-- | templates/part.items.php | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/templates/main.php b/templates/main.php index e6c964c74..376132833 100644 --- a/templates/main.php +++ b/templates/main.php @@ -1,11 +1,13 @@ <?php +\OCP\Util::addScript('news', 'vendor/momentjs/moment'); +\OCP\Util::addScript('news', 'vendor/momentjs/langs'); \OCP\Util::addScript('appframework', 'vendor/angular/angular'); \OCP\Util::addScript('appframework', 'public/app'); \OCP\Util::addScript('news', 'vendor/md5js/md5'); \OCP\Util::addScript('news', 'vendor/angular-ui/angular-ui'); -\OCP\Util::addScript('news', 'vendor/momentjs/moment'); + \OCP\Util::addScript('news', 'public/app'); \OCP\Util::addStyle('news', 'addnew'); diff --git a/templates/part.items.php b/templates/part.items.php index 284a3e9a3..7fef5b1cc 100644 --- a/templates/part.items.php +++ b/templates/part.items.php @@ -5,7 +5,7 @@ data-id="{{ item.id }}" data-feed="{{ item.feedId }}"> <h2 class="item_date"> - <time class="timeago" datetime="">{{ item.getRelativeDate() }}</time> + <time class="timeago" datetime="">{{ getRelativeDate(item.pubDate) }}</time> </h2> <div class="utils"> |