mirror of
https://github.com/discourse/discourse.git
synced 2025-03-02 01:09:26 +00:00
It was not clear that replace watched words can be used to replace text with URLs. This introduces a new watched word type that makes it easier to understand.
37 lines
1.1 KiB
Handlebars
37 lines
1.1 KiB
Handlebars
{{#d-modal-body rawTitle=(i18n "admin.watched_words.test.modal_title" action=model.name) class="watched-words-test-modal"}}
|
|
<p>{{i18n "admin.watched_words.test.description"}}</p>
|
|
{{textarea name="test_value" value=value autofocus="autofocus"}}
|
|
{{#if matches}}
|
|
<p>
|
|
{{i18n "admin.watched_words.test.found_matches"}}
|
|
<ul>
|
|
{{#if (or isReplace isLink)}}
|
|
{{#each matches as |match|}}
|
|
<li>
|
|
<span class="match">{{match.match}}</span>
|
|
→
|
|
<span class="replacement">{{match.replacement}}</span>
|
|
</li>
|
|
{{/each}}
|
|
{{else if isTag}}
|
|
{{#each matches as |match|}}
|
|
<li>
|
|
<span class="match">{{match.match}}</span>
|
|
→
|
|
{{#each match.tags as |tag|}}
|
|
<span class="tag">{{tag}}</span>
|
|
{{/each}}
|
|
</li>
|
|
{{/each}}
|
|
{{else}}
|
|
{{#each matches as |match|}}
|
|
<li>{{match}}</li>
|
|
{{/each}}
|
|
{{/if}}
|
|
</ul>
|
|
</p>
|
|
{{else}}
|
|
<p>{{i18n "admin.watched_words.test.no_matches"}}</p>
|
|
{{/if}}
|
|
{{/d-modal-body}}
|