fix(front/file-uploader): remove unnecessary data-table-container usage
This commit is contained in:
parent
c2182dbbca
commit
53c7423115
@ -191,55 +191,53 @@
|
|||||||
|
|
||||||
<Pagination pagination={$locals.pagination} routeName="file-uploader" contextSize={3}/>
|
<Pagination pagination={$locals.pagination} routeName="file-uploader" contextSize={3}/>
|
||||||
|
|
||||||
<div class="data-table-container">
|
<table class="data-table file-upload-table">
|
||||||
<table class="data-table file-upload-table">
|
<thead>
|
||||||
<thead>
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th class="table-col-grow">Name</th>
|
||||||
|
<th>Size</th>
|
||||||
|
<th>Expires in</th>
|
||||||
|
<th>Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
{#each $locals.files as file}
|
||||||
<tr>
|
<tr>
|
||||||
<th>#</th>
|
<td>{file.id}</td>
|
||||||
<th class="table-col-grow">Name</th>
|
<td class="table-col-grow-cell"><a href="{file.url}">
|
||||||
<th>Size</th>
|
<pre>{file.real_name}</pre>
|
||||||
<th>Expires in</th>
|
</a></td>
|
||||||
<th>Actions</th>
|
<td>{(file.size / (1024 * 1024)).toFixed(2)}MB</td>
|
||||||
|
<td>
|
||||||
|
{#if file.expires_at}
|
||||||
|
<time datetime="{file.expires_at}" title="{file.expires_at}">
|
||||||
|
{Time.humanizeTimeTo(new Date(file.expires_at))}
|
||||||
|
</time>
|
||||||
|
{:else}
|
||||||
|
Never
|
||||||
|
{/if}
|
||||||
|
</td>
|
||||||
|
<td class="actions">
|
||||||
|
{#if file.shouldBeDeleted}
|
||||||
|
Pending deletion
|
||||||
|
{:else}
|
||||||
|
<CopyableText content="{file.url}" buttonMode/>
|
||||||
|
|
||||||
|
<Form action={route('delete-file-frontend', file.slug)} button
|
||||||
|
submitIcon="trash" submitText="delete" submitClass="danger"
|
||||||
|
confirm="Are you sure you want to delete file {file.real_name}?"/>
|
||||||
|
{/if}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
{:else}
|
||||||
|
<tr>
|
||||||
<tbody>
|
<td colspan="5" class="center">You haven't uploaded any file yet.</td>
|
||||||
{#each $locals.files as file}
|
</tr>
|
||||||
<tr>
|
{/each}
|
||||||
<td>{file.id}</td>
|
</tbody>
|
||||||
<td class="table-col-grow-cell"><a href="{file.url}">
|
</table>
|
||||||
<pre>{file.real_name}</pre>
|
|
||||||
</a></td>
|
|
||||||
<td>{(file.size / (1024 * 1024)).toFixed(2)}MB</td>
|
|
||||||
<td>
|
|
||||||
{#if file.expires_at}
|
|
||||||
<time datetime="{file.expires_at}" title="{file.expires_at}">
|
|
||||||
{Time.humanizeTimeTo(new Date(file.expires_at))}
|
|
||||||
</time>
|
|
||||||
{:else}
|
|
||||||
Never
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
<td class="actions">
|
|
||||||
{#if file.shouldBeDeleted}
|
|
||||||
Pending deletion
|
|
||||||
{:else}
|
|
||||||
<CopyableText content="{file.url}" buttonMode/>
|
|
||||||
|
|
||||||
<Form action={route('delete-file-frontend', file.slug)} button
|
|
||||||
submitIcon="trash" submitText="delete" submitClass="danger"
|
|
||||||
confirm="Are you sure you want to delete file {file.real_name}?"/>
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{:else}
|
|
||||||
<tr>
|
|
||||||
<td colspan="5" class="center">You haven't uploaded any file yet.</td>
|
|
||||||
</tr>
|
|
||||||
{/each}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Pagination pagination={$locals.pagination} routeName="file-uploader" contextSize={3}/>
|
<Pagination pagination={$locals.pagination} routeName="file-uploader" contextSize={3}/>
|
||||||
</section>
|
</section>
|
||||||
|
Loading…
Reference in New Issue
Block a user