Skip to content

Commit

Permalink
Fix for bug 676
Browse files Browse the repository at this point in the history
 - Legacy-Id: 3181
  • Loading branch information
adamroach committed Jun 27, 2011
1 parent 95898de commit ec15165
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
4 changes: 3 additions & 1 deletion ietf/meeting/views.py
Expand Up @@ -339,6 +339,7 @@ def ical_agenda(request, num=None):
q = request.META.get('QUERY_STRING','') or ""
filter = q.lower().split(',');
include = set(filter)
now = datetime.datetime.utcnow()

for slot in timeslots:
for session in slot.sessions():
Expand All @@ -347,5 +348,6 @@ def ical_agenda(request, num=None):

return HttpResponse(render_to_string("meeting/agenda.ics",
{"filter":set(filter), "timeslots":timeslots, "update":update, "meeting":meeting, "venue":venue, "ads":ads,
"plenaryw_agenda":plenaryw_agenda, "plenaryt_agenda":plenaryt_agenda, },
"plenaryw_agenda":plenaryw_agenda, "plenaryt_agenda":plenaryt_agenda,
"now":now},
RequestContext(request)), mimetype="text/calendar")
13 changes: 2 additions & 11 deletions ietf/templates/meeting/agenda.ics
@@ -1,15 +1,6 @@
{% load humanize %}{% autoescape off %}{% load ietf_filters %}BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:{% now "T" %}
BEGIN:STANDARD
TZOFFSETFROM:{% now "O" %}
TZOFFSETTO:{% now "O" %}
TZNAME:{% now "T" %}
DTSTART:19700101T000000
END:STANDARD
END:VTIMEZONE
{% if meeting.time_zone %}BEGIN:VTIMEZONE
TZID:{{meeting.city}}
BEGIN:STANDARD
Expand All @@ -27,7 +18,7 @@ SUMMARY:{{slot.break_info.name}}
CLASS:PUBLIC
DTSTART{% if meeting.time_zone %};TZID="{{meeting.city}}"{%endif%}:{{ slot.meeting_date|date:"Ymd" }}T{{slot.break_info.time_desc|slice:":4"}}00
DTEND{% if meeting.time_zone %};TZID="{{meeting.city}}"{%endif%}:{{ slot.meeting_date|date:"Ymd" }}T{{slot.break_info.time_desc|slice:"5:9"}}00
DTSTAMP;TZID="{% now "T" %}":{% now "Ymd" %}T{% now "Gis" %}
DTSTAMP:{{ now|date:"Ymd" }}T{{ now|date:"His" }}Z
END:VEVENT
{% endif %}{% endifchanged %}{% for session in slot.sessions %}{%for f in filter%}{%ifequal f session.acronym%}BEGIN:VEVENT
UID:ietf-{{meeting.num}}-{{session.acronym}}-{{session.ordinality}}
Expand All @@ -37,7 +28,7 @@ STATUS:TENTATIVE
CLASS:PUBLIC
DTSTART{% if meeting.time_zone %};TZID="{{meeting.city}}"{%endif%}:{{ slot.meeting_date|date:"Ymd" }}T{{slot.time_desc|slice:":4"}}00
DTEND{% if meeting.time_zone %};TZID="{{meeting.city}}"{%endif%}:{{ slot.meeting_date|date:"Ymd" }}T{{slot.time_desc|slice:"5:9"}}00
DTSTAMP;TZID="{% now "T" %}":{% now "Ymd" %}T{% now "Gis" %}
DTSTAMP:{{ now|date:"Ymd" }}T{{ now|date:"His" }}Z
{% if session.description %}DESCRIPTION:
{{ session.description|escapejs }}
{% endif %}END:VEVENT
Expand Down

0 comments on commit ec15165

Please sign in to comment.