discourse/app/assets/javascripts/admin/templates/modal/admin-edit-badge-groupings.hbs
2019-01-23 11:29:51 +01:00

30 lines
1.4 KiB
Handlebars

{{#d-modal-body title="admin.badges.badge_groupings.modal_title" class="badge-groupings-modal"}}
<div class="badge-groupings">
<ul class='badge-groupings-list'>
{{#each workingCopy as |wc|}}
<li class="badge-grouping-item">
<div class="badge-grouping">
{{#if wc.editing}}
{{input value=wc.name class="badge-grouping-name-input"}}
<button {{action "save" wc}} class="btn no-text">{{d-icon 'check'}}</button>
{{else}}
<span>{{wc.displayName}}</span>
{{/if}}
</div>
<div class='actions'>
<button {{action "edit" wc}} class="btn no-text" disabled={{wc.system}}>{{d-icon 'pencil-alt'}}</button>
<button {{action "up" wc}} class="btn no-text">{{d-icon 'chevron-up'}}</button>
<button {{action "down" wc}} class="btn no-text">{{d-icon 'chevron-down'}}</button>
<button {{action "delete" wc}} class="btn no-text btn-danger"
disabled={{wc.system}}>{{d-icon 'times'}}</button>
</div>
</li>
{{/each}}
</ul>
</div>
<button class='btn new-badge-grouping' {{action "add"}}>{{i18n 'admin.badges.new'}}</button>
{{/d-modal-body}}
<div class="modal-footer">
<button class='btn btn-primary' {{action "saveAll"}} disabled={{submitDisabled}}>{{i18n 'admin.badges.save'}}</button>
{{d-modal-cancel close=(route-action "closeModal")}}
</div>