forked from projects/file-explorer
add table for displaying dir content
This commit is contained in:
11
templates/_partials/_row.html.twig
Normal file
11
templates/_partials/_row.html.twig
Normal file
@ -0,0 +1,11 @@
|
||||
<tr>
|
||||
<td>
|
||||
{% if file.type == 'dir' %}
|
||||
{{ ux_icon('folder:closed', {height: '32px', width: '32px'}) }}
|
||||
{% else %}
|
||||
{{ ux_icon('file:default', {height: '32px', width: '32px'}) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ file.name }}</td>
|
||||
<td>{{ file.size }}</td>
|
||||
</tr>
|
13
templates/_partials/_table.html.twig
Normal file
13
templates/_partials/_table.html.twig
Normal file
@ -0,0 +1,13 @@
|
||||
<table class="table table-striped table-bordered w-75 mt-5">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Expand</td>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for dirContent in content %}
|
||||
{% include '_partials/_row.html.twig' with {file: dirContent} %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
Reference in New Issue
Block a user