discourse/app/assets/javascripts/admin/templates/modal/admin-badge-preview.hbs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.5 KiB
Handlebars
Raw Normal View History

2016-11-16 06:09:55 +08:00
{{#d-modal-body title="admin.badges.preview.modal_title" class="badge-query-preview"}}
{{#if errors}}
2019-02-19 16:30:52 +08:00
<p class="error-header">{{i18n "admin.badges.preview.sql_error_header"}}</p>
<pre class="badge-errors">{{errors}}</pre>
{{!--
TODO we want some help pages for this, link to those instead
<p>
{{i18n "admin.badges.preview.error_help"}}
</p>
<ul>
<li><a href="https://meta.discourse.org/t/triggered-custom-badge-queries/19336">https://meta.discourse.org/t/triggered-custom-badge-queries/19336</a></li>
</ul>
--}}
2019-02-19 16:30:52 +08:00
{{else}}
<p class="grant-count">
{{#if count}}
{{html-safe (i18n "admin.badges.preview.grant_count" count=count)}}
{{else}}
{{html-safe (i18n "admin.badges.preview.no_grant_count")}}
{{/if}}
</p>
2019-02-19 16:30:52 +08:00
{{#if countWarning}}
<div class="count-warning">
2019-02-19 16:30:52 +08:00
<p class="heading">
{{d-icon "exclamation-triangle"}}
2019-02-19 16:30:52 +08:00
{{i18n "admin.badges.preview.bad_count_warning.header"}}
</p>
<p class="body">
{{i18n "admin.badges.preview.bad_count_warning.text"}}
</p>
</div>
{{/if}}
{{#if sample}}
<p class="sample">
2019-02-19 16:30:52 +08:00
{{i18n "admin.badges.preview.sample"}}
</p>
<ul>
2019-02-19 16:30:52 +08:00
{{#each processedSample as |html|}}
<li>{{html-safe html}}</li>
{{/each}}
</ul>
{{/if}}
2019-02-19 16:30:52 +08:00
{{#if hasQueryPlan}}
<div class="badge-query-plan">
{{html-safe queryPlanHtml}}
2019-02-19 16:30:52 +08:00
</div>
{{/if}}
{{/if}}
2016-11-16 06:09:55 +08:00
{{/d-modal-body}}