* Calendar: Make resources stand out more in conflict list

This commit is contained in:
nathangray 2021-02-10 11:32:51 -07:00
parent 880a8be7c6
commit c22fc8c004
4 changed files with 39 additions and 4 deletions

View File

@ -2420,13 +2420,26 @@ class calendar_uiforms extends calendar_ui
{
$is_readable = $this->bo->check_perms(Acl::READ,$conflict);
$conflict_participants = $this->bo->participants(array(
'participants' => array_intersect_key((array)$conflict['participants'],$event['participants']),
),true,true);// show group invitations too
$conflict_participant_list = [];
foreach($conflict_participants as $c_id => $c_name)
{
$res_info = $this->bo->resource_info($c_id);
$conflict_participant_list[] = array(
'id' => $c_id,
'name' => $c_name,
'app' => $res_info['app'],
'type' => $res_info['type']
);
}
$conflicts[$k] += array(
'icon_participants' => $is_readable ? (count($conflict['participants']) > 1 ? 'users' : 'single') : 'private',
'tooltip_participants' => $is_readable ? implode(', ',$this->bo->participants($conflict)) : '',
'time' => $this->bo->long_date($conflict['start'],$conflict['end'],true),
'conflicting_participants' => implode(",\n",$this->bo->participants(array(
'participants' => array_intersect_key((array)$conflict['participants'],$event['participants']),
),true,true)), // show group invitations too
'conflicting_participants' => $conflict_participant_list,
'icon_recur' => $conflict['recur_type'] != MCAL_RECUR_NONE ? 'recur' : '',
'text_recur' => $conflict['recur_type'] != MCAL_RECUR_NONE ? lang('Recurring event') : ' ',
);

View File

@ -158,6 +158,10 @@ div.calendar_conflicts {
width: 22px;
height: 22px;
}
.calendar_conflicts table[id*="conflicting_participants"] > tbody > tr.r .et2_label {
/* Color for resources */
color: blue;
}
/* Loader - hide sizing behind overlay*/
#egw-loadin-prompt_calendar::before {

View File

@ -19,7 +19,21 @@
<description id="conflicts[$row][time]" no_lang="1"/>
<vbox statustext="conflict[$row][tooltip]" statustext_html="true" orient=",0,0">
<description id="conflicts[$row][title]" no_lang="1" options="b"/>
<description id="conflicts[$row][conflicting_participants]" no_lang="1"/>
<grid id="conflicts[$row][conflicting_participants]">
<columns>
<column width="30"/>
<column/>
</columns>
<rows>
<row class="$row_cont[type]">
<hbox>
<appicon src="$row_cont[app]" disabled="$row_cont[type]=u"/>
</hbox>
<description value="$row_cont[name]" no_lang="1"/>
</row>
</rows>
</grid>
</vbox>
</row>
</rows>

View File

@ -167,6 +167,10 @@ div.calendar_conflicts {
width: 22px;
height: 22px;
}
.calendar_conflicts table[id*="conflicting_participants"] > tbody > tr.r .et2_label {
/* Color for resources */
color: blue;
}
/* Loader - hide sizing behind overlay*/
#egw-loadin-prompt_calendar::before {
opacity: 1;