From: Boris Bobrov Date: Mon, 11 Aug 2014 09:39:19 +0000 (+0400) Subject: processing panel new looks X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9ab3c66cf18b85e69908131e945b9c2e1eeec268;p=mediagoblin.git processing panel new looks --- diff --git a/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html b/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html index 2a449d45..545d7afc 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html +++ b/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html @@ -30,8 +30,47 @@

{% trans %}Media in-processing{% endtrans %}

+ + +{% if entries.count() %} @@ -39,9 +78,31 @@ - {% for media_entry in processing_entries %} + {% for media_entry in entries %} - + {% if media_entry.state == 'processed' %} + {% set entry_url = media_entry.url_for_self(request.urlgen) %} + + + + + {% else %} + {% if media_entry.transcoding_progress %} @@ -49,61 +110,11 @@ {% else %} {% endif %} + {% endif %} {% endfor %}
IDWhen submitted Transcoding progress
{{ media_entry.id }} +
+ + {{ media_entry.title }} + +
+
{{ media_entry.title }}{{ media_entry.created.strftime("%F %R") }}Ready +
+ {{ media_entry.title }} + {% if media_entry.state == 'processing' %} +
Processing...
+ {% elif media_entry.state == 'failed' %} +
Failed!
+ {% endif %} +
+
{{ media_entry.title }} {{ media_entry.created.strftime("%F %R") }}Unknown
{% else %} -

{% trans %}No media in-processing{% endtrans %}

+

{% trans %}You have not uploaded anything yet!{% endtrans %}

{% endif %} - -

{% trans %}These uploads failed to process:{% endtrans %}

-{% if failed_entries.count() %} - - - - - - - - - - {% for media_entry in failed_entries %} - - - - - {% if media_entry.get_fail_exception() %} - - - {% else %} - - - {% endif %} - - {% endfor %} -
IDTitleWhen submittedReason for failureFailure metadata
{{ media_entry.id }}{{ media_entry.title }}{{ media_entry.created.strftime("%F %R") }}{{ media_entry.get_fail_exception().general_message }}{{ media_entry.fail_metadata }}  
-{% else %} -

{% trans %}No failed entries!{% endtrans %}

-{% endif %} - -

{% trans %}Your last 10 successful uploads{% endtrans %}

-{% if processed_entries.count() %} - - - - - - - - {% for entry in processed_entries %} - - - - - - {% endfor %} -
IDTitleSubmitted
{{ entry.id }}{{ entry.title }}{{ entry.created.strftime("%F %R") }}
-{% else %} -

{% trans %}No processed entries, yet!{% endtrans %}

-{% endif %} {% endblock %} diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py index 88e077d4..50e5c3a4 100644 --- a/mediagoblin/user_pages/views.py +++ b/mediagoblin/user_pages/views.py @@ -671,6 +671,9 @@ def processing_panel(request): state = u'processed').\ order_by(MediaEntry.created.desc()).\ limit(10) + + entries = (MediaEntry.query.filter_by(uploader=user.id) + .order_by(MediaEntry.created.desc())) # Render to response return render_to_response( @@ -679,7 +682,8 @@ def processing_panel(request): {'user': user, 'processing_entries': processing_entries, 'failed_entries': failed_entries, - 'processed_entries': processed_entries}) + 'processed_entries': processed_entries, + 'entries': entries}) @allow_reporting @get_user_media_entry