Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-29 20:20:29 +01:00
70 Zeilen
Kein EOL
1,4 KiB
Handlebars
70 Zeilen
Kein EOL
1,4 KiB
Handlebars
<div class="type-selector">
|
|
{{#if hasTypes}}
|
|
<a {{action "toggleTypes"}} class="active">
|
|
{{activeTypeLabel}}
|
|
</a>
|
|
|
|
{{#if showTypes}}
|
|
<div class="selector-types">
|
|
{{#each selectorTypes as |item|}}
|
|
{{wizard-mapper-selector-type
|
|
activeType=activeType
|
|
item=item
|
|
toggle=(action 'toggleType')}}
|
|
{{/each}}
|
|
</div>
|
|
{{/if}}
|
|
{{else}}
|
|
<span>{{activeTypeLabel}}</span>
|
|
{{/if}}
|
|
</div>
|
|
|
|
<div class="input">
|
|
{{#if showText}}
|
|
{{input
|
|
type="text"
|
|
value=value
|
|
placeholder=(i18n placeholderKey)}}
|
|
{{/if}}
|
|
|
|
{{#if showComboBox}}
|
|
{{combo-box
|
|
value=value
|
|
content=comboBoxContent
|
|
onChange=(action (mut value))
|
|
options=(hash
|
|
none=placeholderKey
|
|
)}}
|
|
{{/if}}
|
|
|
|
{{#if showMultiSelect}}
|
|
{{multi-select
|
|
content=multiSelectContent
|
|
value=value
|
|
onChange=(action (mut value))
|
|
options=multiSelectOptions}}
|
|
{{/if}}
|
|
|
|
{{#if showList}}
|
|
{{value-list
|
|
values=value
|
|
addKey=placeholderKey}}
|
|
{{/if}}
|
|
|
|
{{#if showTag}}
|
|
{{tag-chooser
|
|
tags=value
|
|
options=(hash
|
|
none=placeholderKey
|
|
filterable=true
|
|
)}}
|
|
{{/if}}
|
|
|
|
{{#if showUser}}
|
|
{{user-selector
|
|
includeMessageableGroups='true'
|
|
placeholderKey=placeholderKey
|
|
usernames=value
|
|
autocomplete="discourse"}}
|
|
{{/if}}
|
|
</div> |