decide.nolog.cz/app/templates/poll-error.hbs
Jeldrik Hanschke 77afc0d9fa
remove implicit this usage in templates (#352)
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.
2020-01-18 12:17:06 +01:00

32 lines
772 B
Handlebars

<div class="box">
{{#if this.decryptionFailed}}
<h2 data-test-error-type="decryption-failed">
{{t "error.poll.decryptionFailed.title"}}
</h2>
<p>
{{t "error.poll.decryptionFailed.description"}}
</p>
{{else if this.notFound}}
<h2 data-test-error-type="not-found">
{{t "error.poll.notFound.title"}}
</h2>
<p>
{{t "error.poll.notFound.description"}}
</p>
<ul>
<li>
{{t "error.poll.notFound.reasons.expired"}}
</li>
<li>
{{t "error.poll.notFound.reasons.typo"}}
</li>
</ul>
{{else}}
<h2 data-test-error-type="unexpected">
{{t "error.generic.unexpected.title"}}
</h2>
<p>
{{t "error.generic.unexpected.description"}}
</p>
{{/if}}
</div>