1
0
Fork 0

fix #3812 - some brocken parts in the display of events (default template)

This commit is contained in:
rabuzarus 2017-10-19 14:16:39 +02:00
parent 704aef67fb
commit 184bfc722d
3 changed files with 15 additions and 7 deletions

View file

@ -959,9 +959,11 @@ function format_event_item($item) {
// Format the event location. // Format the event location.
$evloc = event_location2array($item['event-location']); $evloc = event_location2array($item['event-location']);
$location = array( $location = array();
'name' => prepare_text($evloc['name'])
); if (isset($evloc['name'])) {
$location['name'] = prepare_text($evloc['name']);
}
// Construct the map HTML. // Construct the map HTML.
if (isset($evloc['address'])) { if (isset($evloc['address'])) {
$location['map'] = '<div class="map">' . generate_named_map($evloc['address']) . '</div>'; $location['map'] = '<div class="map">' . generate_named_map($evloc['address']) . '</div>';

View file

@ -4,23 +4,25 @@
<div class="event-start"> <div class="event-start">
<span class="event-label">{{$dtstart_label}}</span>&nbsp; <span class="event-label">{{$dtstart_label}}</span>&nbsp;
<span class="dtstart" title="$dtstart_title">{{$dtstart_dt}}</span> <span class="dtstart" title="{{$dtstart_title}}">{{$dtstart_dt}}</span>
</div> </div>
{{if $finish}} {{if $finish}}
<div class="event-end"> <div class="event-end">
<span class="event-label">{{$dtstart_label}}</span>&nbsp; <span class="event-label">{{$dtend_label}}</span>&nbsp;
<span class="dend" title="$dtend_title">{{$dtend_dt}}</span> <span class="dtend" title="{{$dtend_title}}">{{$dtend_dt}}</span>
</div> </div>
{{/if}} {{/if}}
{{if $description}}
<div class="description event-description">{{$description}}</div> <div class="description event-description">{{$description}}</div>
{{/if}}
{{if $location}} {{if $location}}
<div class="event-location"> <div class="event-location">
<span class="event-label">{{$location_label}}</span>&nbsp; <span class="event-label">{{$location_label}}</span>&nbsp;
{{if $location.name}} {{if $location.name}}
<span class="event-location">{{$location.name}}</span> <span class="location">{{$location.name}}</span>
{{/if}} {{/if}}
{{if $location.map}}{{$location.map}}{{/if}} {{if $location.map}}{{$location.map}}{{/if}}

View file

@ -2,7 +2,9 @@
<div class="vevent event-card"> <div class="vevent event-card">
<div class="vevent-header"> <div class="vevent-header">
<div class="event-card-details"> <div class="event-card-details">
{{* The part with the event data (start, end, location, title *}}
<div class="event-card-header"> <div class="event-card-header">
{{* On the left we will present the date in short form (e.g. Oct 15) *}}
<div class="event-card-left-date"> <div class="event-card-left-date">
<span class="event-date-wrapper medium"> <span class="event-date-wrapper medium">
<span class="event-card-short-month">{{$month_short}}</span> <span class="event-card-short-month">{{$month_short}}</span>
@ -11,6 +13,7 @@
</div> </div>
<div class="event-card-content media-body"> <div class="event-card-content media-body">
<div class="event-title event-card-title summary event-summary">{{$title}}</div> <div class="event-title event-card-title summary event-summary">{{$title}}</div>
{{* If there is a map, we insert a button for showing/hiding the map *}}
{{if $location.map}}<button id="event-map-btn-{{$id}}" class="event-map-btn btn-link fakelink nav nav-pills preferences" data-map-id="event-location-map-{{$id}}" data-show-label="{{$show_map_label}}" data-hide-label="{{$hide_map_label}}">{{$map_btn_label}}</button>{{/if}} {{if $location.map}}<button id="event-map-btn-{{$id}}" class="event-map-btn btn-link fakelink nav nav-pills preferences" data-map-id="event-location-map-{{$id}}" data-show-label="{{$show_map_label}}" data-hide-label="{{$hide_map_label}}">{{$map_btn_label}}</button>{{/if}}
<div class="event-property"> <div class="event-property">
<span class="event-date"> <span class="event-date">
@ -35,6 +38,7 @@
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
{{* The content of the event description *}}
{{if $description}} {{if $description}}
<div class="description event-description"> <div class="description event-description">
{{$description}} {{$description}}