discourse/app/assets/javascripts/admin/addon/templates/watched-words-action.hbs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

76 lines
1.7 KiB
Handlebars
Raw Normal View History

{{#if this.regexpError}}
<div class="alert alert-error">{{this.regexpError}}</div>
{{/if}}
<div class="watched-word-controls">
<DButton
@href={{this.downloadLink}}
@icon="download"
@label="admin.watched_words.download"
class="btn-default download-link"
/>
<WatchedWordUploader
@uploading={{this.uploading}}
@actionKey={{this.actionNameKey}}
@done={{this.uploadComplete}}
/>
<DButton
@label="admin.watched_words.test.button_label"
@icon="far-eye"
@action={{this.test}}
class="watched-word-test"
/>
<DButton
@label="admin.watched_words.clear_all"
@icon="trash-can"
@action={{this.clearAll}}
class="btn-danger clear-all"
/>
2018-07-03 11:14:53 +08:00
</div>
<p class="about">{{this.actionDescription}}</p>
{{#if this.siteSettings.watched_words_regular_expressions}}
<p>
{{html-safe
(i18n "admin.watched_words.regex_warning" basePath=(base-path))
}}
</p>
{{/if}}
<WatchedWordForm
@actionKey={{this.actionNameKey}}
@action={{this.recordAdded}}
@filteredContent={{this.currentAction.words}}
/>
{{#if this.currentAction.words}}
<label class="show-words-checkbox">
<Input
@type="checkbox"
@checked={{this.adminWatchedWords.showWords}}
disabled={{this.adminWatchedWords.disableShowWords}}
/>
{{i18n
"admin.watched_words.show_words"
count=this.currentAction.words.length
}}
</label>
{{/if}}
{{#if this.showWordsList}}
<div class="watched-words-list watched-words-{{this.actionNameKey}}">
{{#each this.currentAction.words as |word|}}
<div class="watched-word-box">
<AdminWatchedWord
@actionKey={{this.actionNameKey}}
@word={{word}}
@action={{this.recordRemoved}}
/>
</div>
{{/each}}
</div>
{{/if}}