BUGFIX: you should not be able to edit the category on a PM

This commit is contained in:
Régis Hanol 2014-02-26 22:45:19 +01:00
parent 9267c162a1
commit 9571eb07a4
2 changed files with 4 additions and 1 deletions

View File

@ -144,6 +144,7 @@ Discourse.Topic = Discourse.Model.extend({
archetypeObject: function() { archetypeObject: function() {
return Discourse.Site.currentProp('archetypes').findProperty('id', this.get('archetype')); return Discourse.Site.currentProp('archetypes').findProperty('id', this.get('archetype'));
}.property('archetype'), }.property('archetype'),
isPrivateMessage: Em.computed.equal('archetype', 'private_message'), isPrivateMessage: Em.computed.equal('archetype', 'private_message'),
toggleStatus: function(property) { toggleStatus: function(property) {

View File

@ -12,7 +12,9 @@
{{/if}} {{/if}}
{{#if editingTopic}} {{#if editingTopic}}
{{#unless isPrivateMessage}}
{{categoryChooser valueAttribute="id" value=newCategoryId source=category_id}} {{categoryChooser valueAttribute="id" value=newCategoryId source=category_id}}
{{/unless}}
{{textField id='edit-title' value=newTitle}} {{textField id='edit-title' value=newTitle}}
<button class='btn btn-primary btn-small' {{action finishedEditingTopic}}><i class='fa fa-check'></i></button> <button class='btn btn-primary btn-small' {{action finishedEditingTopic}}><i class='fa fa-check'></i></button>