discourse/app/assets/javascripts/admin/addon/templates/modal/admin-watched-word-test.hbs

37 lines
1.2 KiB
Handlebars

<DModalBody @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>
&rarr;
<span class="replacement">{{match.replacement}}</span>
</li>
{{/each}}
{{else if isTag}}
{{#each matches as |match|}}
<li>
<span class="match">{{match.match}}</span>
&rarr;
{{#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}}
</DModalBody>