UX: Include metadata in composer link modal search results
Metadata includes topic status (closed, pinned, solved, etc.) as well as category and tags.
This commit is contained in:
parent
7ba914f1e1
commit
c6e255f4e0
|
@ -169,7 +169,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
|
|||
if (!e.metaKey && !e.ctrlKey) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
this.selectLink(e.target);
|
||||
this.selectLink(e.target.closest(".search-link"));
|
||||
}
|
||||
},
|
||||
search() {
|
||||
|
|
|
@ -11,13 +11,21 @@
|
|||
{{/if}}
|
||||
{{#if searchResults}}
|
||||
<div class="internal-link-results">
|
||||
{{#each searchResults as |r index|}}
|
||||
{{#each searchResults as |result|}}
|
||||
<a
|
||||
class="search-link"
|
||||
href="{{r.url}}"
|
||||
href="{{result.url}}"
|
||||
onclick={{action "linkClick"}}
|
||||
data-title="{{r.title}}">
|
||||
{{replace-emoji r.fancy_title}}
|
||||
data-title="{{result.title}}">
|
||||
{{topic-status topic=result disableActions=true}}
|
||||
{{replace-emoji result.fancy_title}}
|
||||
<div class="search-category">
|
||||
{{#if result.category.parentCategory}}
|
||||
{{category-link result.category.parentCategory}}
|
||||
{{/if}}
|
||||
{{category-link result.category hideParent=true}}
|
||||
{{discourse-tags result}}
|
||||
</div>
|
||||
</a>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
|
|
@ -225,7 +225,7 @@
|
|||
max-height: 150px;
|
||||
width: 90%;
|
||||
overflow-y: auto;
|
||||
> a {
|
||||
> .search-link {
|
||||
padding: 6px;
|
||||
border-bottom: 1px solid $primary-low;
|
||||
cursor: pointer;
|
||||
|
@ -234,6 +234,14 @@
|
|||
&:focus {
|
||||
background-color: $highlight-medium;
|
||||
}
|
||||
.search-category {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.discourse-tags {
|
||||
display: inline-block;
|
||||
font-size: $font-down-1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue