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() {
return Discourse.Site.currentProp('archetypes').findProperty('id', this.get('archetype'));
}.property('archetype'),
isPrivateMessage: Em.computed.equal('archetype', 'private_message'),
toggleStatus: function(property) {

View File

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