lufi/templates/index.html.ep

78 lines
2.9 KiB
Plaintext

% # vim:set sw=4 ts=4 sts=4 ft=html.epl expandtab:
% my %d = (
% delay_0 => l('no time limit'),
% delay_1 => l('24 hours'),
% delay_365 => l('1 year')
% );
<div class="inner cover">
<div class="form-group row">
% if (defined(config('broadcast_message'))) {
<div class="col-sm-12 col-xs-12">
<div class="alert alert-info">
<strong><%= config('broadcast_message') %></strong>
</div>
</div>
% }
<div class="col-sm-6 col-xs-12">
<select id="delete-day" class="form-control">
% for my $delay (qw/0 1 7 30 365/) {
% my $text = ($delay == 7 || $delay == 30) ? l('%1 days', $delay) : $d{'delay_'.$delay};
% if (config('max_delay')) {
% if ($delay) {
% if ($delay < config('max_delay')) {
<option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>
% } elsif ($delay == config('max_delay')) {
<option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>
% last;
% } else {
% my $text = ($delay == 1) ? l('24 hours') : l('%1 days', $delay);
<option value="<%= config('max_delay') %>" <%== is_selected(config('max_delay')) %>><%= l('%1 days', config('max_delay')) %></option>
% last;
% }
% }
% } else {
<option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>
% }
% }
</select>
</div>
<div class="col-sm-6 col-xs-12 text-left">
<div class="checkbox">
<label>
<input type="checkbox" id="first-view"> <%= l('Delete at first view?') %>
</label>
</div>
</div>
</div>
<div id="files">
<h2><%= l('Drop files here') %></h2>
<p><small><%= l('or') %></small></p>
<label>
<span><%= l('Click to open the file browser') %></span>
<input type="file" onchange="handleFiles(this.files)" multiple>
</label>
</div>
<div id="results">
<h2><%= l('Uploaded files') %></h2>
<div id="misc" class="form-group"></div>
<ul class="list-group" id="ul-results">
</ul>
</div>
</div>
%= javascript begin
var ws_url = '<%= url_for('upload')->to_abs() %>';
var i18n = {
copyAll: '<%= l('Copy all links to clipboard') %>',
cpText: '<%= l('Copy to clipboard') %>',
delText: '<%= l('Deletion link') %>',
dlText: '<%= l('Download link') %>',
download: '<%= l('Download') %>',
confirmExit: '<%= l('You have attempted to leave this page. The upload will be canceled. Are you sure?') %>',
hit: '<%= l('Hit Enter, then Ctrl+C to copy the download link') %>',
hits: '<%= l('Hit Enter, then Ctrl+C to copy all the download links') %>',
mailTo: '<%= l('Send all links by email') %>',
}
% end
%= javascript '/js/sjcl.js'
%= javascript '/js/lufi-up.js'