A platform for community discussion. Free, open, simple.
FEATURE: tooltip for disabled new topic button (#20561)
Krisc65954047584
diff --git a/app/assets/javascripts/discourse/app/components/create-topic-button.hbs b/app/assets/javascripts/discourse/app/components/create-topic-button.hbsindex 76560659373..a18e98b54fd 100644--- a/app/assets/javascripts/discourse/app/components/create-topic-button.hbs+++ b/app/assets/javascripts/discourse/app/components/create-topic-button.hbs@@ -7,4 +7,5 @@@disabled={{this.disabled}}@label={{this.label}}/>+ {{yield}}{{/if}}\ No newline at end of filediff --git a/app/assets/javascripts/discourse/app/components/d-navigation.hbs b/app/assets/javascripts/discourse/app/components/d-navigation.hbsindex c328d2349f8..04092dc19ec 100644--- a/app/assets/javascripts/discourse/app/components/d-navigation.hbs+++ b/app/assets/javascripts/discourse/app/components/d-navigation.hbs@@ -85,7 +85,11 @@@label={{this.createTopicLabel}}@btnClass={{this.createTopicClass}}@canCreateTopicOnTag={{this.canCreateTopicOnTag}}- />+ >+ {{#if this.createTopicButtonDisabled}}+ <DTooltip>{{i18n "topic.create_disabled_category"}}</DTooltip>+ {{/if}}+ </CreateTopicButton><PluginOutlet@name="after-create-topic-button"diff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex d000fa72a32..4b177f2e588 100644--- a/config/locales/client.en.yml+++ b/config/locales/client.en.yml@@ -2893,6 +2893,7 @@ en:one: "%{count} post in topic"other: "%{count} posts in topic"create: "New Topic"+ create_disabled_category: "You're not allowed to create topics in this category"create_long: "Create a new Topic"open_draft: "Open Draft"private_message: "Start a message"