mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
0431942f3d
This new iteration of select-kit focuses on following best principales and disallowing mutations inside select-kit components. A best effort has been made to avoid breaking changes, however if you content was a flat array, eg: ["foo", "bar"] You will need to set valueProperty=null and nameProperty=null on the component. Also almost every component should have an `onChange` handler now to decide what to do with the updated data. **select-kit will not mutate your data by itself anymore**
67 lines
2.0 KiB
Handlebars
67 lines
2.0 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="{{unbound result.username}}">
|
|
{{avatar result imageSize="large"}}
|
|
</a>
|
|
</div>
|
|
|
|
<div class='fps-topic'>
|
|
<div class='topic'>
|
|
<a class='search-link' href='{{unbound result.url}}'>
|
|
{{topic-status topic=result.topic disableActions=true}}<span class='topic-title'>{{#highlight-text highlight=term}}{{{unbound result.topic.fancyTitle}}}{{/highlight-text}}</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}}
|
|
{{#highlight-text highlight=term}}
|
|
{{{unbound result.blurb}}}
|
|
{{/highlight-text}}
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/each}}
|
|
</div>
|
|
{{/conditional-loading-spinner}}
|