A platform for community discussion. Free, open, simple.
FIX: hide 'category read only banner' in categories list page. (#11072)
Vinoth Kannan9b593435b691
diff --git a/app/assets/javascripts/discourse/app/controllers/discovery.js b/app/assets/javascripts/discourse/app/controllers/discovery.jsindex e74d8b2de8d..c50bca76d3e 100644--- a/app/assets/javascripts/discourse/app/controllers/discovery.js+++ b/app/assets/javascripts/discourse/app/controllers/discovery.js@@ -1,4 +1,4 @@-import { alias, not } from "@ember/object/computed";+import { alias, not, equal } from "@ember/object/computed";import Controller, { inject as controller } from "@ember/controller";import DiscourseURL from "discourse/lib/url";import Category from "discourse/models/category";@@ -10,6 +10,10 @@ export default Controller.extend({navigationCategory: controller("navigation/category"),application: controller(),router: service(),+ viewingCategoriesList: equal(+ "router.currentRouteName",+ "discovery.categories"+ ),loading: false,diff --git a/app/assets/javascripts/discourse/app/templates/discovery.hbs b/app/assets/javascripts/discourse/app/templates/discovery.hbsindex 33c6190c78e..63588861076 100644--- a/app/assets/javascripts/discourse/app/templates/discovery.hbs+++ b/app/assets/javascripts/discourse/app/templates/discovery.hbs@@ -3,7 +3,9 @@{{else}}<div class="container">{{discourse-banner user=currentUser banner=site.banner}}- {{category-read-only-banner category=category readOnly=navigationCategory.cannotCreateTopicOnCategory}}+ {{#unless viewingCategoriesList}}+ {{category-read-only-banner category=category readOnly=navigationCategory.cannotCreateTopicOnCategory}}+ {{/unless}}</div><div class="list-controls">