Merge remote-tracking branch 'gsoc2016/Subtitle-1'
[mediagoblin.git] / mediagoblin / templates / mediagoblin / user_pages / processing_panel.html
CommitLineData
01c75c7e
CAW
1{#
2# GNU MediaGoblin -- federated, autonomous media hosting
cf29e8a8 3# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
01c75c7e
CAW
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
75972f0a
BB
20{% from "mediagoblin/utils/pagination.html" import render_pagination %}
21
daecdea9
A
22{% block title -%}
23 {% trans %}Media processing panel{% endtrans %} &mdash; {{ super() }}
24{%- endblock %}
25
01c75c7e
CAW
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>
906a00b6
BB
33
34<p>
35Show:
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',
4a17f151 43 user=request.user.username, state="processed") }}">Successful</a>
906a00b6 44</p>
01c75c7e 45
9ab3c66c 46{% if entries.count() %}
75972f0a 47 {{ render_pagination(request, pagination) }}
01c75c7e
CAW
48 <table class="media_panel processing">
49 <tr>
75972f0a 50 <th width="210">Thumbnail</th>
01c75c7e 51 <th>Title</th>
75972f0a
BB
52 <th width="20%">When submitted</th>
53 <th width="200">Transcoding progress</th>
01c75c7e 54 </tr>
9ab3c66c 55 {% for media_entry in entries %}
01c75c7e 56 <tr>
9ab3c66c
BB
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>
ec82fbd8 80 <td>{{ media_entry.title }}</td>
b3b42bbe 81 <td>{{ media_entry.created.strftime("%F %R") }}</td>
64712915
JW
82 {% if media_entry.transcoding_progress %}
83 <td>{{ media_entry.transcoding_progress }}%</td>
84 {% else %}
85 <td>Unknown</td>
86 {% endif %}
9ab3c66c 87 {% endif %}
01c75c7e
CAW
88 </tr>
89 {% endfor %}
90 </table>
75972f0a 91 {{ render_pagination(request, pagination) }}
01c75c7e 92{% else %}
9ab3c66c 93 <p><em>{% trans %}You have not uploaded anything yet!{% endtrans %}</em></p>
01c75c7e 94{% endif %}
01c75c7e 95{% endblock %}