Merge "Add project and agenda URLs to the bottom of calendar descriptions"

This commit is contained in:
Jenkins 2015-06-17 10:00:05 +00:00 committed by Gerrit Code Review
commit 746a15bcde
2 changed files with 17 additions and 0 deletions

View File

@ -190,3 +190,11 @@ will be import into Python as a dictionary.
::
agenda_url: https://wiki.openstack.org/wiki/Meetings/Nova
* An extra property containing the project URL is saved in
``project_url`` and can be accessed in the template file as
``meeting.extras.project_url``.
::
project_url: https://wiki.openstack.org/wiki/Nova

View File

@ -51,6 +51,15 @@ class Yaml2IcalCalendar(icalendar.Calendar):
ical_descript = "\n".join((project_descript,
chair_descript,
descript_descript))
# Add URLs, if present, to the description
if 'agenda_url' in meeting.extras:
ical_descript = "\n".join((ical_descript,
"Agenda URL: %s" %
(meeting.extras['agenda_url'])))
if 'project_url' in meeting.extras:
ical_descript = "\n".join((ical_descript,
"Project URL: %s" %
(meeting.extras['project_url'])))
event.add('description', ical_descript)
# get starting date