mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 07:50:51 +08:00
0496199090
<img width="510" alt="Screenshot 2023-08-25 at 8 19 38 AM" src="https://github.com/discourse/discourse/assets/50783505/9ebf467e-7b3b-49e2-91d9-43e37b838431">
55 lines
1.5 KiB
Handlebars
55 lines
1.5 KiB
Handlebars
<DModal
|
|
@closeModal={{@closeModal}}
|
|
@title={{i18n "admin.badges.preview.modal_title"}}
|
|
class="badge-query-preview"
|
|
>
|
|
<:body>
|
|
{{#if @model.badge.errors}}
|
|
<p class="error-header">
|
|
{{i18n "admin.badges.preview.sql_error_header"}}
|
|
</p>
|
|
<pre class="badge-errors">{{@model.badge.errors}}</pre>
|
|
{{else}}
|
|
<p class="grant-count">
|
|
{{#if @model.badge.grant_count}}
|
|
{{html-safe
|
|
(i18n
|
|
"admin.badges.preview.grant_count" count=@model.badge.grant_count
|
|
)
|
|
}}
|
|
{{else}}
|
|
{{html-safe (i18n "admin.badges.preview.no_grant_count")}}
|
|
{{/if}}
|
|
</p>
|
|
|
|
{{#if this.countWarning}}
|
|
<div class="count-warning">
|
|
<p class="heading">
|
|
{{d-icon "exclamation-triangle"}}
|
|
{{i18n "admin.badges.preview.bad_count_warning.header"}}
|
|
</p>
|
|
<p class="body">
|
|
{{i18n "admin.badges.preview.bad_count_warning.text"}}
|
|
</p>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if @model.badge.sample}}
|
|
<p class="sample">
|
|
{{i18n "admin.badges.preview.sample"}}
|
|
</p>
|
|
<ul>
|
|
{{#each this.processedSample as |html|}}
|
|
<li>{{html-safe html}}</li>
|
|
{{/each}}
|
|
</ul>
|
|
{{/if}}
|
|
|
|
{{#if this.hasQueryPlan}}
|
|
<div class="badge-query-plan">
|
|
{{html-safe this.queryPlanHtml}}
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|
|
</:body>
|
|
</DModal> |