]>
Commit | Line | Data |
---|---|---|
f6e6ff79 MT |
1 | {% extends "base.html" %} |
2 | ||
3 | {% block title %}{{ _("Uploads") }}{% end block %} | |
4 | ||
5 | {% block body %} | |
6 | <ul class="breadcrumb"> | |
7 | <li> | |
8 | <a href="/">{{ _("Home") }}</a> | |
9 | <span class="divider">/</span> | |
10 | </li> | |
11 | <li class="active"> | |
12 | <a href="/uploads">{{ _("Uploads") }}</a> | |
13 | </li> | |
14 | </ul> | |
15 | ||
16 | <div class="page-header"> | |
bb990aec | 17 | <h2>{{ _("Uploads") }}</h2> |
f6e6ff79 MT |
18 | </div> |
19 | ||
20 | {% if uploads %} | |
bb990aec MT |
21 | <table class="table table-striped table-hover"> |
22 | <thead> | |
23 | <tr> | |
24 | <th>{{ _("Filename") }}</th> | |
25 | <th>{{ _("Owner") }}</th> | |
26 | <th>{{ _("Filesize") }}</th> | |
27 | <th>{{ _("Time running") }}</th> | |
28 | </tr> | |
29 | </thead> | |
30 | <tbody> | |
31 | {% for upload in uploads %} | |
32 | <tr> | |
33 | <td>{{ upload.filename }}</td> | |
34 | <td> | |
35 | {% if upload.builder %} | |
36 | <a href="/builder/{{ upload.builder.name }}"> | |
37 | {{ upload.builder.name }} | |
38 | </a> | |
39 | {% elif upload.user %} | |
40 | <a href="/user/{{ upload.user.name }}"> | |
41 | {{ upload.user.realname }} | |
42 | </a> | |
43 | {% else %} | |
44 | {{ _("No owner.") }} | |
45 | {% end %} | |
46 | </td> | |
47 | <td> | |
48 | {{ format_size(upload.size) }} | |
49 | </td> | |
50 | <td> | |
51 | {% if upload.time_running %} | |
52 | {{ friendly_time(upload.time_running) }} / | |
53 | {{ format_size(upload.speed) }}b/s | |
54 | {% else %} | |
55 | {{ _("N/A") }} | |
56 | {% end %} | |
57 | </td> | |
58 | </tr> | |
59 | <tr> | |
60 | <td colspan="3"> | |
61 | <div class="progress progress-striped active"> | |
62 | <div class="bar" style="width: {{ "%d" % (upload.progress * 100) }}%;"></div> | |
63 | </div> | |
64 | </td> | |
65 | <td> | |
66 | {{ "%.2f%%" % (upload.progress * 100) }} | |
67 | </td> | |
68 | </tr> | |
69 | {% end %} | |
70 | </tbody> | |
71 | </table> | |
f6e6ff79 | 72 | {% else %} |
bb990aec | 73 | <p class="muted"> |
f6e6ff79 | 74 | {{ _("There are currently no uploads running.") }} |
bb990aec | 75 | </p> |
f6e6ff79 MT |
76 | {% end %} |
77 | {% end block %} |