open-nomad/ui/app/templates/components/image-file.hbs
Buck Doyle 244157786a
Add explicit this to templates (#8388)
This is the result of running the no-implicit-this-codemod, some manual fixes,
and the addition of a linting rule to prevent future ambiguity.
2020-07-09 15:19:07 -05:00

11 lines
611 B
Handlebars

<a data-test-image-link href={{this.src}} target="_blank" rel="noopener noreferrer" class="image-file-image">
<img data-test-image src={{this.src}} alt={{or this.alt this.fileName}} title={{this.fileName}} onload={{action this.updateImageMeta}} />
</a>
<figcaption class="image-file-caption">
<span class="image-file-caption-primary">
<strong data-test-file-name>{{this.fileName}}</strong>
{{#if (and this.width this.height)}}
<span data-test-file-stats>({{this.width}}px &times; {{this.height}}px{{#if this.size}}, {{format-bytes this.size}}{{/if}})</span>
{{/if}}
</span>
</figcaption>