PageRenderTime 17ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/templates/webapps/reports/users_user_disk_usage.mako

https://bitbucket.org/cistrome/cistrome-harvard/
Mako | 43 lines | 41 code | 2 blank | 0 comment | 2 complexity | 6062fd99d18e5cd176c2ddc5e5ed46ac MD5 | raw file
 1<%inherit file="/base.mako"/>
 2<%namespace file="/message.mako" import="render_msg" />
 3
 4%if message:
 5    ${render_msg( message, 'done' )}
 6%endif
 7
 8<div class="toolForm">
 9    <h3 align="center">Per-user disk usage</h3>
10    <h4 align="center">Listed in descending order by usage size</h4>
11    <table align="center" width="70%" class="colored" cellpadding="5" cellspacing="5">
12        <tr>
13            <td>
14                <form method="post" controller="users" action="user_disk_usage">
15                    <p>
16                        Top <input type="textfield" value="${user_cutoff}" size="3" name="user_cutoff"> shown (0 = all).
17                        &nbsp;<button name="action" value="user_cutoff">Go</button>
18                    </p>
19                </form>
20            </td>
21        </tr>
22    </table>
23    <table align="center" width="70%" class="colored" cellpadding="5" cellspacing="5">
24        %if users:
25            <tr class="header">
26                <td>Email</td>
27                <td>Disk Usage:</td>
28            </tr>
29            <% ctr = 0 %>
30            %for user in users:
31                %if ctr % 2 == 1:
32                    <tr class="odd_row">
33                %else:
34                    <tr class="tr">
35                %endif
36                    <td>${user.email}</td>
37                    <td>${user.get_disk_usage( nice_size=True )}</td>
38                </tr>
39                <% ctr += 1 %>
40            %endfor
41        %endif
42    </table>
43</div>