diff --git a/include/event.php b/include/event.php index 88e559a7f3..229aa8cd46 100644 --- a/include/event.php +++ b/include/event.php @@ -959,9 +959,11 @@ function format_event_item($item) { // Format the event location. $evloc = event_location2array($item['event-location']); - $location = array( - 'name' => prepare_text($evloc['name']) - ); + $location = array(); + + if (isset($evloc['name'])) { + $location['name'] = prepare_text($evloc['name']); + } // Construct the map HTML. if (isset($evloc['address'])) { $location['map'] = '
' . generate_named_map($evloc['address']) . '
'; diff --git a/view/templates/event_stream_item.tpl b/view/templates/event_stream_item.tpl index 16d122167d..15975c5d51 100644 --- a/view/templates/event_stream_item.tpl +++ b/view/templates/event_stream_item.tpl @@ -4,23 +4,25 @@
{{$dtstart_label}}  - {{$dtstart_dt}} + {{$dtstart_dt}}
{{if $finish}}
- {{$dtstart_label}}  - {{$dtend_dt}} + {{$dtend_label}}  + {{$dtend_dt}}
{{/if}} + {{if $description}}
{{$description}}
+ {{/if}} {{if $location}}
{{$location_label}}  {{if $location.name}} - {{$location.name}} + {{$location.name}} {{/if}} {{if $location.map}}{{$location.map}}{{/if}} diff --git a/view/theme/frio/templates/event_stream_item.tpl b/view/theme/frio/templates/event_stream_item.tpl index 79a7739df2..87c2e70cad 100644 --- a/view/theme/frio/templates/event_stream_item.tpl +++ b/view/theme/frio/templates/event_stream_item.tpl @@ -2,7 +2,9 @@
+ {{* The part with the event data (start, end, location, title *}}
+ {{* On the left we will present the date in short form (e.g. Oct 15) *}}
{{$month_short}} @@ -11,6 +13,7 @@
{{$title}}
+ {{* If there is a map, we insert a button for showing/hiding the map *}} {{if $location.map}}{{/if}}
@@ -35,6 +38,7 @@
+ {{* The content of the event description *}} {{if $description}}
{{$description}}