- Timestamp:
- 04/12/11 10:46:02 (13 years ago)
- Location:
- branches/2.2.0.1/calendar
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php
r3978 r3989 3468 3468 3469 3469 $titleView = $account_prefs['calendar']['title_view']; 3470 if($titleView == "1"){ 3471 $textdesc = ''; 3472 }else{ 3473 $textdesc=(!$is_private && $event['description'] ? $this->bo->get_short_field($event,$is_private,'description'):''); 3474 $textdesc=nl2br($textdesc); 3470 if($titleView == "1") 3471 { 3472 $textdesc = ''; 3473 } 3474 else 3475 { 3476 $textdesc = (!$is_private && $event['description'] ? $this->bo->get_short_field($event,$is_private,'description'):''); 3477 $textdesc=nl2br($textdesc); 3475 3478 } 3476 3479 3477 3480 // added $textlocation but this must be activated in the actual pict_link.tpl file of the used template set 3478 $textlocation= $this->bo->get_short_field($event,$is_private,'location');3481 $textlocation= $event['location']?"<br/><b>Local:</b> ".$this->bo->get_short_field($event,$is_private,'location'):''; 3479 3482 3480 3483 if ($viewable) … … 3590 3593 'users_status'=>$textstatus, 3591 3594 'desc'=> $textdesc, 3592 'location'=> "<br><b>Local:</b> ".$textlocation3595 'location'=> $textlocation 3593 3596 ); 3594 3597 $this->output_template_array($this->link_tpl,'picture','link_text',$var); … … 3655 3658 } 3656 3659 3657 $texttitle = $texttime = $textdesc = $textlocation = $textstatus = ''; 3658 3659 3660 3660 $textTitlePrint = $textTimePrint = $textDescPrint = $textLocationPrint = $textObservationsPrint = $textstatus = ''; 3661 3661 3662 if(!$is_private) 3662 3663 { 3663 //$text .= $this->bo->display_status($event['users_status']);3664 3665 3664 // split text for better display by templates, also see $texttime $texttitle $textdesc $textlocation 3666 3665 $textstatus=$this->bo->display_status($event['users_status']); … … 3668 3667 } 3669 3668 3670 $text = '<nobr> '.$time.' </nobr> '.$this->bo->get_short_field($event,$is_private,'title').$text. 3669 $account_name = $_POST['user'] ? 3670 $_POST['user'] : 3671 ($_GET['account_name'] ? 3672 $_GET['account_name'] : ''); 3671 3673 3672 $texttime=$time; 3673 $texttitle=$this->bo->get_short_field($event,$is_private,'title'); 3674 $textdesc=(!$is_private && $event['description'] ? $this->bo->get_short_field($event,$is_private,'description'):''); 3674 $accounts = CreateObject('phpgwapi.accounts'); 3675 $accountId = $accounts->name2id($account_name); 3676 3677 $prefs = CreateObject('phpgwapi.preferences', $accountId); 3678 $account_prefs = $prefs->read(); 3679 3680 3681 $textTimePrint = $time; 3682 $textTitlePrint = $is_private ? lang('Private event. You are not allowed to print it.') : ( $event['type'] == 'H' ? 'Apontamento de horas' : $this->bo->get_short_field($event,$is_private,'title' ) ); 3683 3684 $fieldsToPrint = $account_prefs['calendar']['fields_to_print']; 3685 if($fieldsToPrint == "0") 3686 { 3687 $textDescPrint = ''; 3688 } 3689 elseif($fieldsToPrint == "1") 3690 { 3691 $textDescPrint = (!$is_private && $event['description'] ? $this->bo->get_short_field($event,$is_private,'description'):''); 3692 } 3693 else 3694 { 3695 $textDescPrint = (!$is_private && $event['description'] ? $this->bo->get_short_field($event,$is_private,'description'):''); 3696 $textObservationsPrint = $event['observations']?"<br /><b>Observações:</b> ".$this->bo->get_short_field($event,$is_private,'observations'):''; 3697 } 3698 3675 3699 // added $textlocation but this must be activated in the actual pict_link.tpl file of the used template set 3676 $text location=$this->bo->get_short_field($event,$is_private,'location');3700 $textLocationPrint = $event['location']?"<br /><b>Local:</b> ".$this->bo->get_short_field($event,$is_private,'location'):''; 3677 3701 3678 3702 if ($viewable) … … 3681 3705 $this->event_tpl->set_var('link_link',$this->page('view','&cal_id='.$event['id'].'&date='.$date)); 3682 3706 $this->event_tpl->set_var('lang_view',lang('View this entry')); 3683 $this->event_tpl->set_var('desc', $textdesc); 3684 $this->event_tpl->set_var('location', $textlocation); 3707 $this->event_tpl->set_var('desc', $textDescPrint); 3708 $this->event_tpl->set_var('location', $textLocationPrint); 3709 $this->event_tpl->set_var('observations', $textObservationsPrint); 3685 3710 $this->event_tpl->parse('picture','link_event_open',True); 3686 3711 } 3712 3687 3713 if (!$is_private) 3688 3714 { … … 3715 3741 } 3716 3742 } 3743 3717 3744 $participants = $this->planner_participants($event['participants']); 3718 3745 if(count($event['participants']) > 1) … … 3743 3770 ); 3744 3771 } 3772 3745 3773 if(@isset($event['alarm']) && count($event['alarm']) >= 1 && !$is_private) 3746 3774 { … … 3770 3798 $this->output_template_array($this->event_tpl,'picture','event_pict',$var); 3771 3799 } 3772 if ($texttitle) 3800 3801 if ($textTitlePrint) 3773 3802 { 3774 3803 $var = Array( 3775 3804 // 'text' => $text, 3776 'time'=> $text time,3777 'title'=> $text title,3805 'time'=> $textTimePrint, 3806 'title'=> $textTitlePrint, 3778 3807 'users_status'=>$textstatus, 3779 'desc'=> $textdesc, 3780 'location'=> "<br><b>Local:</b> ".$textlocation 3808 'desc'=> $textDescPrint, 3809 'location'=> $textLocationPrint, 3810 'observations'=> $textObservationsPrint 3781 3811 ); 3782 3812 $this->output_template_array($this->event_tpl,'picture','link_event_text',$var); -
branches/2.2.0.1/calendar/inc/hook_settings.inc.php
r1703 r3989 198 198 '1' => lang('Only Title') 199 199 ),'This option enable or disable the meeting description view your calendar in readmode.'); 200 create_select_box('Choose fields to print','fields_to_print',array( 201 '0' => lang('Only Title'), 202 '1' => lang('Title and Description'), 203 '2' => lang('Title, description and observations') 204 ),'This option enables the choice of fields to print.'); -
branches/2.2.0.1/calendar/templates/default/event_link.tpl
r855 r3989 32 32 <span>{location}</span> 33 33 <br /> 34 <span>{observations}</span> 34 35 </td> 35 36 </tr>
Note: See TracChangeset
for help on using the changeset viewer.