mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-05 05:29:13 +01:00
further improve meeting request display: show added, removed or status-changed participants
also add exceptions to recuring events
This commit is contained in:
parent
e402459241
commit
17077fe581
@ -699,7 +699,7 @@ class calendar_rrule implements Iterator
|
|||||||
case self::RDATE:
|
case self::RDATE:
|
||||||
$str_extra = array_map(static function (DateTime $rdate)
|
$str_extra = array_map(static function (DateTime $rdate)
|
||||||
{
|
{
|
||||||
return Api\DateTime::server2user($rdate, '');
|
return str_replace(',', '', Api\DateTime::server2user($rdate, ''));
|
||||||
}, $this->rdates);
|
}, $this->rdates);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -719,6 +719,13 @@ class calendar_rrule implements Iterator
|
|||||||
{
|
{
|
||||||
$str_extra[] = $this->time->getTimezone()->getName();
|
$str_extra[] = $this->time->getTimezone()->getName();
|
||||||
}
|
}
|
||||||
|
if ($this->exceptions_objs)
|
||||||
|
{
|
||||||
|
$str_extra[] = lang('Exceptions').': '.implode(', ', array_map(static function (DateTime $exdate)
|
||||||
|
{
|
||||||
|
return str_replace(',', '', Api\DateTime::server2user($exdate, ''));
|
||||||
|
}, $this->exceptions_objs));
|
||||||
|
}
|
||||||
if(count($str_extra))
|
if(count($str_extra))
|
||||||
{
|
{
|
||||||
$str .= ' ('.implode(', ',$str_extra).')';
|
$str .= ' ('.implode(', ',$str_extra).')';
|
||||||
|
@ -2338,6 +2338,19 @@ class calendar_uiforms extends calendar_ui
|
|||||||
$readonlys['button[reject]'] = $readonlys['button[cancel]'] = true;
|
$readonlys['button[reject]'] = $readonlys['button[cancel]'] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$all_participants = ($event['participants'] ?? []) + ($existing_event['participants'] ?? []);
|
||||||
|
$event['participantChanges'] = array_map(function($uid, $status) use ($existing_event, $event) {
|
||||||
|
return [
|
||||||
|
'changed' => !isset($event['participants'][$uid]) ? 'meetingRequestParticipantDeleted' :
|
||||||
|
(!isset($existing_event['participants'][$uid]) ? 'meetingRequestChanged' :
|
||||||
|
($status !== $existing_event['participants'][$uid] ? 'meetingRequestChangedStatus' : '')),
|
||||||
|
'label' => $this->bo->participant_name($uid),
|
||||||
|
'status' => lang($this->bo->verbose_status[calendar_so::split_status($status, $quantity, $role)]),
|
||||||
|
'role' => $role === 'REQ-PARTICIPANT' ? '' : lang($this->bo->roles[$role] ??
|
||||||
|
(substr($role,0,6) === 'X-CAT-' && ($cat_id = (int)substr($role,6)) > 0 ?
|
||||||
|
$GLOBALS['egw']->categories->id2name($cat_id) : str_replace('X-','',$role))),
|
||||||
|
];
|
||||||
|
}, array_keys($all_participants), $all_participants);
|
||||||
break;
|
break;
|
||||||
case 'cancel':
|
case 'cancel':
|
||||||
// first participant is the (external) organizer (our iCal parser adds owner first!)
|
// first participant is the (external) organizer (our iCal parser adds owner first!)
|
||||||
@ -2369,6 +2382,7 @@ class calendar_uiforms extends calendar_ui
|
|||||||
}
|
}
|
||||||
//error_log(__METHOD__."(...) parsed as ".array2string($event));
|
//error_log(__METHOD__."(...) parsed as ".array2string($event));
|
||||||
$event['recure'] = $this->bo->recure2string($master ?? null ?: $event);
|
$event['recure'] = $this->bo->recure2string($master ?? null ?: $event);
|
||||||
|
if (!empty($master)) unset($event['changed']['recure']);
|
||||||
$event['all_participants'] = implode(",\n",$this->bo->participants($event, true));
|
$event['all_participants'] = implode(",\n",$this->bo->participants($event, true));
|
||||||
|
|
||||||
// EGroupware event has been deleted, don't let user resurrect it by accepting again
|
// EGroupware event has been deleted, don't let user resurrect it by accepting again
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
<et2-description value="Title"></et2-description>
|
<et2-description value="Title"></et2-description>
|
||||||
<et2-description id="title" noLang="1" class="@changed[title]"></et2-description>
|
<et2-description id="title" noLang="1" class="@changed[title]"></et2-description>
|
||||||
</row>
|
</row>
|
||||||
<row class="row">
|
<row class="row" disabled="!$cont[location]$cont[##videoconference]">
|
||||||
<et2-description value="Location"></et2-description>
|
<et2-description value="Location"></et2-description>
|
||||||
<et2-hbox>
|
<et2-hbox>
|
||||||
<et2-description id="location" noLang="1" class="@changed[location]"></et2-description>
|
<et2-description id="location" noLang="1" class="@changed[location]"></et2-description>
|
||||||
@ -111,7 +111,20 @@
|
|||||||
</row>
|
</row>
|
||||||
<row class="row" valign="top">
|
<row class="row" valign="top">
|
||||||
<et2-description value="Participants"></et2-description>
|
<et2-description value="Participants"></et2-description>
|
||||||
<et2-description id="all_participants" class="@changed[participants]"></et2-description>
|
<grid id="participantChanges" class="meetingRequestParticipants">
|
||||||
|
<columns>
|
||||||
|
<column/>
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row class="$row_cont[changed]">
|
||||||
|
<et2-hbox>
|
||||||
|
<et2-description id="${row}[label]"></et2-description>
|
||||||
|
<et2-description id="${row}[status]" label="(%s)"></et2-description>
|
||||||
|
<et2-description id="${row}[role]"></et2-description>
|
||||||
|
</et2-hbox>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
</row>
|
</row>
|
||||||
<row class="row" valign="top" disabled="!@comment">
|
<row class="row" valign="top" disabled="!@comment">
|
||||||
<et2-description value="Comment"></et2-description>
|
<et2-description value="Comment"></et2-description>
|
||||||
@ -163,10 +176,17 @@
|
|||||||
.meetingWarning tr.row td {
|
.meetingWarning tr.row td {
|
||||||
font-size: 120% !important;
|
font-size: 120% !important;
|
||||||
}
|
}
|
||||||
.meetingRequestError, .meetingRequestChanged {
|
.meetingRequestError, .meetingRequestChanged, .meetingRequestChangedStatus et2-description[id$=status\]], .meetingRequestParticipantDeleted {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
#calendar-meeting table.et2_grid.meetingRequestParticipants td {
|
||||||
|
padding: 0 !important;
|
||||||
|
padding-left: 0 !important;
|
||||||
|
}
|
||||||
|
.meetingRequestParticipantDeleted {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
</styles>
|
</styles>
|
||||||
</template>
|
</template>
|
||||||
</overlay>
|
</overlay>
|
Loading…
Reference in New Issue
Block a user