96 lines
3.7 KiB
Twig
96 lines
3.7 KiB
Twig
{% extends "base.html.twig" %}
|
|
|
|
{% block body %}
|
|
<div class="float-end">
|
|
<button id="addfolder" onClick="showFolder()" type="button" class="btn btn_link" data-toggle="modal" data-target="#folder">
|
|
<i class="fa fa-folder-plus fa-2x fa-fw"></i>
|
|
</button>
|
|
|
|
<a class="btn btn_link btn-modal" data-modalid="mymodallarge" data-modalurl="{{ path('app_home_upload',{folder:infolder}) }}">
|
|
<i class="fa fa-upload fa-2x fa-fw"></i>
|
|
</a>
|
|
</div>
|
|
|
|
<div style="font-size:180%">
|
|
{% for folder in tree %}
|
|
{% if not loop.first %} / {%endif%}
|
|
<a href='{{path("app_home",{folder:folder.folder})}}'>{{folder.name}}</a>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<ul class="list-group mt-3">
|
|
{% for folder in folders %}
|
|
<li class="list-group-item">
|
|
<a href='{{path("app_home",{folder:(infolder~"/"~folder)})}}'>
|
|
<i class="fa-solid fa-folder fa-fw fa-2x"></i>
|
|
<span style="font-size:180%">{{folder}}</span>
|
|
</a>
|
|
<span class="btn_link btn-action float-end">
|
|
<a onClick="showFile('{{folder}}')"><i class="fa-solid fa-pencil fa-fw"></i></a>
|
|
<a href='{{path("app_home_delete",{folder:infolder,file:(infolder~"/"~folder)})}}'><i class="fa-solid fa-trash fa-fw"></i></a>
|
|
</span>
|
|
</li>
|
|
{%endfor%}
|
|
|
|
{% for file in files %}
|
|
<li class="list-group-item">
|
|
<a href='{{path("app_home_download",{file:(infolder~"/"~file)})}}' target="_blank">
|
|
<i class="fa-solid fa-file fa-fw fa-2x"></i>
|
|
<span style="font-size:180%">{{file}}</span>
|
|
</a>
|
|
<span class="btn_link btn-action float-end">
|
|
<a onClick="showFile('{{file}}')"><i class="fa-solid fa-pencil fa-fw"></i></a>
|
|
<a href='{{path("app_home_delete",{folder:infolder,file:(infolder~"/"~file)})}}'><i class="fa-solid fa-trash fa-fw"></i></a>
|
|
</span>
|
|
|
|
</li>
|
|
{%endfor%}
|
|
</ul>
|
|
|
|
<div id="folder" class="modal" tabindex="-1">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">Création Répertoire</h4>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
{{ form_start(formfolder) }}
|
|
|
|
{{ form_end(formfolder) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="file" class="modal" tabindex="-1">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">Modification</h4>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
{{ form_start(formfile) }}
|
|
{{ form_end(formfile) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block localscript %}
|
|
<script>
|
|
function showFolder() {
|
|
$('#folder').modal('show');
|
|
$('#folder_name').focus();
|
|
}
|
|
|
|
function showFile(file) {
|
|
$('#file').modal('show');
|
|
$('#file_oldname').val(file);
|
|
$('#file_name').val(file);
|
|
$('#file_name').focus();
|
|
}
|
|
</script>
|
|
{% endblock %} |