A few more fixes for the calendar.

This commit is contained in:
skeeter 2001-05-21 03:20:31 +00:00
parent c1f7e245d5
commit 551661182f
6 changed files with 49 additions and 43 deletions

View File

@ -228,11 +228,11 @@
$p->set_var('color',$phpgw_info['theme']['bg_text']);
$p->set_var('overlap_title',lang('Scheduling Conflict'));
$cal_stream = $phpgw->calendar->open('INBOX',intval($owner),'');
$phpgw->calendar->open('INBOX',intval($owner),'');
$overlap = '';
for($i=0;$i<count($overlapping_events);$i++)
{
$over = $phpgw->calendar->fetch_event($cal_stream,$overlapping_events[$i]);
$over = $phpgw->calendar->fetch_event($overlapping_events[$i]);
$overlap .= '<li>'.$phpgw->calendar->link_to_entry($over,$event->start->month,$event->start->mday,$event->start->year);
}
if(strlen($overlap) > 0)

View File

@ -16,8 +16,8 @@
$phpgw_info['flags']['currentapp'] = 'calendar';
include('../header.inc.php');
$cal_stream = $phpgw->calendar->open('INBOX',$owner,'');
$event = $phpgw->calendar->fetch_event($cal_stream,$id);
$phpgw->calendar->open('INBOX',$owner,'');
$event = $phpgw->calendar->fetch_event($id);
reset($event->participants);
$participating = False;
@ -45,8 +45,7 @@
reset($event->participants);
$tz_offset = ((60 * 60) * intval($phpgw_info['user']['preferences']['common']['tz_offset']));
$freetime = $phpgw->calendar->localdates(mktime(0,0,0,$event->start->month,$event->start->mday,$event->start->year) - $tz_offset);
$freetime = $phpgw->calendar->datetime->localdates(mktime(0,0,0,$event->start->month,$event->start->mday,$event->start->year) - $phpgw->calendar->datetime->tz_offset);
echo $phpgw->calendar->timematrix($freetime,$phpgw->calendar->splittime('000000',False),0,$event->participants);
echo $phpgw->calendar->view_event($event);

View File

@ -1766,7 +1766,7 @@ class calendar extends calendar_
function get_response()
{
global $phpgw;
$str = '<table width="100%" cols="4"><tr align="center">';
$p = CreateObject('phpgwapi.Template',$this->template_dir);

View File

@ -196,7 +196,7 @@ class calendar_ extends calendar__
{
while($this->stream->next_record())
{
if($this->stream->f('cal_login') == $this->user)
if(intval($this->stream->f('cal_login')) == intval($this->user))
{
$this->event->users_status = $this->stream->f('cal_status');
}
@ -486,7 +486,7 @@ class calendar_ extends calendar__
ACCEPTED => 'A'
);
$temp_event = $this->event;
$old_event = $this->fetch_event($this->stream,$id);
$old_event = $this->fetch_event($id);
switch($status)
{
case REJECTED:

View File

@ -38,45 +38,51 @@
$phpgw->calendar->open('INBOX',$owner,'');
$event = $phpgw->calendar->fetch_event($id);
echo $phpgw->calendar->view_event($event);
$thisyear = $event->start->year;
$thismonth = $event->start->month;
$thisday = $event->start->mday;
$p = CreateObject('phpgwapi.Template',$phpgw->calendar->template_dir);
$templates = Array(
'form_button' => 'form_button_script.tpl'
);
$p->set_file($templates);
echo '<center>';
if (($event->owner == $owner) && ($phpgw->calendar->check_perms(PHPGW_ACL_EDIT) == True))
if($event != False)
{
$var = Array(
'action_url_button' => $phpgw->link('/calendar/edit_entry.php','id='.$id.'&owner='.$owner),
'action_text_button' => lang('Edit'),
'action_confirm_button' => '',
'action_extra_field' => ''
);
$p->set_var($var);
echo $p->finish($p->parse('out','form_button'));
}
echo $phpgw->calendar->view_event($event);
if (($event->owner == $owner) && ($phpgw->calendar->check_perms(PHPGW_ACL_DELETE) == True))
$thisyear = $event->start->year;
$thismonth = $event->start->month;
$thisday = $event->start->mday;
$p = CreateObject('phpgwapi.Template',$phpgw->calendar->template_dir);
$templates = Array(
'form_button' => 'form_button_script.tpl'
);
$p->set_file($templates);
if (($event->owner == $owner) && ($phpgw->calendar->check_perms(PHPGW_ACL_EDIT) == True))
{
$var = Array(
'action_url_button' => $phpgw->link('/calendar/edit_entry.php','id='.$id.'&owner='.$owner),
'action_text_button' => lang('Edit'),
'action_confirm_button' => '',
'action_extra_field' => ''
);
$p->set_var($var);
echo $p->finish($p->parse('out','form_button'));
}
if (($event->owner == $owner) && ($phpgw->calendar->check_perms(PHPGW_ACL_DELETE) == True))
{
$var = Array(
'action_url_button' => $phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/delete.php','id='.$id.'&owner='.$owner),
'action_text_button' => lang('Delete'),
'action_confirm_button' => "onClick=\"return confirm('".lang("Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users.")."')\"",
'action_extra_field' => ''
);
$p->set_var($var);
echo $p->finish($p->parse('out','form_button'));
}
}
else
{
$var = Array(
'action_url_button' => $phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/delete.php','id='.$id.'&owner='.$owner),
'action_text_button' => lang('Delete'),
'action_confirm_button' => "onClick=\"return confirm('".lang("Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users.")."')\"",
'action_extra_field' => ''
);
$p->set_var($var);
echo $p->finish($p->parse('out','form_button'));
echo lang("Sorry, the owner has just deleted this event").'.';
}
echo '</center>';
$phpgw->common->phpgw_footer();

View File

@ -543,6 +543,7 @@ size email en Size
small notes en Small
sorry, that group name has already been taking. admin en Sorry, that group name has already been taking.
sorry, the follow users are still a member of the group x admin en Sorry, the follow users are still a member of the group %1
sorry, the owner has just deleted this event calendar en Sorry, the owner has just deleted this event
sorry, there was a problem processing your request. common en Sorry, there was a problem processing your request.
sorry, your login has expired login en Sorry, your login has expired
source language transy en Source Language