discourse/app/assets/javascripts/admin/addon/components/value-list.hbs

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

43 lines
1.1 KiB
Handlebars
Raw Normal View History

{{#if this.collection}}
<div class="values">
{{#each this.collection as |value index|}}
<div data-index={{index}} class="value">
<DButton
@action={{action "removeValue"}}
@actionParam={{value}}
@icon="times"
@class="remove-value-btn btn-small"
/>
<Input
title={{value}}
@value={{value}}
class="value-input"
{{on "focusout" (fn (action "changeValue") index)}}
/>
{{#if this.showUpDownButtons}}
<DButton
@action={{action "shift" -1 index}}
@icon="arrow-up"
@class="shift-up-value-btn btn-small"
/>
<DButton
@action={{action "shift" 1 index}}
@icon="arrow-down"
@class="shift-down-value-btn btn-small"
/>
{{/if}}
</div>
{{/each}}
</div>
{{/if}}
<ComboBox
@valueProperty={{null}}
@nameProperty={{null}}
@value={{this.newValue}}
@content={{this.filteredChoices}}
@onChange={{action "selectChoice"}}
@options={{hash allowAny=true none=this.noneKey}}
/>