2020-06-14 14:53:05 +02:00
|
|
|
{% extends 'layouts/base.njk' %}
|
|
|
|
|
2020-06-27 17:30:01 +02:00
|
|
|
{% set title = app.name + ' - File manager' %}
|
2020-06-14 14:53:05 +02:00
|
|
|
|
2020-06-14 15:05:04 +02:00
|
|
|
{% block scripts %}
|
|
|
|
<script src="/js/fm.js"></script>
|
|
|
|
{% endblock %}
|
|
|
|
|
2020-06-14 14:53:05 +02:00
|
|
|
{% block body %}
|
|
|
|
<h1>File manager</h1>
|
|
|
|
<p>You're their manager, please be nice with them.</p>
|
|
|
|
|
2020-06-14 15:05:04 +02:00
|
|
|
<section class="panel">
|
|
|
|
<h2>File list</h2>
|
2020-06-14 17:37:47 +02:00
|
|
|
<table class="data-table">
|
2020-06-14 15:05:04 +02:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>#</th>
|
2020-06-14 18:10:01 +02:00
|
|
|
<th>URL</th>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Size</th>
|
2020-06-14 15:05:04 +02:00
|
|
|
<th>Expires at</th>
|
2020-06-14 18:10:01 +02:00
|
|
|
<th>Actions</th>
|
2020-06-14 15:05:04 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
2020-06-14 17:37:47 +02:00
|
|
|
|
|
|
|
<tbody>
|
|
|
|
{% for file in files %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ file.id }}</td>
|
|
|
|
<td>
|
|
|
|
<div class="copyable-text">
|
|
|
|
<a class="content" href="{{ file.getURL() }}" target="_blank">{{ file.getURL() }}</a>
|
|
|
|
<button class="copy-button"><i data-feather="copy"></i></button>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>{{ file.real_name }}</td>
|
2020-06-14 18:10:01 +02:00
|
|
|
<td>{{ (file.size / (1024 * 1024)).toFixed(2) }}MB</td>
|
2020-06-14 17:37:47 +02:00
|
|
|
{% set expires_at = file.getExpirationDate() %}
|
|
|
|
<td>{% if expires_at %}{{ expires_at.toISOString() }}{% else %}Never{% endif %}</td>
|
2020-06-14 18:10:01 +02:00
|
|
|
<td>
|
2020-07-05 19:40:51 +02:00
|
|
|
<form action="{{ route('delete-file-frontend', file.slug) }}" method="post">
|
|
|
|
<button class="button danger"><i data-feather="trash"></i> Delete</button>
|
|
|
|
</form>
|
2020-06-14 18:10:01 +02:00
|
|
|
</td>
|
2020-06-14 17:37:47 +02:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
2020-06-14 15:05:04 +02:00
|
|
|
</table>
|
|
|
|
</section>
|
2020-06-14 14:53:05 +02:00
|
|
|
{% endblock %}
|