This commit is contained in:
Robin Ward 2014-12-03 16:41:27 -05:00
parent 52f7f8e471
commit 393607d25c
4 changed files with 11 additions and 3 deletions

View File

@ -158,11 +158,11 @@ var controllerOpts = {
}.property('allLoaded', 'topics.length'),
footerEducation: function() {
if (!this.get('allLoaded') || this.get('topics.length') > 0 || !Discourse.User.current()) { return ""; }
if (!this.get('allLoaded') || this.get('topics.length') > 0 || !Discourse.User.current()) { return; }
var split = this.get('filter').split('/');
if (split[0] !== 'new' && split[0] !== 'unread' && split[0] !== 'starred') { return ""; }
if (split[0] !== 'new' && split[0] !== 'unread' && split[0] !== 'starred') { return; }
return I18n.t("topics.none.educate." + split[0], {
userPrefsUrl: Discourse.getURL("/users/") + (Discourse.User.currentProp("username_lower")) + "/preferences"

View File

@ -92,7 +92,7 @@ Discourse.User = Discourse.Model.extend({
desc = I18n.t('user.moderator', {user: name});
return '<i class="fa fa-shield" title="' + desc + '" alt="' + desc + '"></i>';
}
return "";
return null;
}.property('admin','moderator'),
/**

View File

@ -10112,6 +10112,10 @@ enifed("ember-handlebars/string",
@return {Handlebars.SafeString} a string that will not be html escaped by Handlebars
*/
function htmlSafe(str) {
if (str === undefined || str === null) {
return "";
}
if (typeof str !== 'string') {
str = ''+str;
}

View File

@ -9819,6 +9819,10 @@ enifed("ember-handlebars/string",
@return {Handlebars.SafeString} a string that will not be html escaped by Handlebars
*/
function htmlSafe(str) {
if (str === undefined || str === null) {
return "";
}
if (typeof str !== 'string') {
str = ''+str;
}