discourse/app/assets/javascripts/admin/addon/templates/search-logs-term.hbs
Joffrey JAFFEUX 7b34433fc2
REVERT: revert change from action + mut to mut (#10844)
* Revert "FIX: fixes regression where wizard dropdown couldn't update (#10838)"

This reverts commit e3b2fc6074.

* Revert "DEV: replaces unecessary (action (mut .*)) by (mut .*) (#10822)"

This reverts commit c0350dc362.
2020-10-06 23:50:05 +02:00

80 lines
2.4 KiB
Handlebars

<div class="admin-title">
{{period-chooser period=period onChange=(action (mut period))}}
{{combo-box
content=searchTypeOptions
value=searchType
class="search-logs-filter"
onChange=(action (mut searchType))
}}
</div>
<h2>
{{#link-to "full-page-search" (query-params q=term)}}{{term}}{{/link-to}}
</h2>
{{#conditional-loading-spinner condition=refreshing}}
{{admin-graph model=model type="bar"}}
<br><br>
<h2> {{i18n "admin.logs.search_logs.header_search_results"}} </h2>
<br>
<div class="header-search-results">
{{#each model.search_result.posts as |result|}}
<div class="fps-result">
<div class="author">
<a href={{result.userPath}} data-user-card={{result.username}}>
{{avatar result imageSize="large"}}
</a>
</div>
<div class="fps-topic">
<div class="topic">
<a href={{result.url}} class="search-link">
{{topic-status topic=result.topic disableActions=true}}
<span class="topic-title">
{{#if result.useTopicTitleHeadline}}
{{html-safe result.topicTitleHeadline}}
{{else}}
{{#highlight-search highlight=q}}
{{html-safe result.topic.fancyTitle}}
{{/highlight-search}}
{{/if}}
</span>
</a>
<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}}
</div>
</div>
<div class="blurb container">
<span class="date">
{{format-age result.created_at}}
{{#if result.blurb}}
-
{{/if}}
</span>
{{#if result.blurb}}
{{#if siteSettings.use_pg_headlines_for_excerpt}}
{{html-safe result.blurb}}
{{else}}
{{#highlight-search highlight=highlightQuery}}
{{html-safe result.blurb}}
{{/highlight-search}}
{{/if}}
{{/if}}
</div>
</div>
</div>
{{/each}}
</div>
{{/conditional-loading-spinner}}