magnetico-web/templates/torrent_files.html.twig

10 lines
316 B
Twig
Raw Permalink Normal View History

<div class="file-tree"></div>
{# @var \App\Magnetico\Entity\Torrent torrent #}
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function(){
let tree = {{ torrent | torrent_file_tree | json_encode | raw }};
$('.file-tree').bstreeview({data: tree});
});
</script>