discourse/app/assets/javascripts/admin/addon/templates/search-logs-index.hbs
Jarek Radosz 11067c73d0
DEV: Use fn+mut instead of action+mut (#26057)
One step closer to removing all `action` helper usage
2024-03-06 18:05:03 +01:00

48 lines
1.5 KiB
Handlebars

<div class="admin-title">
<PeriodChooser @period={{this.period}} @onChange={{fn (mut this.period)}} />
<ComboBox
@content={{this.searchTypeOptions}}
@value={{this.searchType}}
@onChange={{fn (mut this.searchType)}}
class="search-logs-filter"
/>
</div>
<ConditionalLoadingSpinner @condition={{this.loading}}>
{{#if this.model.length}}
<table class="search-logs-list grid">
<thead>
<th class="col heading term">{{i18n "admin.logs.search_logs.term"}}</th>
<th class="col heading">{{i18n "admin.logs.search_logs.searches"}}</th>
<th class="col heading">{{i18n
"admin.logs.search_logs.click_through_rate"
}}</th>
</thead>
<tbody>
{{#each this.model as |item|}}
<tr class="admin-list-item">
<td class="col term">
<LinkTo
@route="adminSearchLogs.term"
@query={{hash term=item.term period=this.period}}
class="test"
>
{{item.term}}
</LinkTo>
</td>
<td class="col"><div class="label">{{i18n
"admin.logs.search_logs.searches"
}}</div>{{item.searches}}</td>
<td class="col"><div class="label">{{i18n
"admin.logs.search_logs.click_through_rate"
}}</div>{{item.ctr}}%</td>
</tr>
{{/each}}
</tbody>
</table>
{{else}}
{{i18n "search.no_results"}}
{{/if}}
</ConditionalLoadingSpinner>