81 lines
1.9 KiB
Plaintext
81 lines
1.9 KiB
Plaintext
%#
|
|
%# $Id$
|
|
%#
|
|
% layout 'default';
|
|
% title 'Maacom';
|
|
|
|
% use Mojo::Util qw(dumper);
|
|
|
|
% my $u = $c->app->user;
|
|
|
|
<h5 class="text-center">
|
|
Domains <a href="/domain/list"><i class="fi-refresh"></i></a>
|
|
<a class="float-right button tiny" href="/domain/add/form">
|
|
<i class="fi-plus"></i>
|
|
</a>
|
|
</h5>
|
|
|
|
|
|
% my $list = $u->domain_list;
|
|
|
|
% unless ($list) {
|
|
<div class="callout alert">
|
|
Cannot list domains. May be wrong database?
|
|
</div>
|
|
% }
|
|
|
|
<table class="hover" id="table">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>domain</th>
|
|
<th><i class="fi-graph-pie"></i></th>
|
|
<th><i class="fi-male"></i></th>
|
|
<th><i class="fi-male-female"></i></th>
|
|
<th><i class="fi-pencil"></i></th>
|
|
<th><i class="fi-trash"></i></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
% my $n = 0;
|
|
|
|
% if ($list) {
|
|
% foreach my $row (@$list) {
|
|
% $n += 1;
|
|
% my $id = $row->{id};
|
|
% my $name = $row->{name};
|
|
% my $size = $row->{size};
|
|
<tr>
|
|
<td><%= $n %></td>
|
|
<td><%= $name %></td>
|
|
<td><%= $size %></td>
|
|
<td><a href="/user/list?domain_id=<%= $id %>"><%= $u->domain_user_count($id) %></a></td>
|
|
<td><a href="/alias/list?domain_id=<%= $id %>"><%= $u->domain_alias_count($id) %></a></td>
|
|
<td><a href="/domain/update/form?domain_id=<%= $id %>"><i class="fi-pencil"></i></a></td>
|
|
<td><a href="/domain/delete/form?domain_id=<%= $id %>"><i class="fi-trash"></i></a></td>
|
|
</tr>
|
|
% }
|
|
% }
|
|
</tbody>
|
|
</table>
|
|
|
|
<script>
|
|
$.extend(true, $.fn.dataTable.defaults, {
|
|
"searching": true,
|
|
"ordering": true,
|
|
"language": {
|
|
"search": "",
|
|
"lengthMenu": "_MENU_",
|
|
"info": "_START_-_END_ of _TOTAL_",
|
|
"infoEmpty": "",
|
|
},
|
|
|
|
} );
|
|
|
|
$(document).ready(function() {
|
|
$('#table').DataTable();
|
|
});
|
|
</script>
|
|
|
|
%# EOF
|