From 1e7d6ebb0fc438f376a4d1bb584048d6902d78a8 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Wed, 16 Dec 2020 18:40:58 +0530 Subject: [PATCH] DEV: no need to iterate through each tag for rendering (#11508) This commit allows discourse-assign plugin to show assigned user next to tags. --- .../discourse/app/templates/full-page-search.hbs | 6 +++--- app/assets/stylesheets/common/base/search.scss | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/app/templates/full-page-search.hbs b/app/assets/javascripts/discourse/app/templates/full-page-search.hbs index 6cd5dfc767e..946d324389a 100644 --- a/app/assets/javascripts/discourse/app/templates/full-page-search.hbs +++ b/app/assets/javascripts/discourse/app/templates/full-page-search.hbs @@ -104,9 +104,9 @@ {{category-link result.topic.category.parentCategory}} {{/if}} {{category-link result.topic.category hideParent=true}} - {{#each result.topic.tags as |tag|}} - {{discourse-tag tag isPrivateMessage=isPrivateMessage}} - {{/each}} + {{#if result.topic.tags}} + {{discourse-tags result.topic}} + {{/if}} {{plugin-outlet name="full-page-search-category" args=(hash result=result)}} diff --git a/app/assets/stylesheets/common/base/search.scss b/app/assets/stylesheets/common/base/search.scss index e4d85303acf..a6154bfc19d 100644 --- a/app/assets/stylesheets/common/base/search.scss +++ b/app/assets/stylesheets/common/base/search.scss @@ -226,6 +226,17 @@ } } + .discourse-tags { + flex-wrap: wrap; + display: inline-flex; + font-weight: normal; + + .discourse-tag.simple { + font-size: $font-down-1; + margin-right: 0.25em; + } + } + input[type="checkbox"] { margin-top: 0; margin-left: 0;