77afc0d9fa
This refactors references to values in templates from `{{foo}}` to either `{{this.foo}}` if it's a property of backing JavaScript class or `{{@foo}}` if it's passed in on invocation. You could find more details on this change in Ember docs: - [required `this` in templates](https://guides.emberjs.com/release/upgrading/current-edition/templates/#toc_required-this-in-templates) - [named arguments](https://guides.emberjs.com/release/upgrading/current-edition/templates/#toc_named-arguments) While doing this I noticed that `<PollEvaluationSummaryOption>` component could be easily refactored to a template-only component. Done it as part of this pull request even so it's technically not related.
60 lines
No EOL
1.8 KiB
Handlebars
60 lines
No EOL
1.8 KiB
Handlebars
{{!--
|
|
There must not be a line break between option text and "</strong>." cause otherwise
|
|
we will see a space between option string and following dot.
|
|
--}}
|
|
{{#if @isFindADate}}
|
|
{{! Need to disable block indentation rule cause there shouldn't be a space between date and dot }}
|
|
{{! template-lint-disable block-indentation }}
|
|
<strong class="best-option-value">
|
|
{{moment-format
|
|
@evaluationBestOption.option.title
|
|
(if @evaluationBestOption.option.hasTime "LLLL" @momentLongDayFormat)
|
|
locale=@currentLocale
|
|
timeZone=@timezone
|
|
}}</strong>.
|
|
{{! template-lint-enable block-indentation }}
|
|
{{else}}
|
|
<strong class="best-option-value">{{@evaluationBestOption.option.title}}</strong>.
|
|
{{/if}}
|
|
|
|
<br>
|
|
|
|
{{#if @isFindADate}}
|
|
{{#if @evaluationBestOption.answers.yes}}
|
|
{{t
|
|
"poll.evaluation.bestOptionParticipants.findADate.yes"
|
|
count=@evaluationBestOption.answers.yes
|
|
}}
|
|
{{/if}}
|
|
{{#if @evaluationBestOption.answers.maybe}}
|
|
{{t
|
|
"poll.evaluation.bestOptionParticipants.findADate.maybe"
|
|
count=@evaluationBestOption.answers.maybe
|
|
}}
|
|
{{/if}}
|
|
{{#if @evaluationBestOption.answers.no}}
|
|
{{t
|
|
"poll.evaluation.bestOptionParticipants.findADate.no"
|
|
count=@evaluationBestOption.answers.no
|
|
}}
|
|
{{/if}}
|
|
{{else}}
|
|
{{#if @evaluationBestOption.answers.yes}}
|
|
{{t
|
|
"poll.evaluation.bestOptionParticipants.makeAPoll.yes"
|
|
count=@evaluationBestOption.answers.yes
|
|
}}
|
|
{{/if}}
|
|
{{#if @evaluationBestOption.answers.maybe}}
|
|
{{t
|
|
"poll.evaluation.bestOptionParticipants.makeAPoll.maybe"
|
|
count=@evaluationBestOption.answers.maybe
|
|
}}
|
|
{{/if}}
|
|
{{#if @evaluationBestOption.answers.no}}
|
|
{{t
|
|
"poll.evaluation.bestOptionParticipants.makeAPoll.no"
|
|
count=@evaluationBestOption.answers.no
|
|
}}
|
|
{{/if}}
|
|
{{/if}} |