mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 07:08:44 +08:00
ac4e854a04
<img width="603" alt="Screenshot 2023-08-04 at 4 43 02 PM" src="https://github.com/discourse/discourse/assets/50783505/033192cc-2c5c-4be6-adde-9dd89b6b05c3"> <img width="594" alt="Screenshot 2023-08-04 at 4 42 59 PM" src="https://github.com/discourse/discourse/assets/50783505/efe8d8fe-f06c-4940-9c99-66a2f8fb3532">
55 lines
1.6 KiB
Handlebars
55 lines
1.6 KiB
Handlebars
<DModal
|
|
@title={{i18n "admin.badges.badge_groupings.modal_title"}}
|
|
@bodyClass="badge-groupings-modal"
|
|
@closeModal={{@closeModal}}
|
|
>
|
|
<:body>
|
|
<div class="badge-groupings">
|
|
<ul class="badge-groupings-list">
|
|
{{#each this.workingCopy as |wc|}}
|
|
<li class="badge-grouping-item">
|
|
<div class="badge-grouping">
|
|
{{#if wc.editing}}
|
|
<Input @value={{wc.name}} class="badge-grouping-name-input" />
|
|
{{else}}
|
|
<span>{{wc.displayName}}</span>
|
|
{{/if}}
|
|
</div>
|
|
<div class="actions">
|
|
{{#if wc.editing}}
|
|
<DButton @action={{fn (mut wc.editing) false}} @icon="check" />
|
|
{{else}}
|
|
<DButton
|
|
@action={{fn (mut wc.editing) true}}
|
|
@disabled={{wc.system}}
|
|
@icon="pencil-alt"
|
|
/>
|
|
{{/if}}
|
|
<DButton @action={{fn this.up wc}} @icon="chevron-up" />
|
|
<DButton @action={{fn this.down wc}} @icon="chevron-down" />
|
|
<DButton
|
|
@action={{fn this.delete wc}}
|
|
@disabled={{wc.system}}
|
|
@icon="times"
|
|
/>
|
|
</div>
|
|
</li>
|
|
{{/each}}
|
|
</ul>
|
|
</div>
|
|
<DButton @action={{this.add}} @label="admin.badges.new" />
|
|
</:body>
|
|
<:footer>
|
|
<DButton
|
|
@action={{this.saveAll}}
|
|
@label="admin.badges.save"
|
|
class="btn-primary"
|
|
@disabled={{this.submitDisabled}}
|
|
/>
|
|
<DButton
|
|
class="btn-flat d-modal-cancel"
|
|
@action={{@closeModal}}
|
|
@label="cancel"
|
|
/>
|
|
</:footer>
|
|
</DModal> |