mirror of
https://ghfast.top/https://github.com/discourse/discourse-akismet.git
synced 2026-07-16 11:46:29 +08:00
82 lines
2.9 KiB
Handlebars
82 lines
2.9 KiB
Handlebars
{{#if enabled}}
|
|
{{#if stats}}
|
|
<table class='tbl spam-stats'>
|
|
<tr>
|
|
<th>{{i18n "akismet.stats.scanned"}}</th>
|
|
<th>{{i18n "akismet.stats.needs_review"}}</th>
|
|
<th>{{i18n "akismet.stats.confirmed_spam"}}</th>
|
|
<th>{{i18n "akismet.stats.confirmed_ham"}}</th>
|
|
</tr>
|
|
<tr>
|
|
<td>{{stats.scanned}}</td>
|
|
<td>{{stats.needs_review}}</td>
|
|
<td>{{stats.confirmed_spam}}</td>
|
|
<td>{{stats.confirmed_ham}}</td>
|
|
</tr>
|
|
</table>
|
|
{{/if}}
|
|
|
|
{{#if currentUser.admin}}
|
|
{{d-button label="admin.plugins.change_settings" icon="cog" class='settings-button' action=(route-action "showSettings")}}
|
|
{{/if}}
|
|
|
|
{{d-button action=(action "refresh") icon="refresh" class="btn-primary" label="akismet.refresh" disabled=performingAction}}
|
|
|
|
{{#if model.length}}
|
|
<h3 class='review-queue'>{{i18n "akismet.posts_to_review"}}</h3>
|
|
|
|
<div class="row">
|
|
<table class='akismet-queue'>
|
|
<tbody>
|
|
{{#each sortedPosts as |post|}}
|
|
<tr>
|
|
<td class="cooked">
|
|
|
|
<div class='post-info'>
|
|
{{#link-to 'adminUser' post.user_id post.username}}{{avatar post imageSize="small"}} {{post.username}}{{/link-to}}
|
|
<a href={{post.url}} target="_blank" class="post-link">#{{post.id}}</a>
|
|
</div>
|
|
{{{post.excerpt}}}
|
|
<div class="queue-actions">
|
|
{{d-button action=(action "confirmSpamPost")
|
|
actionParam=post
|
|
icon="check"
|
|
class="btn-primary"
|
|
label="akismet.confirm_spam"
|
|
disabled=performingAction}}
|
|
|
|
{{d-button action=(action "allowPost")
|
|
actionParam=post
|
|
icon="far-thumbs-up"
|
|
label="akismet.not_spam"
|
|
disabled=performingAction}}
|
|
|
|
{{d-button action=(action "dismiss")
|
|
actionParam=post
|
|
icon="times"
|
|
label="akismet.dismiss"
|
|
disabled=performingAction}}
|
|
|
|
|
|
{{#if post.user_id}}
|
|
{{d-button action=(action "deleteUser")
|
|
actionParam=post
|
|
icon="far-trash-alt"
|
|
class="btn-danger"
|
|
label="akismet.confirm_delete"
|
|
disabled=performingAction}}
|
|
{{/if}}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{/if}}
|
|
{{else}}
|
|
{{#if currentUser.admin}}
|
|
{{d-button label="akismet.change_settings" icon="cog" class='settings-button' action=(route-action "showSettings")}}
|
|
{{/if}}
|
|
{{{i18n "akismet.not_enabled"}}}
|
|
{{/if}}
|