add overall conference schedule
This commit is contained in:
parent
4c194ed94c
commit
2a68242a54
3 changed files with 58 additions and 1 deletions
|
@ -2,7 +2,7 @@ from django.conf.urls.defaults import url, patterns
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = patterns("symposion.schedule.views",
|
urlpatterns = patterns("symposion.schedule.views",
|
||||||
url(r"^$", "schedule_detail", name="schedule_detail"),
|
url(r"^$", "schedule_conference", name="schedule_conference"),
|
||||||
url(r"^edit/$", "schedule_edit", name="schedule_edit"),
|
url(r"^edit/$", "schedule_edit", name="schedule_edit"),
|
||||||
url(r"^list/$", "schedule_list", name="schedule_list"),
|
url(r"^list/$", "schedule_list", name="schedule_list"),
|
||||||
url(r"^presentations.csv$", "schedule_list_csv", name="schedule_list_csv"),
|
url(r"^presentations.csv$", "schedule_list_csv", name="schedule_list_csv"),
|
||||||
|
|
|
@ -25,6 +25,25 @@ def fetch_schedule(slug):
|
||||||
return schedule
|
return schedule
|
||||||
|
|
||||||
|
|
||||||
|
def schedule_conference(request):
|
||||||
|
|
||||||
|
schedules = Schedule.objects.all()
|
||||||
|
|
||||||
|
sections = []
|
||||||
|
for schedule in schedules:
|
||||||
|
days_qs = Day.objects.filter(schedule=schedule)
|
||||||
|
days = [TimeTable(day) for day in days_qs]
|
||||||
|
sections.append({
|
||||||
|
"schedule": schedule,
|
||||||
|
"days": days,
|
||||||
|
})
|
||||||
|
|
||||||
|
ctx = {
|
||||||
|
"sections": sections,
|
||||||
|
}
|
||||||
|
return render(request, "schedule/schedule_conference.html", ctx)
|
||||||
|
|
||||||
|
|
||||||
def schedule_detail(request, slug=None):
|
def schedule_detail(request, slug=None):
|
||||||
schedule = fetch_schedule(slug)
|
schedule = fetch_schedule(slug)
|
||||||
|
|
||||||
|
|
38
symposion/templates/schedule/schedule_conference.html
Normal file
38
symposion/templates/schedule/schedule_conference.html
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{% extends "site_base.html" %}
|
||||||
|
|
||||||
|
{% load i18n %}
|
||||||
|
{% load bootstrap_tags %}
|
||||||
|
{% load boxes_tags %}
|
||||||
|
{% load cache %}
|
||||||
|
|
||||||
|
{% block head_title %}Conference Schedule{% endblock %}
|
||||||
|
|
||||||
|
{% block body_class %}full{% endblock %}
|
||||||
|
|
||||||
|
{% block right %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block body_outer %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="span12">
|
||||||
|
<div class="page-head">
|
||||||
|
<h1>Conference Schedule</h1>
|
||||||
|
{% block breadcrumbs %}{% endblock %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="span12">
|
||||||
|
{% box "schedule_top" %}
|
||||||
|
|
||||||
|
{% for section in sections %}
|
||||||
|
{% cache 600 "schedule-table" section.schedule.section %}
|
||||||
|
{% for timetable in section.days %}
|
||||||
|
<h3>{{ timetable.day.date }}</h3>
|
||||||
|
{% include "schedule/_grid.html" %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endcache %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% box "schedule_bottom" %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
Loading…
Reference in a new issue