fnp
/
audio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7caeba9
)
look fixes
author
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Mon, 8 Aug 2011 12:03:49 +0000
(14:03 +0200)
committer
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Mon, 8 Aug 2011 12:03:49 +0000
(14:03 +0200)
apps/archive/static/style.css
patch
|
blob
|
history
apps/archive/templates/archive/list_publishing.html
patch
|
blob
|
history
apps/archive/templates/base.html
patch
|
blob
|
history
apps/archive/views.py
patch
|
blob
|
history
diff --git
a/apps/archive/static/style.css
b/apps/archive/static/style.css
index
88e075a
..
03d5947
100755
(executable)
--- a/
apps/archive/static/style.css
+++ b/
apps/archive/static/style.css
@@
-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 {
diff --git
a/apps/archive/templates/archive/list_publishing.html
b/apps/archive/templates/archive/list_publishing.html
index
1c220d8
..
501b94c
100755
(executable)
--- a/
apps/archive/templates/archive/list_publishing.html
+++ b/
apps/archive/templates/archive/list_publishing.html
@@
-9,7
+9,7
@@
{% block file-list-wrapper %}
{% block file-list-wrapper %}
- {% for k, objects in
objects_by_status.item
s %}
+ {% for k, objects in
status_object
s %}
<h2>{{ k.1 }}</h2>
<ul>
{% for file in objects %}
<h2>{{ k.1 }}</h2>
<ul>
{% for file in objects %}
diff --git
a/apps/archive/templates/base.html
b/apps/archive/templates/base.html
index
c6b7ee6
..
5e0053f
100755
(executable)
--- a/
apps/archive/templates/base.html
+++ b/
apps/archive/templates/base.html
@@
-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>
diff --git
a/apps/archive/views.py
b/apps/archive/views.py
index
41c71ea
..
8841dbb
100644
(file)
--- a/
apps/archive/views.py
+++ b/
apps/archive/views.py
@@
-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())