Skip to content

Commit

Permalink
tutorial schedule templating
Browse files Browse the repository at this point in the history
  • Loading branch information
jtauber committed Jan 21, 2011
1 parent 0e77578 commit d075b4e
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 23 deletions.
2 changes: 1 addition & 1 deletion pycon_project/apps/schedule/views.py
Expand Up @@ -70,7 +70,7 @@ def schedule_tutorials(request):
"sessions": Session.objects.filter(slot=2).order_by("pk"),
}
},
"thrus": {
"thurs": {
"morning": {
"slot": Slot.objects.get(id=3),
"sessions": Session.objects.filter(slot=3).order_by("pk"),
Expand Down
15 changes: 15 additions & 0 deletions pycon_project/templates/schedule/_session.html
@@ -0,0 +1,15 @@
<div class="session">
<div class="title">
<a href="{% url schedule_session session.pk %}">{{ session.title }}</a>
</div>
<div class="metadata">
{{ session.get_audience_level_display }}
{{ session.get_session_type_display }}
by
{{ session.speaker }}
{% if session.additional_speakers.all %}
with
{{ session.additional_speakers.all|join:", " }}
{% endif %}
</div>
</div>
2 changes: 1 addition & 1 deletion pycon_project/templates/schedule/index.html
Expand Up @@ -10,7 +10,7 @@ <h1>Schedule</h1>
</div>

<ul>
<li><a href="{% url schedule_tutorials %}">Tutorial Schedule</a></li>
<li><a href="{% url schedule_list_talks %}">List of Accepted Talks and Panels</a></li>
<li><a href="{% url schedule_list_tutorials %}">List of Accepted Tutorials</a></li>
</ul>
{% endblock %}
2 changes: 1 addition & 1 deletion pycon_project/templates/schedule/list_talks.html
Expand Up @@ -15,7 +15,7 @@
{% block subnav %}
<a href="{% url schedule_list_talks %}">List of Accepted Talks and Panels</a>
|
<a href="{% url schedule_list_tutorials %}">List of Accepted Tutorials</a>
<a href="{% url schedule_tutorials %}">Tutorial Schedule</a>
{% endblock %}

{% block body %}
Expand Down
2 changes: 1 addition & 1 deletion pycon_project/templates/schedule/list_tutorials.html
Expand Up @@ -15,7 +15,7 @@
{% block subnav %}
<a href="{% url schedule_list_talks %}">List of Accepted Talks and Panels</a>
|
<a href="{% url schedule_list_tutorials %}">List of Accepted Tutorials</a>
<a href="{% url schedule_tutorials %}">Tutorial Schedule</a>
{% endblock %}

{% block body %}
Expand Down
43 changes: 25 additions & 18 deletions pycon_project/templates/schedule/session_detail.html
Expand Up @@ -2,23 +2,30 @@

{% load timezone_filters %}

{% block body %}
<h1>{{ session.title }}</h1>

<div class="session_types">{{ session.get_audience_level_display }} / {{ session.get_session_type_display }}</div>

<div class="speakers">
{% for speaker in session.speakers %}
<a href="{% url speaker_profile speaker.id %}">{{ speaker }}</a>
{% if not forloop.last %}, {% endif %}{% endfor %}
</div>
{% block subnav %}
<a href="{% url schedule_list_talks %}">List of Accepted Talks and Panels</a>
|
<a href="{% url schedule_tutorials %}">Tutorial Schedule</a>
{% endblock %}

{% if session.slot %}
<div class="slot">{{ session.slot.start|localtime:timezone|date:"F jS" }} {{ session.slot.start|localtime:timezone|date:"P" }} &ndash; {{ session.slot.end|localtime:timezone|date:"P" }}</div>
{% endif %}

<div class="description">{{ session.description }}</div>

<h3>Abstract</h3>
<div class="abstract">{{ session.abstract_html|safe }}</div>
{% block body %}
<h1>{{ session.title }}</h1>

<div class="session_types">{{ session.get_audience_level_display }} / {{ session.get_session_type_display }}</div>

<div class="speakers">
{% for speaker in session.speakers %}
<a href="{% url speaker_profile speaker.id %}">{{ speaker }}</a>
{% if not forloop.last %}, {% endif %}{% endfor %}
</div>

{% if session.slot %}
<div class="slot">{{ session.slot.start|localtime:timezone|date:"F jS" }} {{ session.slot.start|localtime:timezone|date:"P" }} &ndash; {{ session.slot.end|localtime:timezone|date:"P" }}</div>
{% endif %}

<div class="description">{{ session.description }}</div>

<h3>Abstract</h3>

<div class="abstract">{{ session.abstract_html|safe }}</div>
{% endblock %}
2 changes: 1 addition & 1 deletion pycon_project/templates/schedule/tmp_session_detail.html
Expand Up @@ -68,7 +68,7 @@
{% block subnav %}
<a href="{% url schedule_list_talks %}">List of Accepted Talks and Panels</a>
|
<a href="{% url schedule_list_tutorials %}">List of Accepted Tutorials</a>
<a href="{% url schedule_tutorials %}">Tutorial Schedule</a>
{% endblock %}

{% block body %}
Expand Down
51 changes: 51 additions & 0 deletions pycon_project/templates/schedule/tutorials.html
@@ -0,0 +1,51 @@
{% extends "schedule/base.html" %}

{% block extra_head %}
<style>
.session {
margin-top: 10px;
}
.title {
font-size: 14pt;
font-weight: bold;
}
</style>
{% endblock %}

{% block subnav %}
<a href="{% url schedule_list_talks %}">List of Accepted Talks and Panels</a>
{% endblock %}

{% block body %}
<h1>Tutorial Schedule</h1>

<h2>Wednesday, March 9th</h2>

<h3>Morning ({{ tutorials.wed.morning.slot.start|time }} &ndash; {{ tutorials.wed.morning.slot.end|time }})</h3>

{% for session in tutorials.wed.morning.sessions %}
{% include "schedule/_session.html" %}
{% endfor %}

<h3>Afternoon ({{ tutorials.wed.afternoon.slot.start|time }} &ndash; {{ tutorials.wed.afternoon.slot.end|time }})</h3>

{% for session in tutorials.wed.afternoon.sessions %}
{% include "schedule/_session.html" %}
{% endfor %}

<h2>Thursday, March 10th</h2>

<h3>Morning ({{ tutorials.thurs.morning.slot.start|time }} &ndash; {{ tutorials.thurs.morning.slot.end|time }})</h3>

{% for session in tutorials.thurs.morning.sessions %}
{% include "schedule/_session.html" %}
{% endfor %}

<h3>Afternoon ({{ tutorials.thurs.afternoon.slot.start|time }} &ndash; {{ tutorials.thurs.afternoon.slot.end|time }})</h3>

{% for session in tutorials.thurs.afternoon.sessions %}
{% include "schedule/_session.html" %}
{% endfor %}


{% endblock %}

0 comments on commit d075b4e

Please sign in to comment.