From 75972f0afac1bec998302e1563929d69569f166f Mon Sep 17 00:00:00 2001 From: Boris Bobrov Date: Sun, 17 Aug 2014 00:43:21 +0300 Subject: [PATCH] some fixes to the panel looks --- .../mediagoblin/user_pages/processing_panel.html | 10 +++++++--- mediagoblin/user_pages/views.py | 11 +++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html b/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html index 88eef827..96786937 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html +++ b/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html @@ -17,6 +17,8 @@ #} {% extends "mediagoblin/base.html" %} +{% from "mediagoblin/utils/pagination.html" import render_pagination %} + {% block title -%} {% trans %}Media processing panel{% endtrans %} — {{ super() }} {%- endblock %} @@ -42,12 +44,13 @@ Show:

{% if entries.count() %} + {{ render_pagination(request, pagination) }} - + - - + + {% for media_entry in entries %} @@ -85,6 +88,7 @@ Show: {% endfor %}
ThumbnailThumbnail TitleWhen submittedTranscoding progressWhen submittedTranscoding progress
+ {{ render_pagination(request, pagination) }} {% else %}

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

{% endif %} diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py index 97f0bac1..c4f86b29 100644 --- a/mediagoblin/user_pages/views.py +++ b/mediagoblin/user_pages/views.py @@ -637,8 +637,10 @@ def collection_atom_feed(request): return feed.get_response() +@active_user_from_url +@uses_pagination @require_active_login -def processing_panel(request): +def processing_panel(request, page, url_user): """ Show to the user what media is still in conversion/processing... and what failed, and why! @@ -665,12 +667,17 @@ def processing_panel(request): # show all entries pass + pagination = Pagination(page, entries) + pagination.per_page = 30 + entries_on_a_page = pagination() + # Render to response return render_to_response( request, 'mediagoblin/user_pages/processing_panel.html', {'user': user, - 'entries': entries}) + 'entries': entries_on_a_page, + 'pagination': pagination}) @allow_reporting @get_user_media_entry -- 2.25.1