work on lists

This commit is contained in:
bkfox
2015-10-13 17:52:59 +02:00
parent c69ef73a94
commit 474a33cfa5
9 changed files with 105 additions and 27 deletions

View File

@ -81,8 +81,8 @@ a:hover {
}
.page {
width: 100%;
padding: 1.5em 0em;
width: calc(100% - 0.4em);
padding: 1.5em 0.2em;
background-color: rgba(255, 255, 255, 0.8);
}
@ -92,11 +92,20 @@ a:hover {
}
main .post_list {
background-color: #F2F2F2;
.post_list {
padding: 0.1em;
border: 1px #818181 dotted;
}
.post_list.embed + nav {
text-align: right;
}
.post_list:not(.embed) + nav {
text-align: center;
}
main .post_list .post_item {
min-height: 64px;
padding: 0.2em;

View File

@ -72,6 +72,7 @@ website.register (
'episode',
Episode,
sections = base_sections,
routes = base_routes,
)
urlpatterns = website.urls

View File

@ -7,6 +7,8 @@ from django.utils import timezone as tz
from django.utils.translation import ugettext as _, ugettext_lazy
import aircox_programs.models as programs
import aircox_cms.routes as routes
import aircox_cms.utils as utils
from aircox_cms.views import Sections
from website.models import *
@ -39,7 +41,11 @@ class EpisodesSection (Sections.Posts):
title = _('Episodes')
def get_object_list (self):
return Episode.objects.filter(related__program = self.object.related.pk)
return utils.filter_thread(Episode.objects, self.object)
def get_url (self):
return utils.get_url(self.website, routes.ThreadRoute, Episode,
{ 'thread_model': 'program', 'pk': self.object.pk})
class PreviousDiffusions (Sections.Posts):
title = _('Previous Diffusions')
@ -65,4 +71,3 @@ class PreviousDiffusions (Sections.Posts):
return episodes