Fix 'undefined' in Create Category modal title

This commit is contained in:
Neil Lalonde 2013-07-26 10:31:56 -04:00
parent d579e4c5d5
commit 234474af1b

View File

@ -23,12 +23,12 @@ Discourse.EditCategoryController = Discourse.ObjectController.extend(Discourse.M
title: function() {
if (this.get('id')) {
return I18n.t("category.edit_long") + ": " + this.get('model.name');
return I18n.t("category.edit_long") + " : " + this.get('model.name');
}
if (this.get('isUncategorized')){
return I18n.t("category.edit_uncategorized");
}
return I18n.t("category.create") + " : " + this.get('model.name');
return I18n.t("category.create") + (this.get('model.name') ? (" : " + this.get('model.name')) : '');
}.property('id', 'model.name'),
titleChanged: function() {