2022-07-05 13:41:31 -04:00
|
|
|
<DModalBody @rawTitle={{i18n "admin.watched_words.test.modal_title" action=this.model.name}} @class="watched-words-test-modal">
|
2019-08-02 05:53:03 -04:00
|
|
|
<p>{{i18n "admin.watched_words.test.description"}}</p>
|
2022-07-06 04:37:54 -04:00
|
|
|
<Textarea name="test_value" @value={{this.value}} autofocus="autofocus" />
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.matches}}
|
2019-08-02 05:53:03 -04:00
|
|
|
<p>
|
|
|
|
{{i18n "admin.watched_words.test.found_matches"}}
|
|
|
|
<ul>
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if (or this.isReplace this.isLink)}}
|
|
|
|
{{#each this.matches as |match|}}
|
2021-05-21 10:50:24 -04:00
|
|
|
<li>
|
|
|
|
<span class="match">{{match.match}}</span>
|
|
|
|
→
|
|
|
|
<span class="replacement">{{match.replacement}}</span>
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
2022-07-05 13:41:31 -04:00
|
|
|
{{else if this.isTag}}
|
|
|
|
{{#each this.matches as |match|}}
|
2021-05-21 10:50:24 -04:00
|
|
|
<li>
|
|
|
|
<span class="match">{{match.match}}</span>
|
|
|
|
→
|
|
|
|
{{#each match.tags as |tag|}}
|
|
|
|
<span class="tag">{{tag}}</span>
|
|
|
|
{{/each}}
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
{{else}}
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#each this.matches as |match|}}
|
2021-05-21 10:50:24 -04:00
|
|
|
<li>{{match}}</li>
|
|
|
|
{{/each}}
|
|
|
|
{{/if}}
|
2019-08-02 05:53:03 -04:00
|
|
|
</ul>
|
|
|
|
</p>
|
|
|
|
{{else}}
|
|
|
|
<p>{{i18n "admin.watched_words.test.no_matches"}}</p>
|
|
|
|
{{/if}}
|
2022-06-30 06:30:50 -04:00
|
|
|
</DModalBody>
|