private events: no 2. private (for not shown description), added icon with participant-name(s)

removed the alt-attribute from the images
This commit is contained in:
Ralf Becker 2003-11-15 15:28:15 +00:00
parent c574e9c325
commit 2d9dab1a1f

View File

@ -2637,7 +2637,7 @@
{ {
$str = ''; $str = '';
$is_private = !$event['public'] && !$this->bo->check_perms(PHPGW_ACL_READ,$event); $is_private = !$event['public'] && !$this->bo->check_perms(PHPGW_ACL_READ,$event);
$editable = !$this->bo->printer_friendly && $this->bo->check_perms(PHPGW_ACL_READ,$event); $viewable = !$this->bo->printer_friendly && $this->bo->check_perms(PHPGW_ACL_READ,$event);
$starttime = $this->bo->maketime($event['start']) - $GLOBALS['phpgw']->datetime->tz_offset; $starttime = $this->bo->maketime($event['start']) - $GLOBALS['phpgw']->datetime->tz_offset;
$endtime = $this->bo->maketime($event['end']) - $GLOBALS['phpgw']->datetime->tz_offset; $endtime = $this->bo->maketime($event['end']) - $GLOBALS['phpgw']->datetime->tz_offset;
@ -2678,26 +2678,30 @@
$time = ''; $time = '';
} }
$text = ''; $text = '';
if(!$is_private) if(!$is_private)
{ {
$text .= $this->bo->display_status($event['users_status']); $text .= $this->bo->display_status($event['users_status']);
} }
$text = '<nobr>&nbsp;'.$time.'&nbsp;</nobr> '.$this->bo->get_short_field($event,$is_private,'title').$text.': <I>'.$this->bo->get_short_field($event,$is_private,'description').'</I>'.$GLOBALS['phpgw']->browser->br; $text = '<nobr>&nbsp;'.$time.'&nbsp;</nobr> '.$this->bo->get_short_field($event,$is_private,'title').$text.
(!$is_private && $event['description'] ? ': <I>'.$this->bo->get_short_field($event,$is_private,'description').'</I>':'').
$GLOBALS['phpgw']->browser->br;
if ($editable) if ($viewable)
{ {
$date = sprintf('%04d%02d%02d',$year,$month,$day); $date = sprintf('%04d%02d%02d',$year,$month,$day);
$this->link_tpl->set_var('link_link',$this->page('view','&cal_id='.$event['id'].'&date='.$date)); $this->link_tpl->set_var('link_link',$this->page('view','&cal_id='.$event['id'].'&date='.$date));
$this->link_tpl->set_var('lang_view',lang('View this entry')); $this->link_tpl->set_var('lang_view',lang('View this entry'));
$this->link_tpl->parse('picture','link_open',True); $this->link_tpl->parse('picture','link_open',True);
}
if (!$is_private)
{
if($event['priority'] == 3) if($event['priority'] == 3)
{ {
$picture[] = Array( $picture[] = Array(
'pict' => $GLOBALS['phpgw']->common->image('calendar','high'), 'pict' => $GLOBALS['phpgw']->common->image('calendar','high'),
'width' => 8, 'width' => 8,
'height'=> 17, 'height'=> 17,
'alt' => lang('high priority'),
'title' => lang('high priority') 'title' => lang('high priority')
); );
} }
@ -2707,7 +2711,6 @@
'pict' => $GLOBALS['phpgw']->common->image('calendar','circle'), 'pict' => $GLOBALS['phpgw']->common->image('calendar','circle'),
'width' => 5, 'width' => 5,
'height'=> 7, 'height'=> 7,
'alt' => lang('single event'),
'title' => lang('single event') 'title' => lang('single event')
); );
} }
@ -2717,11 +2720,10 @@
'pict' => $GLOBALS['phpgw']->common->image('calendar','recur'), 'pict' => $GLOBALS['phpgw']->common->image('calendar','recur'),
'width' => 12, 'width' => 12,
'height'=> 12, 'height'=> 12,
'alt' => lang('recurring event'),
'title' => lang('recurring event') 'title' => lang('recurring event')
); );
} }
}
$participants = $this->planner_participants($event['participants']); $participants = $this->planner_participants($event['participants']);
if(count($event['participants']) > 1) if(count($event['participants']) > 1)
{ {
@ -2729,7 +2731,6 @@
'pict' => $GLOBALS['phpgw']->common->image('calendar','multi_3'), 'pict' => $GLOBALS['phpgw']->common->image('calendar','multi_3'),
'width' => 14, 'width' => 14,
'height'=> 14, 'height'=> 14,
'alt' => $participants,
'title' => $participants 'title' => $participants
); );
} }
@ -2739,7 +2740,6 @@
'pict' => $GLOBALS['phpgw']->common->image('calendar','single'), 'pict' => $GLOBALS['phpgw']->common->image('calendar','single'),
'width' => 14, 'width' => 14,
'height'=> 14, 'height'=> 14,
'alt' => $participants,
'title' => $participants 'title' => $participants
); );
} }
@ -2749,11 +2749,10 @@
'pict' => $GLOBALS['phpgw']->common->image('calendar','private'), 'pict' => $GLOBALS['phpgw']->common->image('calendar','private'),
'width' => 13, 'width' => 13,
'height'=> 13, 'height'=> 13,
'alt' => lang('private'),
'title' => lang('private') 'title' => lang('private')
); );
} }
if(@isset($event['alarm']) && count($event['alarm']) >= 1) if(@isset($event['alarm']) && count($event['alarm']) >= 1 && !$is_private)
{ {
// if the alarm is to go off the day before the event // if the alarm is to go off the day before the event
// the icon does not show up because of 'alarm_today' // the icon does not show up because of 'alarm_today'
@ -2764,7 +2763,6 @@
'pict' => $GLOBALS['phpgw']->common->image('calendar','alarm'), 'pict' => $GLOBALS['phpgw']->common->image('calendar','alarm'),
'width' => 13, 'width' => 13,
'height'=> 13, 'height'=> 13,
'alt' => lang('alarm'),
'title' => lang('alarm') 'title' => lang('alarm')
); );
} }
@ -2777,12 +2775,10 @@
'pic_image' => $picture[$i]['pict'], 'pic_image' => $picture[$i]['pict'],
'width' => $picture[$i]['width'], 'width' => $picture[$i]['width'],
'height' => $picture[$i]['height'], 'height' => $picture[$i]['height'],
'alt' => $picture[$i]['alt'],
'title' => $picture[$i]['title'] 'title' => $picture[$i]['title']
); );
$this->output_template_array($this->link_tpl,'picture','pict',$var); $this->output_template_array($this->link_tpl,'picture','pict',$var);
} }
}
if ($text) if ($text)
{ {
$var = Array( $var = Array(
@ -2791,7 +2787,7 @@
$this->output_template_array($this->link_tpl,'picture','link_text',$var); $this->output_template_array($this->link_tpl,'picture','link_text',$var);
} }
if ($editable) if ($viewable)
{ {
$this->link_tpl->parse('picture','link_close',True); $this->link_tpl->parse('picture','link_close',True);
} }
@ -3026,7 +3022,7 @@
if ($day_params['new_event']) if ($day_params['new_event'])
{ {
$new_event_link = ' <a href="'.$this->page('add','&date='.$date).'">' $new_event_link = ' <a href="'.$this->page('add','&date='.$date).'">'
. '<img src="'.$GLOBALS['phpgw']->common->image('calendar','new').'" width="10" height="10" alt="'.lang('New Entry').'" border="0" align="center">' . '<img src="'.$GLOBALS['phpgw']->common->image('calendar','new').'" width="10" height="10" title="'.lang('New Entry').'" border="0" align="center">'
. '</a>'; . '</a>';
$day_number = '<a href="'.$this->page('day','&date='.$date).'">'.$day.'</a>'; $day_number = '<a href="'.$this->page('day','&date='.$date).'">'.$day.'</a>';
} }