setting permissions to change category notification levels

This commit is contained in:
Catrin 2014-05-05 09:25:30 +02:00 committed by Neil Lalonde
parent 919999b114
commit 33fcf79444
3 changed files with 4 additions and 1 deletions

View File

@ -108,6 +108,7 @@ function buildCategoryRoute(filter, params) {
opts.noSubcategories = params && params.no_subcategories;
opts.canEditCategory = Discourse.User.currentProp('staff');
this.controllerFor('navigation/category').setProperties(opts);
opts.canChangeCategoryNotificationLevel = Discourse.User.current();
return Discourse.TopicList.list(listFilter, params).then(function(list) {
var tracking = Discourse.TopicTrackingState.current();

View File

@ -7,7 +7,9 @@
{{customHTML "extraNavItem"}}
</ul>
{{#if canChangeCategoryNotificationLevel}}
{{view Discourse.CategoryNotificationsButton categoryBinding="model" category=category}}
{{/if}}
{{#if canCreateTopic}}
<button id="create-topic" class='btn btn-default' {{action createTopic}}><i class='fa fa-plus'></i>{{i18n topic.create}}</button>

View File

@ -8,7 +8,7 @@
display: none;
width: 550px;
padding: 4px 0;
margin: 1px 0 0;
margin: 32px 560px;
list-style: none;
background-color: $primary_background_color;
border: 1px solid $primary_border_color;