decide.nolog.cz/app/components/poll-evaluation-summary-option.hbs
Jeldrik Hanschke 0f94d81ad4
fix ember-cli-page-object deprecations (#674)
* fix ember-cli-page-object deprecations

* make linter happy
2023-10-15 23:26:18 +02:00

69 lines
No EOL
2.1 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 data-test-best-option={{@evaluationBestOption.option.title}}>
{{!
TODO: Simplify to dateStyle="full" and timeStyle="short" after upgrading to Ember Intl v6
}}
{{format-date
@evaluationBestOption.option.jsDate
weekday="long"
day="numeric"
month="long"
year="numeric"
hour=(if @evaluationBestOption.option.hasTime "numeric" undefined)
minute=(if @evaluationBestOption.option.hasTime "numeric" undefined)
timeZone=(if @timeZone @timeZone undefined)
}}</strong>.
{{! template-lint-enable block-indentation }}
{{else}}
<strong
data-test-best-option={{@evaluationBestOption.option.title}}
>{{@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}}