new displays items status in title

This commit is contained in:
skeeter 2001-03-12 04:30:15 +00:00
parent a57cb8ea5b
commit d57e692c9a
3 changed files with 37 additions and 22 deletions

View File

@ -131,6 +131,26 @@ class calendar extends calendar_
return (!!($this->rights & $needed) == True);
}
function get_long_status($status_short)
{
switch ($status_short)
{
case 'A':
$status = 'Accepted';
break;
case 'R':
$status = 'Rejected';
break;
case 'T':
$status = 'Tentative';
break;
case 'U':
$status = 'No Response';
break;
}
return $status;
}
function get_weekday_start($year,$month,$day) {
global $phpgw_info;
@ -225,6 +245,9 @@ class calendar extends calendar_
{
$str = $cal_info->$field;
}
$str .= ' ('.$this->get_long_status($this->users_status).')';
return $str;
}
@ -1465,21 +1488,8 @@ class calendar extends calendar_
{
$str .= '<br>';
}
switch ($event->status[$i])
{
case 'A':
$status = 'Accepted';
break;
case 'R':
$status = 'Rejected';
break;
case 'T':
$status = 'Tentative';
break;
case 'U':
$status = 'No Response';
break;
}
$status = $this->get_long_status($event->status[$i]);
$str .= $phpgw->common->grab_owner_name($event->participants[$i]).' (';

View File

@ -38,20 +38,21 @@ if(extension_loaded('mcal') == False)
define(M_ALLDAYS,127);
}
define('MSG_DELETED',0);
define('MSG_MODIFIED',1);
define('MSG_ADDED',2);
define(MSG_DELETED,0);
define(MSG_MODIFIED,1);
define(MSG_ADDED,2);
define('REJECTED',0);
define('NO_RESPONSE',1);
define('TENTATIVE',2);
define('ACCEPTED',3);
define(REJECTED,0);
define(NO_RESPONSE,1);
define(TENTATIVE,2);
define(ACCEPTED,3);
class calendar__
{
var $event;
var $stream;
var $user;
var $users_status;
var $modified;
var $deleted;
var $added;

View File

@ -345,6 +345,10 @@ class calendar_ extends calendar__
{
while($this->stream->next_record())
{
if($this->stream->f('cal_login') == $this->user)
{
$this->users_status = $this->stream->f('cal_status');
}
$this->event->participants[] = $this->stream->f('cal_login');
$this->event->status[] = $this->stream->f('cal_status');
}