87 lines
3.1 KiB
Plaintext
87 lines
3.1 KiB
Plaintext
% use Number::Bytes::Human qw(format_bytes);
|
|
% my $lang = $self->get_date_lang();
|
|
|
|
<section class="my-invitations-section">
|
|
<h1><%= l('My invitations') %></h1>
|
|
<p>
|
|
<%= l('Rows in purple mean that the invitations have expired.') %>
|
|
</p>
|
|
<div class="actions-buttons">
|
|
<a href="#" class="button action-invert-selection"><%= l('Invert selection') %></a>
|
|
<a href="#" class="button action-toggle-hidden"><%= l('Show hidden invitations') %></a>
|
|
<a href="#" class="button action-delete-invitation" disabled><%= l('Delete') %></a>
|
|
<a href="#" class="button action-resend-mail" disabled><%= l('Resend invitation mail') %></a>
|
|
<a href="#" class="button action-toggle-visibility" disabled><%= l('Toggle visibility') %></a>
|
|
</div>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th> </th>
|
|
<th><%= l('Guest mail') %></th>
|
|
<th><%= l('URL') %></th>
|
|
<th><%= l('Created at') %></th>
|
|
<th><%= l('Expire at') %></th>
|
|
<th><%= l('Files sent at') %></th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody data-visibility="hidden">
|
|
% my $time = time;
|
|
% $invitations->each(sub {
|
|
% my ($e, $num) = @_;
|
|
% return if $e->deleted;
|
|
% my $class = '';
|
|
% $class = 'deleted' unless $e->is_valid;
|
|
% $class .= ' hidden' unless $e->show_in_list;
|
|
<tr id="row-<%= $e->token %>" class="<%= $class %>" data-visibility="<%= ($e->show_in_list) ? 1 : 0 %>">
|
|
<td class="column selection">
|
|
<div class="checkbox input-selection">
|
|
<input type="checkbox">
|
|
</div>
|
|
<input type="checkbox" id="<%= $e->token %>">
|
|
<label for="<%= $e->token %>" hidden></label>
|
|
|
|
% unless ($e->show_in_list) {
|
|
<i class="mdi-navigation-cancel" title="<%= l('This invitation is normally hidden') %>"></i>
|
|
% }
|
|
</td>
|
|
<td><%= $e->guest_mail %></td>
|
|
<td><%= url_for('guest', token => $e->token)->to_abs %></td>
|
|
<td><%= $lang->time2str(l('%A %d %B %Y at %T'), $e->created_at) %></td>
|
|
<td id="expire-<%= $e->token %>"><%= $lang->time2str(l('%A %d %B %Y at %T'), $e->expire_at) %></td>
|
|
<td><%= $lang->time2str(l('%A %d %B %Y at %T'), $e->files_sent_at) if $e->files_sent_at %></td>
|
|
<td>
|
|
% if ($e->files) {
|
|
<a href="#files-info"
|
|
data-files="<%= $e->files %>"
|
|
data-token="<%= $e->token %>"
|
|
data-guest="<%= $e->guest_mail %>"
|
|
class="btn left-mg cyan waves-effect waves-light modal-trigger prefix">
|
|
<%= l('Files') %>
|
|
</a>
|
|
% }
|
|
</td>
|
|
</tr>
|
|
% });
|
|
</tbody>
|
|
</table>
|
|
|
|
<div id="files-info" class="modal">
|
|
<div class="modal-content">
|
|
<h1 class="small-h1"></h1>
|
|
<div class="text-left">
|
|
<ul id="files-ul">
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat"><%= l('Close') %></a>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
%= javascript '/partial/invitations.js'
|
|
%= javascript '/js/lufi-list-invitations.js'
|
|
%= javascript '/js/filesize.min.js'
|