From 7d523fae0f3b8d0586e4eec740ff7e80e7ab4e23 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 11 Nov 2016 13:00:23 -0500 Subject: [PATCH] closes #5200 --- public/src/overrides.js | 2 +- src/controllers/api.js | 1 + src/views/admin/settings/post.tpl | 20 ++++++++++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/public/src/overrides.js b/public/src/overrides.js index 0ebb1ebbb8..b4e0f96031 100644 --- a/public/src/overrides.js +++ b/public/src/overrides.js @@ -150,7 +150,7 @@ if ('undefined' !== typeof window) { overrides.overrideTimeago = function () { var timeagoFn = $.fn.timeago; - $.timeago.settings.cutoff = 1000 * 60 * 60 * 24 * 30; + $.timeago.settings.cutoff = 1000 * 60 * 60 * 24 * (parseInt(config.timeagoCutoff, 10) || 60); $.fn.timeago = function () { var els = $(this); diff --git a/src/controllers/api.js b/src/controllers/api.js index cd877aea7d..10a5c8ad02 100644 --- a/src/controllers/api.js +++ b/src/controllers/api.js @@ -62,6 +62,7 @@ apiController.getConfig = function (req, res, next) { config.csrf_token = req.csrfToken(); config.searchEnabled = plugins.hasListeners('filter:search.query'); config.bootswatchSkin = 'default'; + config.timeagoCutoff = meta.config.timeagoCutoff; config.cookies = { enabled: parseInt(meta.config.cookieConsentEnabled, 10) === 1, diff --git a/src/views/admin/settings/post.tpl b/src/views/admin/settings/post.tpl index f58f524aca..559f7094b0 100644 --- a/src/views/admin/settings/post.tpl +++ b/src/views/admin/settings/post.tpl @@ -85,7 +85,24 @@
-
Teaser Settings
+
Timestamp
+
+
+
+ + +

+ Dates & times will be shown in a relative manner (e.g. "3 hours ago" / "5 days ago"), and localised into various + languages. After a certain point, this text can be switched to display the localised date itself + (e.g. 5 Nov 2016 15:30).
(Default: 30, or one month) +

+
+
+
+
+ +
+
Teaser
@@ -100,7 +117,6 @@
-
Unread Settings