Luc Didry 41cb17
% # vim:set sw=4 ts=4 sts=4 ft=html.epl expandtab:
Luc Didry 41cb17
% use Number::Bytes::Human qw(format_bytes);
Luc Didry c0530c
Luc Didry d3222b
    
Luc Didry d3222b
        

<%= l('Information about delays') %>

Luc Didry d3222b
        
Luc Didry d3222b
            

<%= l('If you choose a delay, the file will be deleted after that delay.') %>

Luc Didry d3222b
               <%= 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.') %>
Luc Didry d3222b
        % if (defined(config('delay_for_size'))) {
Luc Didry d3222b
            

<%= 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:') %>

Luc Didry d3222b
            
    Luc Didry d3222b
                % my $delays   = config('delay_for_size');
    Luc Didry d3222b
                % $delays->{0} = max_delay;
    Luc Didry d3222b
                % my @keys     = sort {$a <=> $b} keys %{$delays};
    Luc Didry d3222b
                % my $i        = 0;
    Luc Didry d3222b
                % for my $key (@keys) {
    Luc Didry d3222b
                    % my $delay = $delays->{$keys[$i]};
    Luc Didry d3222b
                    % if ($i + 1 < scalar(@keys)) {
    Luc Didry d3222b
                        % if ($delay) {
    Luc Didry d3222b
                        
  • <%= l('between %1 and %2, the file will be kept %3 day(s).', format_bytes($keys[$i]), format_bytes($keys[$i + 1]), $delay) %>
  • Luc Didry d3222b
                        % } else {
    Luc Didry d3222b
                        
  • <%= l('between %1 and %2, the file will be kept forever.', format_bytes($keys[$i]), format_bytes($keys[$i + 1]), $delay) %>
  • Luc Didry d3222b
                        % }
    Luc Didry be8c84
                    % } else {
    Luc Didry d3222b
                        % if ($delay) {
    Luc Didry d3222b
                        
  • <%= l('for %1 and more, the file will be kept %2 day(s)', format_bytes($keys[$i]), $delay) %>
  • Luc Didry d3222b
                        % } else {
    Luc Didry d3222b
                        
  • <%= l('for %1 and more, the file will be kept forever.', format_bytes($keys[$i]), $delay) %>
  • Luc Didry d3222b
                        % }
    Luc Didry be8c84
                    % }
    Luc Didry d3222b
                    % $i++;
    Luc Didry 41cb17
                % }
    Luc Didry d3222b
                
    Luc Didry d3222b
            
    Luc Didry 41cb17
            % }
    Luc Didry 41cb17
        
    Luc Didry d3222b
        
    Luc Didry d3222b
            <%= l('Close') %>
    Luc Didry d3222b
        
    Luc Didry d3222b