1
0
Fork 0
ember-file-download-list-ex.../app/templates/components/file-table.hbs

67 lines
No EOL
1.4 KiB
Handlebars

{{#if showDownloadAlert}}
<div
class="file-table-download-alert"
data-test-id="file-table-download-alert"
>
<button
data-test-action="file-table-download-close"
{{action "closeDownloadAlert"}}
>
Close
</button>
<ol>
{{#each selectedFileDownloads as | file |}}
<li><strong>{{file.device}}</strong>: <code>{{file.path}}</code></li>
{{/each}}
</ol>
</div>
{{/if}}
<header data-test-id="file-table-action-bar">
<button
class="file-table-action"
data-test-action="file-table-select-all"
{{action "toggleSelectAll"}}
>
<i
class="faux-checkbox -{{selectAllStatus}}"
data-test-id="file-table-select-status-icon"
>
&nbsp;
</i>
Selected {{selectedFilePaths.length}}
</button>
<button
class="file-table-action"
data-test-action="file-table-download-selected"
{{action "downloadSelected"}}
>
Download Selected
</button>
</header>
<table class="file-table">
<thead
class="file-table-head"
data-test-id="file-table-header"
>
<tr>
<th>&nbsp;</th>
<th>Name</th>
<th>Device</th>
<th>Path</th>
<th>&nbsp;</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{{#each files as | file |}}
{{file-table-item
file=file
selectedFilePaths=selectedFilePaths
click=(action "toggleSelectedPath" file.path)
}}
{{/each}}
</tbody>
</table>