discourse/app/assets/javascripts/admin/templates/search-logs-index.hbs
Guo Xiang Tan 947495e70d Follow up to 8c2fa99f78.
`/search_logs/term?term` is alittle weird looking but unless we add
proper slug support to term, we're going to have to live with this
first.
2019-03-29 10:39:44 +08:00

34 lines
1.2 KiB
Handlebars

<div class="admin-title">
{{period-chooser period=period}}
{{combo-box content=searchTypeOptions value=searchType class='search-logs-filter'}}
</div>
{{#conditional-loading-spinner condition=loading}}
{{#if 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 model as |item|}}
<tr class="admin-list-item">
<td class="col term">
{{#link-to 'adminSearchLogs.term' (query-params term=item.term) class="test"}}
{{item.term}}
{{/link-to}}
</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}}
{{/conditional-loading-spinner}}