2023-08-15 01:03:28 +08:00
|
|
|
<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}}
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="pencil"
|
2023-08-15 01:03:28 +08:00
|
|
|
/>
|
|
|
|
{{/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}}
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="xmark"
|
2023-08-15 01:03:28 +08:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2024-09-02 23:32:18 +08:00
|
|
|
<DButton
|
|
|
|
@action={{this.add}}
|
|
|
|
class="badge-groupings__add-grouping"
|
|
|
|
@label="admin.badges.new"
|
|
|
|
/>
|
2023-08-15 01:03:28 +08:00
|
|
|
</:body>
|
|
|
|
<:footer>
|
|
|
|
<DButton
|
|
|
|
@action={{this.saveAll}}
|
|
|
|
@label="admin.badges.save"
|
2024-09-02 23:32:18 +08:00
|
|
|
class="btn-primary badge-groupings__save"
|
2023-08-15 01:03:28 +08:00
|
|
|
@disabled={{this.submitDisabled}}
|
|
|
|
/>
|
|
|
|
<DButton
|
|
|
|
class="btn-flat d-modal-cancel"
|
|
|
|
@action={{@closeModal}}
|
|
|
|
@label="cancel"
|
|
|
|
/>
|
|
|
|
</:footer>
|
|
|
|
</DModal>
|