42 lines
1.8 KiB
Twig
42 lines
1.8 KiB
Twig
<div class="max-w-4xl overflow-x-auto shadow-md sm:rounded-lg ">
|
|
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
|
<thead class="text-xs text-gray-700 uppercase bg-gray-200 dark:bg-gray-700 dark:text-gray-400">
|
|
<tr>
|
|
<th scope="col" class="px-6 py-3" style="width: 5%;">
|
|
|
|
</th>
|
|
<th scope="col" class="px-6 py-3">
|
|
name
|
|
</th>
|
|
<th scope="col" class="px-6 py-3">
|
|
Size
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% if app.request.requestUri != '/files' %}
|
|
{% include '_partials/_row.html.twig' with {file: {name: '..', size: '-', type: 'dir'}} %}
|
|
{% endif %}
|
|
{% for dirContent in content %}
|
|
{% include '_partials/_row.html.twig' with {file: dirContent} %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
{{ form_start(fileForm, {'attr': {'data-controller': 'upload-file'}}) }}
|
|
<div class="flex items-center justify-center max-w-4xl mt-5">
|
|
<label for="upload_file_form_files"
|
|
class="flex flex-col items-center justify-center w-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600">
|
|
<div class="flex flex-col items-center justify-center pt-5 pb-6">
|
|
{{ ux_icon('file:upload', {height: '64px', width: '64px'}) }}
|
|
<p class="mb-2 text-sm text-gray-500 dark:text-gray-400"><span class="font-semibold">Click to upload</span>
|
|
or drag and drop</p>
|
|
</div>
|
|
{{ form_widget(fileForm.files) }}
|
|
<button type="submit" class="hidden"></button>
|
|
</label>
|
|
</div>
|
|
{{ form_end(fileForm) }}
|