Merge lp:~cjohnston/summit/664879 into lp:summit

Proposed by Chris Johnston on 2011-05-15
Status: Merged
Approved by: Michael Hall on 2011-05-22
Approved revision: 110
Merged at revision: 115
Proposed branch: lp:~cjohnston/summit/664879
Merge into: lp:summit
Diff against target: 34 lines (+6/-1)
2 files modified
summit/schedule/templates/schedule/schedule.html (+1/-1)
summit/schedule/views.py (+5/-0)
To merge this branch: bzr merge lp:~cjohnston/summit/664879
Reviewer Review Type Date Requested Status
Summit Hackers 2011-05-15 Pending
Review via email: mp+61023@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'summit/schedule/templates/schedule/schedule.html'
2--- summit/schedule/templates/schedule/schedule.html 2011-04-13 20:55:16 +0000
3+++ summit/schedule/templates/schedule/schedule.html 2011-05-15 14:42:41 +0000
4@@ -112,7 +112,7 @@
5 {% if schedule.date %}
6 <div class="schedule-head">
7 <a href="{% url mobile %}"><img class="schedule-qrcode" src="/media/img/guidebook_50.png" /></a>
8- <span class="schedule-date">{{ schedule.date|strftime:"%A" }}</span>
9+ <span class="schedule-date"><a href="{% url summit.schedule.views.by_date summit.name previousday|date:"Y-m-d" %}">&lt;</a> {{ schedule.date|strftime:"%A" }} <a href="{% url summit.schedule.views.by_date summit.name nextday|date:"Y-m-d" %}">&gt;</a></span>
10 {% if schedule.crew %}
11 <span class="schedule-crew">Crew: {% for crew in schedule.crew %}<a href="https://launchpad.net/~{{crew.attendee}}">{{crew.attendee}}</a>{% if forloop.last %}{% else %}, {% endif %}{% endfor %}
12 </span>
13
14=== modified file 'summit/schedule/views.py'
15--- summit/schedule/views.py 2011-05-03 13:34:22 +0000
16+++ summit/schedule/views.py 2011-05-15 14:42:41 +0000
17@@ -106,12 +106,17 @@
18 if request.method == 'POST':
19 return schedule.save_change()
20 else:
21+ viewdate = datetime.datetime.strptime(date, "%Y-%m-%d")
22+ day = datetime.timedelta(days=1)
23+
24 context = {
25 'summit': summit,
26 'attendee': attendee,
27 'schedule': schedule,
28 'ical': '/%s.ical' % summit.name,
29 'autoreload': 'reload' in request.GET,
30+ 'nextday': viewdate + day,
31+ 'previousday': viewdate - day,
32 }
33 converted_date = summit.delocalize(datetime.datetime.strptime(date, "%Y-%m-%d"))
34 if Slot.objects.filter(summit=summit, start_utc__gte=converted_date, end_utc__lte=converted_date+datetime.timedelta(days=1)).count() > 0:

Subscribers

People subscribed via source and target branches