Merge pull request #1693 from rabuzarus/events-reminder

use title in events-reminder
This commit is contained in:
fabrixxm 2015-06-25 15:06:55 +02:00
commit d2a593b4a0
2 changed files with 10 additions and 11 deletions

View file

@ -1858,15 +1858,14 @@ if(! function_exists('get_events')) {
$skip = 0; $skip = 0;
foreach($r as &$rr) { foreach($r as &$rr) {
if($rr['adjust']) $title = strip_tags(html_entity_decode(bbcode($rr['summary']),ENT_QUOTES,'UTF-8'));
$md = datetime_convert('UTC',$a->timezone,$rr['start'],'Y/m');
else
$md = datetime_convert('UTC','UTC',$rr['start'],'Y/m');
$md .= "/#link-".$rr['id'];
$title = substr(strip_tags(bbcode($rr['desc'])),0,32) . '... '; if(strlen($title) > 35)
if(! $title) $title = substr($title,0,32) . '... ';
$title = t('[No description]');
$description = substr(strip_tags(bbcode($rr['desc'])),0,32) . '... ';
if(! $description)
$description = t('[No description]');
$strt = datetime_convert('UTC',$rr['convert'] ? $a->timezone : 'UTC',$rr['start']); $strt = datetime_convert('UTC',$rr['convert'] ? $a->timezone : 'UTC',$rr['start']);
@ -1876,9 +1875,9 @@ if(! function_exists('get_events')) {
} }
$today = ((substr($strt,0,10) === datetime_convert('UTC',$a->timezone,'now','Y-m-d')) ? true : false); $today = ((substr($strt,0,10) === datetime_convert('UTC',$a->timezone,'now','Y-m-d')) ? true : false);
$rr['link'] = $md;
$rr['title'] = $title; $rr['title'] = $title;
$rr['description'] = $desciption;
$rr['date'] = day_translate(datetime_convert('UTC', $rr['adjust'] ? $a->timezone : 'UTC', $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : ''); $rr['date'] = day_translate(datetime_convert('UTC', $rr['adjust'] ? $a->timezone : 'UTC', $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : '');
$rr['startime'] = $strt; $rr['startime'] = $strt;
$rr['today'] = $today; $rr['today'] = $today;

View file

@ -4,7 +4,7 @@
<div id="event-wrapper" style="display: none;" ><div id="event-title">{{$event_title}}</div> <div id="event-wrapper" style="display: none;" ><div id="event-title">{{$event_title}}</div>
<div id="event-title-end"></div> <div id="event-title-end"></div>
{{foreach $events as $event}} {{foreach $events as $event}}
<div class="event-list" id="event-{{$event.id}}"> <a href="events/{{$event.link}}">{{$event.title}}</a> {{$event.date}} </div> <div class="event-list" id="event-{{$event.id}}"> <a class="cboxElement" href="events/?id={{$event.id}}">{{$event.title}}</a> - {{$event.date}} </div>
{{/foreach}} {{/foreach}}
</div> </div>
{{/if}} {{/if}}