1.1 --- a/css/event-aggregator-print.css Mon May 02 00:30:37 2011 +0200
1.2 +++ b/css/event-aggregator-print.css Wed May 04 00:56:24 2011 +0200
1.3 @@ -78,6 +78,10 @@
1.4 list-style-position: inside;
1.5 }
1.6
1.7 +.event-map-container > ol > li.event-map-unpositioned {
1.8 + list-style-type: none; /* unpositioned events do not refer to a marker */
1.9 +}
1.10 +
1.11 .event-map-container > ol > li:before {
1.12 vertical-align: top;
1.13 }
1.14 @@ -100,6 +104,7 @@
1.15 vertical-align: top;
1.16 }
1.17
1.18 +.event-map-unpositioned .event-map-details,
1.19 div.event-map-label .event-map-details {
1.20 position: static !important;
1.21 display: block;
1.22 @@ -112,7 +117,7 @@
1.23 visibility: hidden;
1.24 }
1.25
1.26 -.event-map-description {
1.27 +.event-map-location {
1.28 visibility: visible;
1.29 background-color: transparent;
1.30 }
2.1 --- a/css/event-aggregator.css Mon May 02 00:30:37 2011 +0200
2.2 +++ b/css/event-aggregator.css Wed May 04 00:56:24 2011 +0200
2.3 @@ -439,7 +439,7 @@
2.4 background-color: #555;
2.5 }
2.6
2.7 -.event-map-description {
2.8 +.event-map-shadow .event-map-location {
2.9 position: relative;
2.10 top: -8px;
2.11 left: -8px;
2.12 @@ -447,18 +447,18 @@
2.13 background-color: #fff;
2.14 }
2.15
2.16 -.event-map-description p {
2.17 +.event-map-location p {
2.18 font-weight: bold;
2.19 font-size: larger;
2.20 text-align: center;
2.21 }
2.22
2.23 -ul.event-map-description-events {
2.24 +ul.event-map-location-events {
2.25 list-style-type: none;
2.26 padding: 0.25em;
2.27 }
2.28
2.29 -ul.event-map-description-events li {
2.30 +ul.event-map-location-events li {
2.31 text-align: left;
2.32 padding: 0.25em 0 0.25em 0;
2.33 }
3.1 --- a/macros/EventAggregator.py Mon May 02 00:30:37 2011 +0200
3.2 +++ b/macros/EventAggregator.py Wed May 04 00:56:24 2011 +0200
3.3 @@ -1179,8 +1179,14 @@
3.4 fmt = page.formatter
3.5 request = page.request
3.6
3.7 + # Sort the events by date.
3.8 +
3.9 + events.sort()
3.10 +
3.11 + # Write out a self-contained list of events.
3.12 +
3.13 output = []
3.14 - output.append(fmt.bullet_list(on=1, attr={"class" : "event-map-description-events"}))
3.15 + output.append(fmt.bullet_list(on=1, attr={"class" : "event-map-location-events"}))
3.16
3.17 for event in events:
3.18
3.19 @@ -1571,9 +1577,14 @@
3.20 output.append(fmt.image(map_image_url))
3.21 output.append(fmt.number_list(on=1))
3.22
3.23 + unpositioned_events = []
3.24 + event_locations = events_by_location.keys()
3.25 + event_locations.sort()
3.26 +
3.27 # Show the events in the map.
3.28
3.29 - for location, events in events_by_location.items():
3.30 + for location in event_locations:
3.31 + events = events_by_location[location]
3.32
3.33 # Look up the position of a location using the locations page.
3.34
3.35 @@ -1592,6 +1603,8 @@
3.36 longitude < map_bottom_left_longitude or \
3.37 latitude > map_top_right_latitude or \
3.38 longitude > map_top_right_longitude:
3.39 +
3.40 + unpositioned_events += events
3.41 continue
3.42
3.43 # Get the position and dimensions of the map marker.
3.44 @@ -1621,7 +1634,7 @@
3.45 marker_x, marker_y, map_x_scale, map_y_scale))
3.46 output.append(fmt.div(on=1, css_class="event-map-details"))
3.47 output.append(fmt.div(on=1, css_class="event-map-shadow"))
3.48 - output.append(fmt.div(on=1, css_class="event-map-description"))
3.49 + output.append(fmt.div(on=1, css_class="event-map-location"))
3.50
3.51 output.append(fmt.paragraph(on=1))
3.52 output.append(fmt.text(location))
3.53 @@ -1635,6 +1648,22 @@
3.54 output.append(fmt.div(on=0))
3.55 output.append(fmt.listitem(on=0))
3.56
3.57 + # Write unpositioned events.
3.58 +
3.59 + output.append(fmt.listitem(on=1, css_class="event-map-unpositioned"))
3.60 + output.append(fmt.div(on=1, css_class="event-map-details"))
3.61 + output.append(fmt.div(on=1, css_class="event-map-location"))
3.62 +
3.63 + output.append(fmt.paragraph(on=1))
3.64 + output.append(fmt.text(_("Events not shown on the map")))
3.65 + output.append(fmt.paragraph(on=0))
3.66 +
3.67 + output.append(view.writeMapEventSummaries(unpositioned_events))
3.68 +
3.69 + output.append(fmt.div(on=0))
3.70 + output.append(fmt.div(on=0))
3.71 + output.append(fmt.listitem(on=0))
3.72 +
3.73 # End of map view output.
3.74
3.75 output.append(fmt.number_list(on=0))