forked from rc/aircox
work on lists
This commit is contained in:
@ -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;
|
||||
|
@ -72,6 +72,7 @@ website.register (
|
||||
'episode',
|
||||
Episode,
|
||||
sections = base_sections,
|
||||
routes = base_routes,
|
||||
)
|
||||
|
||||
urlpatterns = website.urls
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user