mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-21 10:27:52 +02:00
removed the "all future" field from participants states. Instead added uniform behaviour with existing event handling when editing a single recurrence or all recurrences. The message being displayed when editing a single recurrence read only is just meant as a proposal. Stylite usability PROs, please adjust this to whatever you want to.
This commit is contained in:
parent
35a0323027
commit
5b263e23eb
@ -326,7 +326,7 @@ class calendar_uiforms extends calendar_ui
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default: // existing participant row
|
default: // existing participant row
|
||||||
foreach(array('uid','status','status_recurrence','quantity') as $name)
|
foreach(array('uid','status','quantity') as $name)
|
||||||
{
|
{
|
||||||
$$name = $data[$name];
|
$$name = $data[$name];
|
||||||
}
|
}
|
||||||
@ -348,7 +348,7 @@ class calendar_uiforms extends calendar_ui
|
|||||||
}
|
}
|
||||||
if ($data['old_status'] != $status)
|
if ($data['old_status'] != $status)
|
||||||
{
|
{
|
||||||
if ($this->bo->set_status($event['id'],$uid,$status,$event['recur_type'] != MCAL_RECUR_NONE && !$status_recurrence ? $content['participants']['status_date'] : 0))
|
if ($this->bo->set_status($event['id'],$uid,$status,isset($content['edit_single']) ? $content['participants']['status_date'] : 0))
|
||||||
{
|
{
|
||||||
// refreshing the calendar-view with the changed participant-status
|
// refreshing the calendar-view with the changed participant-status
|
||||||
$msg = lang('Status changed');
|
$msg = lang('Status changed');
|
||||||
@ -637,7 +637,12 @@ class calendar_uiforms extends calendar_ui
|
|||||||
{
|
{
|
||||||
unset($event[$name]);
|
unset($event[$name]);
|
||||||
}
|
}
|
||||||
return lang('Exception created - you can now edit or delete it');
|
if($this->bo->check_perms(EGW_ACL_EDIT,$event))
|
||||||
|
{
|
||||||
|
return lang('Exception created - you can now edit or delete it');
|
||||||
|
} else {
|
||||||
|
return lang('You can now edit your participation status on this single recurrence');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -752,7 +757,6 @@ class calendar_uiforms extends calendar_ui
|
|||||||
'print' => array('label' => 'Print', 'title' => 'Print this event'),
|
'print' => array('label' => 'Print', 'title' => 'Print this event'),
|
||||||
'mail' => array('label' => 'Mail all participants', 'title' => 'compose a mail to all participants after the event is saved'),
|
'mail' => array('label' => 'Mail all participants', 'title' => 'compose a mail to all participants after the event is saved'),
|
||||||
),
|
),
|
||||||
'status_recurrence' => array('' => 'for this event', 'A' => 'for all future events'),
|
|
||||||
);
|
);
|
||||||
unset($sel_options['status']['G']);
|
unset($sel_options['status']['G']);
|
||||||
if (!is_array($event))
|
if (!is_array($event))
|
||||||
@ -876,7 +880,7 @@ class calendar_uiforms extends calendar_ui
|
|||||||
'quantity' => substr($status,1),
|
'quantity' => substr($status,1),
|
||||||
);
|
);
|
||||||
$readonlys[$row.'[quantity]'] = $type == 'u' || !isset($this->bo->resources[$type]['max_quantity']);
|
$readonlys[$row.'[quantity]'] = $type == 'u' || !isset($this->bo->resources[$type]['max_quantity']);
|
||||||
$readonlys[$row.'[status]'] = $readonlys[$row.'[status_recurrence]'] = !$this->bo->check_status_perms($uid,$event);
|
$readonlys[$row.'[status]'] = !$this->bo->check_status_perms($uid,$event);
|
||||||
$readonlys["delete[$uid]"] = !$this->bo->check_perms(EGW_ACL_EDIT,$event);
|
$readonlys["delete[$uid]"] = !$this->bo->check_perms(EGW_ACL_EDIT,$event);
|
||||||
// todo: make the participants available as links with email as title
|
// todo: make the participants available as links with email as title
|
||||||
if ($name == 'accounts')
|
if ($name == 'accounts')
|
||||||
@ -940,7 +944,6 @@ class calendar_uiforms extends calendar_ui
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$content['participants']['status_date'] = $preserv['actual_date'];
|
$content['participants']['status_date'] = $preserv['actual_date'];
|
||||||
$content['participants']['hide_status_recurrence'] = $event['recur_type'] == MCAL_RECUR_NONE;
|
|
||||||
$preserv = array_merge($preserv,$content);
|
$preserv = array_merge($preserv,$content);
|
||||||
|
|
||||||
if ($event['alarm'])
|
if ($event['alarm'])
|
||||||
@ -1050,8 +1053,10 @@ class calendar_uiforms extends calendar_ui
|
|||||||
//echo "preserv="; _debug_array($preserv);
|
//echo "preserv="; _debug_array($preserv);
|
||||||
//echo "readonlys="; _debug_array($readonlys);
|
//echo "readonlys="; _debug_array($readonlys);
|
||||||
//echo "sel_options="; _debug_array($sel_options);
|
//echo "sel_options="; _debug_array($sel_options);
|
||||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('calendar') . ' - ' . (!$event['id'] ? lang('Add') : ($view ? lang('View') :
|
$GLOBALS['egw_info']['flags']['app_header'] = lang('calendar') . ' - '
|
||||||
($content['edit_single'] ? lang('Create exception') : ($content['recur_type'] ? lang('Edit series') : lang('Edit')))));
|
. (!$event['id'] ? lang('Add')
|
||||||
|
: ($view ? ($content['edit_single'] ? lang('View exception') : ($content['recur_type'] ? lang('View series') : lang('View')))
|
||||||
|
: ($content['edit_single'] ? lang('Create exception') : ($content['recur_type'] ? lang('Edit series') : lang('Edit')))));
|
||||||
$GLOBALS['egw_info']['flags']['java_script'] .= "<script>\n$js\n</script>\n";
|
$GLOBALS['egw_info']['flags']['java_script'] .= "<script>\n$js\n</script>\n";
|
||||||
|
|
||||||
$content['cancel_needs_refresh'] = (bool)$_GET['cancel_needs_refresh'];
|
$content['cancel_needs_refresh'] = (bool)$_GET['cancel_needs_refresh'];
|
||||||
|
File diff suppressed because one or more lines are too long
@ -69,13 +69,12 @@
|
|||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
</template>
|
</template>
|
||||||
<template id="calendar.edit.participants" template="" lang="" group="0" version="1.3.003">
|
<template id="calendar.edit.participants" template="" lang="" group="0" version="1.3.004">
|
||||||
<grid width="100%" height="200" overflow="auto" id="participants">
|
<grid width="100%" height="200" overflow="auto" id="participants">
|
||||||
<columns>
|
<columns>
|
||||||
<column width="95"/>
|
<column width="95"/>
|
||||||
<column/>
|
<column/>
|
||||||
<column/>
|
<column/>
|
||||||
<column disabled="@hide_status_recurrence"/>
|
|
||||||
<column/>
|
<column/>
|
||||||
<column/>
|
<column/>
|
||||||
</columns>
|
</columns>
|
||||||
@ -89,7 +88,6 @@
|
|||||||
<link-entry id="resource" options="@cal_resources"/>
|
<link-entry id="resource" options="@cal_resources"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
<int options="1,,3" id="quantity"/>
|
<int options="1,,3" id="quantity"/>
|
||||||
<description/>
|
|
||||||
<button label="Add" id="add"/>
|
<button label="Add" id="add"/>
|
||||||
<description/>
|
<description/>
|
||||||
</row>
|
</row>
|
||||||
@ -97,7 +95,6 @@
|
|||||||
<description value="Type"/>
|
<description value="Type"/>
|
||||||
<description value="Participants"/>
|
<description value="Participants"/>
|
||||||
<description value="Quantity"/>
|
<description value="Quantity"/>
|
||||||
<description value="All future"/>
|
|
||||||
<description value="Status"/>
|
<description value="Status"/>
|
||||||
<description value="Actions"/>
|
<description value="Actions"/>
|
||||||
</row>
|
</row>
|
||||||
@ -105,7 +102,6 @@
|
|||||||
<description id="${row}[app]"/>
|
<description id="${row}[app]"/>
|
||||||
<description rows="1" cols="2" id="${row}[title]" no_lang="1"/>
|
<description rows="1" cols="2" id="${row}[title]" no_lang="1"/>
|
||||||
<int id="${row}[quantity]" options="1,,3"/>
|
<int id="${row}[quantity]" options="1,,3"/>
|
||||||
<checkbox id="${row}[status_recurrence]" align="center"/>
|
|
||||||
<menulist>
|
<menulist>
|
||||||
<menupopup id="${row}[status]" no_lang="1" onchange="1"/>
|
<menupopup id="${row}[status]" no_lang="1" onchange="1"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user