FEATURE: when post is too short, suggest using the like button instead

This commit is contained in:
Neil Lalonde
2015-04-20 11:10:56 -04:00
parent a3b6e3cb97
commit 3071650eb3
3 changed files with 6 additions and 1 deletions

View File

@@ -1,2 +1,2 @@
<span class="close"><i class="fa fa-times-circle"></i></span>
{{view.validation.reason}}
{{{view.validation.reason}}}

View File

@@ -573,6 +573,10 @@ const ComposerView = Discourse.View.extend(Ember.Evented, {
reason = I18n.t('composer.error.post_missing');
} else if( missingChars > 0 ) {
reason = I18n.t('composer.error.post_length', {min: this.get('model.minimumPostLength')});
let tl = Discourse.User.currentProp("trust_level");
if (tl === 0 || tl === 1) {
reason += "<br/>" + I18n.t('composer.error.try_like');
}
}
if( reason ) {