Skip declined events in the agenda preview on iTip invitation (Bifrost#T81078)

... and style pending events with italic and lighter font.
This commit is contained in:
Aleksander Machniak 2018-08-27 13:29:22 +02:00
parent f10b1a3c32
commit 9f12c9aa65
3 changed files with 22 additions and 5 deletions

View file

@ -2662,11 +2662,16 @@ class calendar extends rcube_plugin
$before = $after = array();
foreach ($events as $event) {
// TODO: skip events with free_busy == 'free' ?
if ($event['uid'] == $data['uid'] || $event['end'] < $day_start || $event['start'] > $day_end)
if ($event['uid'] == $data['uid']
|| $event['end'] < $day_start || $event['start'] > $day_end
|| $event['status'] == 'CANCELLED'
|| (!empty($event['className']) && strpos($event['className'], 'declined') !== false)
) {
continue;
else if ($event['start'] < $event_start)
}
if ($event['start'] < $event_start)
$before[] = $this->mail_agenda_event_row($event);
else
$after[] = $this->mail_agenda_event_row($event);
@ -2834,7 +2839,7 @@ class calendar extends rcube_plugin
$this->rc->format_date($event['start'], $this->rc->config->get('time_format')) . ' - ' .
$this->rc->format_date($event['end'], $this->rc->config->get('time_format'));
return html::div(rtrim('event-row ' . $class),
return html::div(rtrim('event-row ' . ($class ?: $event['className'])),
html::span('event-date', $time) .
html::span('event-title', rcube::Q($event['title']))
);

View file

@ -2238,6 +2238,11 @@ div.calendar-invitebox .calendar-agenda-preview .event-row.no-event {
font-style: italic;
}
div.calendar-invitebox .calendar-agenda-preview .event-row.fc-invitation-needs-action {
font-style: italic;
opacity: .5;
}
div.calendar-invitebox .calendar-agenda-preview .event-date {
display: inline-block;
min-width: 8em;

View file

@ -137,9 +137,16 @@ fieldset.categories .input-group {
}
&.no-event {
color: @color-black-shade-text;
font-style: italic;
}
&.fc-invitation-needs-action {
color: @color-black-shade-text;
.event-title {
font-style: italic;
}
}
}
.event-title {