lufi/themes/default/templates/files.html.ep

59 lines
2.4 KiB
Plaintext

% # vim:set sts=4 sw=4 ts=4 ft=html.epl expandtab:
<h2><%= l('My files') %></h2>
<hr>
<p>
<%= l('Only the files sent with this browser will be listed here. This list is stored in localStorage: if you delete your localStorage data, you\'ll lose this list.') %><br>
<%= l('Rows in red mean that the files have expired and are no longer available.') %>
</p>
<div class="files-buttons">
<a href="#" onclick="exportStorage();" class="btn left-mg cyan"><%= l('Export localStorage data') %></a>
<a href="#" onclick="purgeExpired();" class="btn left-mg cyan"><%= l('Purge expired files from localStorage') %></a>
<a href="#" onclick="$('#import').click();" class="btn left-mg cyan"><%= l('Import localStorage data') %></a>
<span class="file-field input-field">
<input type="file" id="import" onchange="importStorage(this.files)">
</span>
<a href="#" onclick="massDelete()" class="btn left-mg cyan disabled" id="mass-delete" disabled><%= l('Delete selected files') %></a>
</div>
<div>
<table class="responsive-table striped">
<thead>
<tr>
<th class="center-align"></th>
<th class="center-align"><%= l('File name') %></th>
<th class="center-align"><%= l('Download link') %></th>
<th class="center-align"><%= l('Counter') %></th>
<th class="center-align"><%= l('Delete at first download?') %></th>
<th class="center-align"><%= l('Uploaded at') %></th>
<th class="center-align"><%= l('Expires at') %></th>
<th class="center-align"><%= l('Deletion link') %></th>
<th class="center-align"><%= l('Mail') %></th>
</tr>
</thead>
<tbody id="myfiles">
</tbody>
</table>
</div>
%= javascript begin
% if (defined($self->config('fixed_domain')) && $self->config('fixed_domain')) {
var baseURL = '<%= url_for('/')->host($self->config('fixed_domain'))->to_abs() %>';
% } else {
var baseURL = '<%= url_for('/')->to_abs() %>';
% }
var actionURL = '<%= url_for('/')->to_abs() %>';
var counterURL = '<%== url_for('counter') %>';
var i18n = {
noExpiration: '<%= l('No expiration delay') %>',
importProcessed: '<%= l('The data has been successfully imported.') %>',
};
$(document).ready(function() {
populateFilesTable();
});
% end
%= javascript '/js/lufi-files.js'
%= javascript '/js/moment-with-locales.min.js'