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 2a1059
Luc Didry 2a1059
    :class="{ 'hidden': !showDelayModale, 'modale': true }"
Luc Didry 2a1059
    class="hidden">
Luc Didry 2a1059
    
Luc Didry 2a1059
        

Luc Didry 2a1059
            <%= l('Information about delays') %>
Luc Didry 2a1059
        
Luc Didry 2a1059
        
Luc Didry 2a1059
            

Luc Didry 2a1059
                <%= l('If you choose a delay, the file will be deleted after that delay.') %>
Luc Didry 2a1059
                
Luc Didry 2a1059
                <%= 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 2a1059
            

Luc Didry d3222b
        % if (defined(config('delay_for_size'))) {
Luc Didry 2a1059
            

Luc Didry 2a1059
                <%= 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 2a1059
            

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 2a1059
                            
  • Luc Didry 2a1059
                                <%= 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 2a1059
                            
    Luc Didry d3222b
                        % } else {
    Luc Didry 2a1059
                            
  • Luc Didry 2a1059
                                <%= l('between %1 and %2, the file will be kept forever.', format_bytes($keys[$i]), format_bytes($keys[$i + 1]), $delay) %>
    Luc Didry 2a1059
                            
    Luc Didry d3222b
                        % }
    Luc Didry be8c84
                    % } else {
    Luc Didry d3222b
                        % if ($delay) {
    Luc Didry 2a1059
                            
  • Luc Didry 2a1059
                                <%= l('for %1 and more, the file will be kept %2 day(s)', format_bytes($keys[$i]), $delay) %>
    Luc Didry 2a1059
                            
    Luc Didry d3222b
                        % } else {
    Luc Didry 2a1059
                            
  • Luc Didry 2a1059
                                <%= l('for %1 and more, the file will be kept forever.', format_bytes($keys[$i]), $delay) %>
    Luc Didry 2a1059
                            
    Luc Didry d3222b
                        % }
    Luc Didry be8c84
                    % }
    Luc Didry d3222b
                    % $i++;
    Luc Didry 41cb17
                % }
    Luc Didry d3222b
                
    Luc Didry d3222b
            
    Luc Didry 41cb17
            % }
    Luc Didry 2a1059
            
    Luc Didry 2a1059
                
    Luc Didry 2a1059
                    href="#"
    Luc Didry 2a1059
                    class="btn"
    Luc Didry 2a1059
                    @click.prevent="showDelayModale = false">
    Luc Didry 2a1059
                    <%= l('Close') %>
    Luc Didry 2a1059
                
    Luc Didry 2a1059
            
    Luc Didry d3222b
        
    Luc Didry d3222b