mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 14:45:29 +08:00
1c87bb7fe9
1. Use `this.` instead of `{{action}}` where applicable 2. Use `{{fn}}` instead of `@actionParam` where applicable 3. Use non-`@` versions of class/type/tabindex/aria-controls/aria-expanded 4. Remove `btn` class (it's added automatically to all DButtons) 5. Remove `type="button"` (it's the default) 6. Use `concat-class` helper
73 lines
1.8 KiB
Handlebars
73 lines
1.8 KiB
Handlebars
{{#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
|
|
@id="watched-word-uploader"
|
|
@uploading={{this.uploading}}
|
|
@actionKey={{this.actionNameKey}}
|
|
@done={{action "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-alt"
|
|
@action={{this.clearAll}}
|
|
class="btn-danger clear-all"
|
|
/>
|
|
</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={{action "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={{action "recordRemoved"}}
|
|
/></div>
|
|
{{/each}}
|
|
</div>
|
|
{{/if}} |