0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-10 04:12:53 +01:00
discourse-custom-wizard/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs
Angus McLeod d8fd5cb258 various
2020-04-11 16:22:12 +10:00

76 Zeilen
Kein EOL
1,6 KiB
Handlebars

<div class="type-selector">
{{#if hasTypes}}
<a {{action "showTypes"}} class="active">
{{activeTypeLabel}}
</a>
<div class="selector-types">
{{#each selectorTypes as |item|}}
{{wizard-mapper-selector-type
activeType=activeType
item=item
toggle=(action 'toggleType')}}
{{/each}}
</div>
{{else}}
<span>{{activeTypeLabel}}</span>
{{/if}}
</div>
<div class="input">
{{#if showText}}
{{input
type="text"
value=value
click=(action 'enableActive')
placeholder=(i18n placeholderKey)}}
{{/if}}
{{#if showComboBox}}
{{combo-box
value=value
content=comboBoxContent
onChange=(action (mut value))
onOpen=(action "enableActive")
onClick=(action 'enableActive')
options=(hash
none=placeholderKey
)}}
{{/if}}
{{#if showMultiSelect}}
{{multi-select
content=multiSelectContent
value=value
onChange=(action (mut value))
onOpen=(action "enableActive")
onClose=(action "disableActive")
options=multiSelectOptions}}
{{/if}}
{{#if showList}}
{{value-list
values=value
addKey=placeholderKey}}
{{/if}}
{{#if showTag}}
{{tag-chooser
tags=value
filterable=true
onOpen=(action "enableActive")
onClose=(action "disableActive")
options=(hash
none=placeholderKey
)}}
{{/if}}
{{#if showUser}}
{{user-selector
includeMessageableGroups='true'
placeholderKey=placeholderKey
usernames=value
autocomplete="discourse"
click=(action "enableActive")}}
{{/if}}
</div>