summaryrefslogtreecommitdiff
path: root/templates/apps/content/domain.html
blob: 5efd236d0f625c4c9d5985e7e5a53b30f9f2b3d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{% extends "base.html" %}
{% block js %}
    <link href="{{STATIC_URL}}/css/jquery.dataTables.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="{{STATIC_URL}}/js/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="{{STATIC_URL}}/js/dataTables.fileSize.js"></script>
    <script type="text/javascript" src="{{STATIC_URL}}/js/dataTables.percent.js"></script>
    <script>
        $(document).ready(function() {
            $('#content').dataTable({
                "aoColumns": [
                null,
                null,
                { "sType": "file-size" },
                { "sType": "percent" }
            ]
            });
        });
    </script>
{% endblock %}
{% block content %}
<h1>Content for {{domain}}</h1>
<div>
    <strong>Number of files:</strong> {{ total_files }} | <strong>Total storage:</strong> {{ total_bytecount|filesizeformat }}
</div>
 <br>
 <br>
<div>
    <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="content">
        <thead>
            <tr>
                <th>Username</th><th>Number of files</th><th>Storage used</th><th>Percent</th>
            </tr>
        </thead>
        <tbody>
        {% for user in users %}
            <tr>
                <td>{{ user.username }}</td>
                <td>{{ user.number_of_files }}</td>
                <td>{{ user.bytecount|filesizeformat }}</td>
                <td>{% widthratio user.bytecount total_bytecount 100 %}%</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
</div>
{% endblock %}

{% block widgets %}

{% endblock %}