mirror of
https://github.com/discourse/discourse.git
synced 2025-04-17 02:59:01 +08:00

This commit contains 3 features: - FEATURE: Allow downloading watched words This introduces a button that allows admins to download watched words per action in a `.txt` file. - FEATURE: Allow clearing watched words in bulk This adds a "Clear All" button that clears all deleted words per action (e.g. block, flag etc.) - FEATURE: List all blocked words contained in the post when it's blocked When a post is rejected because it contains one or more blocked words, the error message now lists all the blocked words contained in the post. ------- This also changes the format of the file for importing watched words from `.csv` to `.txt` so it becomes inconsistent with the extension of the file when watched words are exported.
47 lines
1.3 KiB
Handlebars
47 lines
1.3 KiB
Handlebars
<h2>{{model.name}}</h2>
|
|
|
|
<p class="about">{{actionDescription}}</p>
|
|
|
|
<div class="watched-word-controls">
|
|
{{watched-word-form
|
|
actionKey=actionNameKey
|
|
action=(action "recordAdded")
|
|
filteredContent=filteredContent
|
|
regularExpressions=adminWatchedWords.regularExpressions}}
|
|
|
|
<div class="download-upload-controls">
|
|
<div class="download">
|
|
{{d-button
|
|
class="btn-default download-link"
|
|
href=downloadLink
|
|
icon="download"
|
|
label="admin.watched_words.download"}}
|
|
</div>
|
|
{{watched-word-uploader uploading=uploading actionKey=actionNameKey done=(action "uploadComplete")}}
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<label class="show-words-checkbox">
|
|
{{input type="checkbox" checked=adminWatchedWords.showWords disabled=adminWatchedWords.disableShowWords}}
|
|
{{i18n 'admin.watched_words.show_words'}}
|
|
</label>
|
|
</div>
|
|
<div class="watched-words-list">
|
|
{{#if showWordsList}}
|
|
{{#each filteredContent as |word| }}
|
|
<div class="watched-word-box">{{admin-watched-word word=word action=(action "recordRemoved")}}</div>
|
|
{{/each}}
|
|
{{else}}
|
|
{{i18n 'admin.watched_words.word_count' count=wordCount}}
|
|
{{/if}}
|
|
</div>
|
|
|
|
<div class="clear-all-row">
|
|
{{d-button
|
|
class="btn-danger clear-all"
|
|
label="admin.watched_words.clear_all"
|
|
icon="trash-alt"
|
|
action=(action "clearAll")}}
|
|
</div>
|