look fixes
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Mon, 8 Aug 2011 12:03:49 +0000 (14:03 +0200)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Mon, 8 Aug 2011 12:03:49 +0000 (14:03 +0200)
apps/archive/static/style.css
apps/archive/templates/archive/list_publishing.html
apps/archive/templates/base.html
apps/archive/views.py

index 88e075a..03d5947 100755 (executable)
@@ -60,7 +60,6 @@ a {
 
 
 .list-published-tag, .list-publishing-tag {
 
 
 .list-published-tag, .list-publishing-tag {
-    padding-left: 2em;
     font-size: .8em;
 }
 .list-publishing-tag {
     font-size: .8em;
 }
 .list-publishing-tag {
index 1c220d8..501b94c 100755 (executable)
@@ -9,7 +9,7 @@
 
 
 {% block file-list-wrapper %}
 
 
 {% block file-list-wrapper %}
-    {% for k, objects in objects_by_status.items %}
+    {% for k, objects in status_objects %}
         <h2>{{ k.1 }}</h2>
         <ul>
             {% for file in objects %}
         <h2>{{ k.1 }}</h2>
         <ul>
             {% for file in objects %}
index c6b7ee6..5e0053f 100755 (executable)
@@ -3,7 +3,7 @@
 <html>
 <head>
     <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
 <html>
 <head>
     <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
-    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}style.css" />
+    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}style.css?20110808" />
     <title>{% trans "Audiobook repository" %}</title>
 </head>
 <body>
     <title>{% trans "Audiobook repository" %}</title>
 </head>
 <body>
index 41c71ea..8841dbb 100644 (file)
@@ -11,7 +11,6 @@ from django.core.urlresolvers import reverse
 from django.db.models import Q, Max
 from django.http import Http404
 from django.shortcuts import render, redirect, get_object_or_404
 from django.db.models import Q, Max
 from django.http import Http404
 from django.shortcuts import render, redirect, get_object_or_404
-from django.utils.datastructures import SortedDict
 from django.views.decorators.http import require_POST
 
 import mutagen
 from django.views.decorators.http import require_POST
 
 import mutagen
@@ -164,7 +163,7 @@ def list_publishing(request):
     division = 'publishing'
 
     objects = models.Audiobook.objects.exclude(mp3_status=None, ogg_status=None)
     division = 'publishing'
 
     objects = models.Audiobook.objects.exclude(mp3_status=None, ogg_status=None)
-    objects_by_status = SortedDict()
+    objects_by_status = {}
     for o in objects:
         if o.mp3_status:
             k = o.mp3_status, o.get_mp3_status_display()
     for o in objects:
         if o.mp3_status:
             k = o.mp3_status, o.get_mp3_status_display()
@@ -172,6 +171,7 @@ def list_publishing(request):
         if o.ogg_status and o.ogg_status != o.mp3_status:
             k = o.ogg_status, o.get_ogg_status_display()
             objects_by_status.setdefault(k, []).append(o)
         if o.ogg_status and o.ogg_status != o.mp3_status:
             k = o.ogg_status, o.get_ogg_status_display()
             objects_by_status.setdefault(k, []).append(o)
+    status_objects = sorted(objects_by_status.items(), reverse=True)
 
     return render(request, "archive/list_publishing.html", locals())
 
 
     return render(request, "archive/list_publishing.html", locals())