mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
closes #5200
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -85,7 +85,24 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2 col-xs-12 settings-header">Teaser Settings</div>
|
||||
<div class="col-sm-2 col-xs-12 settings-header">Timestamp</div>
|
||||
<div class="col-sm-10 col-xs-12">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="timeagoCutoff">Date cut-off (in days)</label>
|
||||
<input type="number" class="form-control" id="timeagoCutoff" data-field="timeagoCutoff" placeholder="30" value="30" />
|
||||
<p class="help-block">
|
||||
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).<br /><em>(Default: <code>30</code>, or one month)</em>
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2 col-xs-12 settings-header">Teaser</div>
|
||||
<div class="col-sm-10 col-xs-12">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
@@ -100,7 +117,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2 col-xs-12 settings-header">Unread Settings</div>
|
||||
<div class="col-sm-10 col-xs-12">
|
||||
|
||||
Reference in New Issue
Block a user