decide.nolog.cz/app/templates/create.hbs
2020-10-27 22:20:35 +01:00

63 lines
2.1 KiB
Handlebars

{{page-title (t "create.title")}}
<BsButtonGroup @justified={{true}} class="cr-steps-top-nav form-steps">
{{#each this.formSteps as |formStep|}}
{{#unless formStep.hidden}}
<BsButton
@onClick={{transition-to formStep.route}}
@type={{if (eq this.router.currentRouteName formStep.route) "primary is-active" "default"}}
disabled={{formStep.disabled}}
class="cr-steps-top-nav__button"
>
{{t formStep.label}}
</BsButton>
{{/unless}}
{{/each}}
<BsButton
@onClick={{transition-to "create.index"}}
@type={{if (eq this.router.currentRouteName "create.index") "primary is-active" "default"}}
class="cr-steps-top-nav__button"
>
{{t "create.formStep.type"}}
</BsButton>
<BsButton
@onClick={{transition-to "create.meta"}}
@type={{if (eq this.router.currentRouteName "create.meta") "primary is-active" "default"}}
disabled={{not this.canEnterMetaStep}}
class="cr-steps-top-nav__button"
>
{{t "create.formStep.meta"}}
</BsButton>
<BsButton
@onClick={{transition-to "create.options"}}
@type={{if (eq this.router.currentRouteName "create.options") "primary is-active" "default"}}
disabled={{not this.canEnterOptionsStep}}
class="cr-steps-top-nav__button"
>
{{#if this.isFindADate}}
{{t "create.formStep.options.days"}}
{{else}}
{{t "create.formStep.options.text"}}
{{/if}}
</BsButton>
{{#if this.isFindADate}}
<BsButton
@onClick={{transition-to "create.options-datetime"}}
@type={{if (eq this.router.currentRouteName "create.options-datetime") "primary is-active" "default"}}
disabled={{not this.canEnterOptionsDatetimeStep}}
class="cr-steps-top-nav__button"
>
{{t "create.formStep.options-datetime"}}
</BsButton>
{{/if}}
<BsButton
@onClick={{transition-to "create.settings"}}
@type={{if (eq this.router.currentRouteName "create.settings") "primary is-active" "default"}}
disabled={{not this.canEnterSettingsStep}}
class="cr-steps-top-nav__button"
>
{{t "create.formStep.settings"}}
</BsButton>
</BsButtonGroup>
{{outlet}}