mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #7751, make necro separator a partial
This commit is contained in:
@@ -272,12 +272,11 @@ define('forum/topic/posts', [
|
|||||||
if (diff >= necroThreshold) {
|
if (diff >= necroThreshold) {
|
||||||
var ago = $.timeago.settings.strings.suffixAgo;
|
var ago = $.timeago.settings.strings.suffixAgo;
|
||||||
$.timeago.settings.strings.suffixAgo = '';
|
$.timeago.settings.strings.suffixAgo = '';
|
||||||
$('<aside>').addClass('necro-post')
|
var translationText = '[[topic:timeago_later,' + $.timeago.inWords(diff) + ']]';
|
||||||
.append($('<span>').translateText('[[topic:timeago_later,' + $.timeago.inWords(diff) + ']]'))
|
|
||||||
.append($('<hr>'))
|
|
||||||
.prependTo(post);
|
|
||||||
|
|
||||||
$.timeago.settings.strings.suffixAgo = ago;
|
$.timeago.settings.strings.suffixAgo = ago;
|
||||||
|
app.parseAndTranslate('partials/topic/necro-post', { text: translationText }, function (html) {
|
||||||
|
html.prependTo(post);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user