ee7b646a636fb46df1de6a4c27e4d05d173395da
[mediagoblin.git] / mediagoblin / templates / mediagoblin / user_pages / processing_panel.html
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
20 {% from "mediagoblin/utils/pagination.html" import render_pagination %}
21
22 {% block title -%}
23 {% trans %}Media processing panel{% endtrans %} &mdash; {{ super() }}
24 {%- endblock %}
25
26 {% block mediagoblin_content %}
27
28 <h1>{% trans %}Media processing panel{% endtrans %}</h1>
29
30 <p>
31 {% trans %}You can track the state of media being processed for your gallery here.{% endtrans %}
32 </p>
33
34 <p>
35 Show:
36 <a href="{{ request.urlgen('mediagoblin.user_pages.processing_panel',
37 user=request.user.username) }}">All</a>,
38 <a href="{{ request.urlgen('mediagoblin.user_pages.processing_panel',
39 user=request.user.username, state="processing") }}">In processing</a>,
40 <a href="{{ request.urlgen('mediagoblin.user_pages.processing_panel',
41 user=request.user.username, state="failed") }}">Failed</a>,
42 <a href="{{ request.urlgen('mediagoblin.user_pages.processing_panel',
43 user=request.user.username, state="processed") }}">Successful</a>
44 </p>
45
46 {% if entries.count() %}
47 {{ render_pagination(request, pagination) }}
48 <table class="media_panel processing">
49 <tr>
50 <th width="210">Thumbnail</th>
51 <th>Title</th>
52 <th width="20%">When submitted</th>
53 <th width="200">Transcoding progress</th>
54 </tr>
55 {% for media_entry in entries %}
56 <tr>
57 {% if media_entry.state == 'processed' %}
58 {% set entry_url = media_entry.url_for_self(request.urlgen) %}
59 <td>
60 <div class="thumb-wrapper">
61 <a href="{{ entry_url }}">
62 <img src="{{ media_entry.thumb_url }}" alt="{{ media_entry.title }}" />
63 </a>
64 </div>
65 </td>
66 <td><a href="{{ entry_url }}">{{ media_entry.title }}</a></td>
67 <td>{{ media_entry.created.strftime("%F %R") }}</td>
68 <td>Ready</td>
69 {% else %}
70 <td>
71 <div class="thumb-wrapper">
72 <img src="{{ media_entry.thumb_url }}" alt="{{ media_entry.title }}" />
73 {% if media_entry.state == 'processing' %}
74 <div class="thumb-overlay-status thumb-processing">Processing...</div>
75 {% elif media_entry.state == 'failed' %}
76 <div class="thumb-overlay-status thumb-failed">Failed!</div>
77 {% endif %}
78 </div>
79 </td>
80 <td>{{ media_entry.title }}</td>
81 <td>{{ media_entry.created.strftime("%F %R") }}</td>
82 {% if media_entry.transcoding_progress %}
83 <td>{{ media_entry.transcoding_progress }}%</td>
84 {% else %}
85 <td>Unknown</td>
86 {% endif %}
87 {% endif %}
88 </tr>
89 {% endfor %}
90 </table>
91 {{ render_pagination(request, pagination) }}
92 {% else %}
93 <p><em>{% trans %}You have not uploaded anything yet!{% endtrans %}</em></p>
94 {% endif %}
95 {% endblock %}