Skip to content

A platform for community discussion. Free, open, simple.

Mini tag chooser tweaks

Joffrey JAFFEUXed114177e76b
diff --git a/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6 b/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6
index 0de5b95894e..abce533ffcd 100644
--- a/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6
+++ b/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6
@@ -14,6 +14,17 @@ export default ComboBox.extend({
filterable: true,
noTags: Ember.computed.empty("computedTags"),
allowAny: true,
+ caretUpIcon: Ember.computed.alias("caretIcon"),
+ caretDownIcon: Ember.computed.alias("caretIcon"),
+
+ @computed("computedTags", "siteSettings.max_tags_per_topic")
+ caretIcon(computedTags, maxTagsPerTopic) {
+ if (computedTags.length >= maxTagsPerTopic) {
+ return null;
+ }
+
+ return "plus";
+ },
init() {
this._super();
@@ -136,7 +147,7 @@ export default ComboBox.extend({
if (isEmpty(this.get("computedTags"))) {
content.label = I18n.t("tagging.choose_for_topic");
} else {
- content.label = this.get("computedTags").join(",");
+ content.label = this.get("computedTags").join(", ");
}
return content;
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 49d0be51dc3..fa7006c6cad 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -1183,7 +1183,7 @@ en:
default_header_text: Select...
no_content: No matches found
filter_placeholder: Search...
- create: "Create {{content}}"
+ create: "Create: '{{content}}'"
emoji_picker:
filter_placeholder: Search for emoji