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>
|
|
|
|
|
2021-01-26 14:29:29 +01:00
|
|
|
<div class="container">
|
|
|
|
<section class="panel">
|
|
|
|
<h2><i data-feather="folder"></i> File list</h2>
|
|
|
|
<table class="data-table">
|
|
|
|
<thead>
|
2020-06-14 17:37:47 +02:00
|
|
|
<tr>
|
2021-01-26 14:29:29 +01:00
|
|
|
<th>#</th>
|
|
|
|
<th class="table-col-grow">URL</th>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Size</th>
|
|
|
|
<th>Expires at</th>
|
|
|
|
<th>Actions</th>
|
2020-06-14 17:37:47 +02:00
|
|
|
</tr>
|
2021-01-26 14:29:29 +01:00
|
|
|
</thead>
|
|
|
|
|
|
|
|
<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><pre>{{ file.real_name }}</pre></td>
|
|
|
|
<td>{{ (file.size / (1024 * 1024)).toFixed(2) }}MB</td>
|
|
|
|
{% set expires_at = file.getExpirationDate() %}
|
|
|
|
<td>{% if expires_at %}{{ expires_at.toISOString() }}{% else %}Never{% endif %}</td>
|
|
|
|
<td class="actions">
|
|
|
|
{% if file.shouldBeDeleted() %}
|
|
|
|
Pending deletion
|
|
|
|
{% else %}
|
|
|
|
<form action="{{ route('delete-file-frontend', file.slug) }}" method="post">
|
|
|
|
{{ macros.csrf(getCsrfToken) }}
|
|
|
|
<button class="button danger"><i data-feather="trash"></i> <span class="tip">Delete</span></button>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</section>
|
|
|
|
</div>
|
2020-11-22 15:19:58 +01:00
|
|
|
{% endblock %}
|