Verified Commit 85a02eb3 authored by Luc Didry's avatar Luc Didry
Browse files

馃悰 Fix incorrect HTML in delays.html.ep (related to #207)

parent f34d9911
Revision history for Lufi Revision history for Lufi
?.??.? ????-??-?? ?.??.? ????-??-??
- 馃悰 Fix incorrect HTML in delays.html.ep (#207)
0.05.3 2020-08-17 0.05.3 2020-08-17
- 馃悰 Check if provisioning lockfile mod time exists before using it (#208) - 馃悰 Check if provisioning lockfile mod time exists before using it (#208)
......
...@@ -4,35 +4,39 @@ ...@@ -4,35 +4,39 @@
<div class="modal-content"> <div class="modal-content">
<h1><%= l('Information about delays') %></h1> <h1><%= l('Information about delays') %></h1>
<div class="text-left"> <div class="text-left">
<p><%= l('If you choose a delay, the file will be deleted after that delay.') %><br> <p>
<%= 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.') %> <%= l('If you choose a delay, the file will be deleted after that delay.') %><br>
% if (defined(config('delay_for_size'))) { <%= 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><%= 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> </p>
<ul> % if (defined(config('delay_for_size'))) {
% my $delays = config('delay_for_size'); <p>
% $delays->{0} = max_delay; <%= 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:') %>
% my @keys = sort {$a <=> $b} keys %{$delays}; </p>
% my $i = 0; <ul>
% for my $key (@keys) { % my $delays = config('delay_for_size');
% my $delay = $delays->{$keys[$i]}; % $delays->{0} = max_delay;
% if ($i + 1 < scalar(@keys)) { % my @keys = sort {$a <=> $b} keys %{$delays};
% if ($delay) { % my $i = 0;
<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> % 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 { % } else {
<li><%= l('between %1 and %2, the file will be kept forever.', format_bytes($keys[$i]), format_bytes($keys[$i + 1]), $delay) %></li> % if ($delay) {
% } <li><%= l('for %1 and more, the file will be kept %2 day(s)', format_bytes($keys[$i]), $delay) %></li>
% } else { % } else {
% if ($delay) { <li><%= l('for %1 and more, the file will be kept forever.', format_bytes($keys[$i]), $delay) %></li>
<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++;
% } % }
% $i++; </ul>
% } % }
</ul>
</div> </div>
% }
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat"><%= l('Close') %></a> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat"><%= l('Close') %></a>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment