This should be my final code update before I am ready for review! Basically, in
[mediagoblin.git] / mediagoblin / templates / mediagoblin / moderation / media_panel.html
CommitLineData
808eac00
JW
1{#
2# GNU MediaGoblin -- federated, autonomous media hosting
3# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU Affero General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU Affero General Public License for more details.
14#
15# You should have received a copy of the GNU Affero General Public License
16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17#}
18{% extends "mediagoblin/base.html" %}
19
daecdea9
A
20{% block title -%}
21 {% trans %}Media processing panel{% endtrans %} &mdash; {{ super() }}
22{%- endblock %}
23
dc31cd1b 24
808eac00
JW
25{% block mediagoblin_content %}
26
27<h1>{% trans %}Media processing panel{% endtrans %}</h1>
28
29<p>
30 {% trans %}Here you can track the state of media being processed on this instance.{% endtrans %}
31</p>
dfd66b78 32
808eac00
JW
33<h2>{% trans %}Media in-processing{% endtrans %}</h2>
34
35{% if processing_entries.count() %}
36 <table class="media_panel processing">
37 <tr>
38 <th>ID</th>
39 <th>User</th>
40 <th>Title</th>
41 <th>When submitted</th>
42 <th>Transcoding progress</th>
43 </tr>
44 {% for media_entry in processing_entries %}
45 <tr>
5c2b8486 46 <td>{{ media_entry.id }}</td>
808eac00
JW
47 <td>{{ media_entry.get_uploader.username }}</td>
48 <td>{{ media_entry.title }}</td>
b3b42bbe 49 <td>{{ media_entry.created.strftime("%F %R") }}</td>
808eac00
JW
50 {% if media_entry.transcoding_progress %}
51 <td>{{ media_entry.transcoding_progress }}%</td>
52 {% else %}
53 <td>Unknown</td>
54 {% endif %}
55 </tr>
56 {% endfor %}
57 </table>
58{% else %}
59 <p><em>{% trans %}No media in-processing{% endtrans %}</em></p>
dfd66b78 60{% endif %}
808eac00
JW
61
62<h2>{% trans %}These uploads failed to process:{% endtrans %}</h2>
63{% if failed_entries.count() %}
64
65 <table class="media_panel failed">
66 <tr>
67 <th>ID</th>
68 <th>User</th>
69 <th>Title</th>
70 <th>When submitted</th>
71 <th>Reason for failure</th>
72 <th>Failure metadata</th>
73 </tr>
74 {% for media_entry in failed_entries %}
75 <tr>
5c2b8486 76 <td>{{ media_entry.id }}</td>
808eac00
JW
77 <td>{{ media_entry.get_uploader.username }}</td>
78 <td>{{ media_entry.title }}</td>
b3b42bbe 79 <td>{{ media_entry.created.strftime("%F %R") }}</td>
808eac00
JW
80 {% if media_entry.get_fail_exception() %}
81 <td>{{ media_entry.get_fail_exception().general_message }}</td>
82 <td>{{ media_entry.fail_metadata }}</td>
83 {% else %}
84 <td>&nbsp;</td>
85 <td>&nbsp;</td>
86 {% endif %}
87 </tr>
88 {% endfor %}
89 </table>
90{% else %}
91 <p><em>{% trans %}No failed entries!{% endtrans %}</em></p>
92{% endif %}
93<h2>{% trans %}Last 10 successful uploads{% endtrans %}</h2>
94{% if processed_entries.count() %}
95
96 <table class="media_panel processed">
97 <tr>
98 <th>ID</th>
99 <th>User</th>
100 <th>Title</th>
101 <th>Submitted</th>
102 </tr>
103 {% for media_entry in processed_entries %}
104 <tr>
5c2b8486 105 <td>{{ media_entry.id }}</td>
808eac00
JW
106 <td>{{ media_entry.get_uploader.username }}</td>
107 <td><a href="{{ media_entry.url_for_self(request.urlgen) }}">{{ media_entry.title }}</a></td>
88dd6fc2 108 <td><span title='{{ media_entry.created.strftime("%F %R") }}'>{{ timesince(media_entry.created) }}</span></td>
808eac00
JW
109 </tr>
110 {% endfor %}
111 </table>
112{% else %}
113 <p><em>{% trans %}No processed entries, yet!{% endtrans %}</em></p>
114{% endif %}
115{% endblock %}