2019-04-02 11:55:57 +08:00
|
|
|
<div class="admin-title">
|
2022-07-06 01:41:31 +08:00
|
|
|
<PeriodChooser @period={{this.period}} @onChange={{action (mut this.period)}} />
|
|
|
|
<ComboBox @content={{this.searchTypeOptions}} @value={{this.searchType}} @class="search-logs-filter" @onChange={{action (mut this.searchType)}} />
|
2019-04-02 11:55:57 +08:00
|
|
|
</div>
|
2017-12-20 10:41:31 +08:00
|
|
|
|
|
|
|
<h2>
|
2022-07-06 01:41:31 +08:00
|
|
|
<LinkTo @route="full-page-search" @query={{hash q=this.term}}>{{this.term}}</LinkTo>
|
2017-12-20 10:41:31 +08:00
|
|
|
</h2>
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
<ConditionalLoadingSpinner @condition={{this.refreshing}}>
|
|
|
|
<AdminGraph @model={{this.model}} @type="bar" />
|
2018-01-16 18:29:22 +08:00
|
|
|
|
|
|
|
<br><br>
|
|
|
|
<h2> {{i18n "admin.logs.search_logs.header_search_results"}} </h2>
|
|
|
|
<br>
|
|
|
|
|
|
|
|
<div class="header-search-results">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#each this.model.search_result.posts as |result|}}
|
2018-01-16 18:29:22 +08:00
|
|
|
<div class="fps-result">
|
|
|
|
<div class="author">
|
2020-03-09 22:28:31 +08:00
|
|
|
<a href={{result.userPath}} data-user-card={{result.username}}>
|
2018-01-16 18:29:22 +08:00
|
|
|
{{avatar result imageSize="large"}}
|
|
|
|
</a>
|
2020-04-13 23:17:20 +08:00
|
|
|
</div>
|
2018-01-16 18:29:22 +08:00
|
|
|
|
|
|
|
<div class="fps-topic">
|
|
|
|
<div class="topic">
|
2020-03-09 22:28:31 +08:00
|
|
|
<a href={{result.url}} class="search-link">
|
2022-06-30 18:30:50 +08:00
|
|
|
<TopicStatus @topic={{result.topic}} @disableActions={{true}} />
|
2020-08-12 16:43:47 +08:00
|
|
|
<span class="topic-title">
|
|
|
|
{{#if result.useTopicTitleHeadline}}
|
|
|
|
{{html-safe result.topicTitleHeadline}}
|
|
|
|
{{else}}
|
2022-07-06 01:41:31 +08:00
|
|
|
<HighlightSearch @highlight={{this.q}}>
|
2020-08-12 16:43:47 +08:00
|
|
|
{{html-safe result.topic.fancyTitle}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</HighlightSearch>
|
2020-08-12 16:43:47 +08:00
|
|
|
{{/if}}
|
|
|
|
</span>
|
2020-04-13 23:17:20 +08:00
|
|
|
</a>
|
|
|
|
|
2018-01-16 18:29:22 +08:00
|
|
|
<div class="search-category">
|
|
|
|
{{#if result.topic.category.parentCategory}}
|
|
|
|
{{category-link result.topic.category.parentCategory}}
|
|
|
|
{{/if}}
|
|
|
|
{{category-link result.topic.category hideParent=true}}
|
|
|
|
{{#each result.topic.tags as |tag|}}
|
|
|
|
{{discourse-tag tag}}
|
|
|
|
{{/each}}
|
2020-04-13 23:17:20 +08:00
|
|
|
</div>
|
2018-01-16 18:29:22 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="blurb container">
|
|
|
|
<span class="date">
|
|
|
|
{{format-age result.created_at}}
|
|
|
|
{{#if result.blurb}}
|
2020-04-13 23:17:20 +08:00
|
|
|
-
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
|
|
|
|
2018-01-16 18:29:22 +08:00
|
|
|
{{#if result.blurb}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.siteSettings.use_pg_headlines_for_excerpt}}
|
2020-03-11 16:23:10 +08:00
|
|
|
{{html-safe result.blurb}}
|
2020-08-07 10:49:37 +08:00
|
|
|
{{else}}
|
2022-07-06 01:41:31 +08:00
|
|
|
<HighlightSearch @highlight={{this.highlightQuery}}>
|
2020-08-07 10:49:37 +08:00
|
|
|
{{html-safe result.blurb}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</HighlightSearch>
|
2020-08-07 10:49:37 +08:00
|
|
|
{{/if}}
|
2018-01-16 18:29:22 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
2022-06-30 18:30:50 +08:00
|
|
|
</ConditionalLoadingSpinner>
|