63 lines
2.5 KiB
Plaintext
63 lines
2.5 KiB
Plaintext
% # vim:set sw=4 ts=4 sts=4 ft=html.epl expandtab:
|
|
% use Number::Bytes::Human qw(format_bytes);
|
|
<div
|
|
:class="{ 'hidden': !showDelayModale, 'modale': true }"
|
|
class="hidden">
|
|
<div>
|
|
<h1>
|
|
<%= l('Information about delays') %>
|
|
</h1>
|
|
<div>
|
|
<p>
|
|
<%= l('If you choose a delay, the file will be deleted after that delay.') %>
|
|
<br>
|
|
<%= l('Don\'t worry: if a user begins to download the file before the expiration and the download ends after the expiration, he will be able to get the file.') %>
|
|
</p>
|
|
% if (defined(config('delay_for_size'))) {
|
|
<p>
|
|
<%= l('This server sets limitations according to the file size. The expiration delay of your file will be the minimum between what you choose and the following limitations:') %>
|
|
</p>
|
|
<ul>
|
|
% my $delays = config('delay_for_size');
|
|
% $delays->{0} = max_delay;
|
|
% my @keys = sort {$a <=> $b} keys %{$delays};
|
|
% my $i = 0;
|
|
% for my $key (@keys) {
|
|
% my $delay = $delays->{$keys[$i]};
|
|
% if ($i + 1 < scalar(@keys)) {
|
|
% if ($delay) {
|
|
<li>
|
|
<%= l('between %1 and %2, the file will be kept %3 day(s).', format_bytes($keys[$i]), format_bytes($keys[$i + 1]), $delay) %>
|
|
</li>
|
|
% } else {
|
|
<li>
|
|
<%= l('between %1 and %2, the file will be kept forever.', format_bytes($keys[$i]), format_bytes($keys[$i + 1]), $delay) %>
|
|
</li>
|
|
% }
|
|
% } else {
|
|
% if ($delay) {
|
|
<li>
|
|
<%= l('for %1 and more, the file will be kept %2 day(s)', format_bytes($keys[$i]), $delay) %>
|
|
</li>
|
|
% } else {
|
|
<li>
|
|
<%= l('for %1 and more, the file will be kept forever.', format_bytes($keys[$i]), $delay) %>
|
|
</li>
|
|
% }
|
|
% }
|
|
% $i++;
|
|
% }
|
|
</ul>
|
|
</div>
|
|
% }
|
|
<div class="my-4">
|
|
<a
|
|
href="#"
|
|
class="btn"
|
|
@click.prevent="showDelayModale = false">
|
|
<%= l('Close') %>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|