1.1 --- a/actions/EventAggregatorNewEvent.py Sun Aug 07 01:23:44 2011 +0200
1.2 +++ b/actions/EventAggregatorNewEvent.py Sun Aug 07 14:44:42 2011 +0200
1.3 @@ -146,6 +146,10 @@
1.4 "description_default" : escattr(form.get("description", [""])[0]),
1.5 "location_label" : escape(_("Event location")),
1.6 "location_default" : escattr(form.get("location", [""])[0]),
1.7 + "latitude_label" : escape(_("Latitude")),
1.8 + "latitude_default" : escattr(form.get("latitude", [""])[0]),
1.9 + "longitude_label" : escape(_("Longitude")),
1.10 + "longitude_default" : escattr(form.get("longitude", [""])[0]),
1.11 "link_label" : escape(_("Event URL")),
1.12 "link_default" : escattr(form.get("link", [""])[0]),
1.13
1.14 @@ -346,6 +350,18 @@
1.15 </td>
1.16 </tr>
1.17 <tr>
1.18 + <td class="label"><label>%(latitude_label)s</label></td>
1.19 + <td colspan="2">
1.20 + <input name="latitude" type="text" size="40" value="%(latitude_default)s" />
1.21 + </td>
1.22 + </tr>
1.23 + <tr>
1.24 + <td class="label"><label>%(longitude_label)s</label></td>
1.25 + <td colspan="2">
1.26 + <input name="longitude" type="text" size="40" value="%(longitude_default)s" />
1.27 + </td>
1.28 + </tr>
1.29 + <tr>
1.30 <td class="label"><label>%(link_label)s</label></td>
1.31 <td colspan="2">
1.32 <input name="link" type="text" size="40" value="%(link_default)s" />
1.33 @@ -473,6 +489,8 @@
1.34 category_pagenames = form.get("category", [])
1.35 description = form.get("description", [None])[0]
1.36 location = form.get("location", [None])[0]
1.37 + latitude = form.get("latitude", [None])[0]
1.38 + longitude = form.get("longitude", [None])[0]
1.39 link = form.get("link", [None])[0]
1.40 topics = form.get("topics", [])
1.41
1.42 @@ -541,6 +559,9 @@
1.43 "topics" : [topic for topic in topics if topic]
1.44 }
1.45
1.46 + if latitude and longitude:
1.47 + event_details["geo"] = latitude, longitude
1.48 +
1.49 # Copy the template.
1.50
1.51 template_page = PageEditor(request, template)