This is a very small commit. All that I have done here is to clean up my code
[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
808eac00
JW
24{% block mediagoblin_content %}
25
26<h1>{% trans %}Media processing panel{% endtrans %}</h1>
27
28<p>
29 {% trans %}Here you can track the state of media being processed on this instance.{% endtrans %}
30</p>
31
32<h2>{% trans %}Media in-processing{% endtrans %}</h2>
33
34{% if processing_entries.count() %}
35 <table class="media_panel processing">
36 <tr>
37 <th>ID</th>
38 <th>User</th>
39 <th>Title</th>
40 <th>When submitted</th>
41 <th>Transcoding progress</th>
42 </tr>
43 {% for media_entry in processing_entries %}
44 <tr>
5c2b8486 45 <td>{{ media_entry.id }}</td>
808eac00
JW
46 <td>{{ media_entry.get_uploader.username }}</td>
47 <td>{{ media_entry.title }}</td>
b3b42bbe 48 <td>{{ media_entry.created.strftime("%F %R") }}</td>
808eac00
JW
49 {% if media_entry.transcoding_progress %}
50 <td>{{ media_entry.transcoding_progress }}%</td>
51 {% else %}
52 <td>Unknown</td>
53 {% endif %}
54 </tr>
55 {% endfor %}
56 </table>
57{% else %}
58 <p><em>{% trans %}No media in-processing{% endtrans %}</em></p>
59{% endif %}
60
61<h2>{% trans %}These uploads failed to process:{% endtrans %}</h2>
62{% if failed_entries.count() %}
63
64 <table class="media_panel failed">
65 <tr>
66 <th>ID</th>
67 <th>User</th>
68 <th>Title</th>
69 <th>When submitted</th>
70 <th>Reason for failure</th>
71 <th>Failure metadata</th>
72 </tr>
73 {% for media_entry in failed_entries %}
74 <tr>
5c2b8486 75 <td>{{ media_entry.id }}</td>
808eac00
JW
76 <td>{{ media_entry.get_uploader.username }}</td>
77 <td>{{ media_entry.title }}</td>
b3b42bbe 78 <td>{{ media_entry.created.strftime("%F %R") }}</td>
808eac00
JW
79 {% if media_entry.get_fail_exception() %}
80 <td>{{ media_entry.get_fail_exception().general_message }}</td>
81 <td>{{ media_entry.fail_metadata }}</td>
82 {% else %}
83 <td>&nbsp;</td>
84 <td>&nbsp;</td>
85 {% endif %}
86 </tr>
87 {% endfor %}
88 </table>
89{% else %}
90 <p><em>{% trans %}No failed entries!{% endtrans %}</em></p>
91{% endif %}
92<h2>{% trans %}Last 10 successful uploads{% endtrans %}</h2>
93{% if processed_entries.count() %}
94
95 <table class="media_panel processed">
96 <tr>
97 <th>ID</th>
98 <th>User</th>
99 <th>Title</th>
100 <th>Submitted</th>
101 </tr>
102 {% for media_entry in processed_entries %}
103 <tr>
5c2b8486 104 <td>{{ media_entry.id }}</td>
808eac00
JW
105 <td>{{ media_entry.get_uploader.username }}</td>
106 <td><a href="{{ media_entry.url_for_self(request.urlgen) }}">{{ media_entry.title }}</a></td>
88dd6fc2 107 <td><span title='{{ media_entry.created.strftime("%F %R") }}'>{{ timesince(media_entry.created) }}</span></td>
808eac00
JW
108 </tr>
109 {% endfor %}
110 </table>
111{% else %}
112 <p><em>{% trans %}No processed entries, yet!{% endtrans %}</em></p>
113{% endif %}
114{% endblock %}