phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] calendar/inc class.uicalendar.inc.php,1.114


From: skwashd
Subject: [Phpgroupware-cvs] calendar/inc class.uicalendar.inc.php,1.114
Date: Sun, 6 Nov 2005 22:30:00 +0100

Update of calendar/inc

Modified Files:
     Branch: MAIN
            class.uicalendar.inc.php lines: +16 -65

Log Message:
readding 'i participate'

====================================================
Index: calendar/inc/class.uicalendar.inc.php
diff -u calendar/inc/class.uicalendar.inc.php:1.113 
calendar/inc/class.uicalendar.inc.php:1.114
--- calendar/inc/class.uicalendar.inc.php:1.113 Fri Oct 28 02:57:34 2005
+++ calendar/inc/class.uicalendar.inc.php       Sun Nov  6 21:30:42 2005
@@ -3795,85 +3795,36 @@
                                $event['participants'] = array();
                        }

+                       $str = '';
                        foreach ( $event['participants'] as $id => $ignore )
                        {
                                if($id != intval($event['owner']))
                                {
-                                       $str .= '<option value="' . 
$id.$event['participants'][$id] . '"'
-                                                       
.($event['participants'][$id]?' selected="selected"':'').'>'
+                                       $str .= '<option value="' . $id . '" 
selected="selected">'
                                                        . 
$this->bo->contacts->get_name_of_person_id($id) . '</option>' . "\n";
                                }
                        }
                        $var['participants'] = array
                        (
-                               'field' => '<input type="button" value="' . 
lang('Participants') . '" onClick="accounts_popup();">' . "\n"
-                                               . '<input type="hidden" 
name="accountid" value="' . $accountid . '" />',
+                               'field' => '<input type="button" value="' . 
lang('Participants') . '" onClick="accounts_popup();">',
+                               //              . '<input type="hidden" 
name="accountid" value="' . $accountid . '" />',
                                'data'  => "\n".'   <select 
id="event_participants" name="participants[]" multiple="multiple" size="7">'
                                                . "\n{$str}</select>"
                        );

-                       /* Old code no longer used
-                       
if(!isset($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) || 
!$GLOBALS['phpgw_info']['server']['deny_user_grants_access'])
-                       {
-                               
switch($GLOBALS['phpgw_info']['user']['preferences']['common']['account_selection'])
-                               {
-                                       case 'popup':
-                                               while 
(is_array($event['participants']) && list($id) = each($event['participants']))
-                                               {
-                                                       if($id != 
intval($event['owner']))
-                                                       {
-                                                               $str .= 
'<option value="' . $id.$event['participants'][$id] . '"'
-                                                                               
.($event['participants'][$id]?' selected="selected"':'').'>'
-                                                                               
. '(' . ($this->bo->contacts->get_account_id($id) ? 'u' : 'c') .') '
-                                                                               
. $this->bo->contacts->get_name_of_person_id($id) . '</option>' . "\n";
-                                                       }
-                                               }
-                                               $var['participants'] = array
-                                               (
-                                                       'field' => '<input 
type="button" value="' . lang('Participants') . '" 
onClick="accounts_popup();">' . "\n"
-                                                                       . 
'<input type="hidden" name="accountid" value="' . $accountid . '">',
-                                                       'data'  => "\n".'   
<select name="participants[]" multiple size="7">' . "\n" . $str . '</select>'
-                                               );
-                                               break;
-                                       default:
-
-                                               $accounts = 
$GLOBALS['phpgw']->acl->get_ids_for_location('run',1,'calendar');
-                                               $users = Array();
-                                               
$this->build_part_list($users,$accounts,$event['owner']);
-
-                                               $str = '';
-                                               @asort($users);
-                                               @reset($users);
-
-                                               foreach($users as $id => 
$user_array)
-                                               {
-                                                       if($id != 
intval($event['owner']))
-                                                       {
-                                                               $str .= '    
<option value="' . $id.$event['participants'][$id] . 
'"'.($event['participants'][$id]?' selected':'').'>('.$user_array['type'].') 
'.$user_array['name'].'</option>'."\n";
-                                                       }
-                                               }
-                                               $var['participants'] = array
-                                               (
-                                                       'field' => 
lang('Participants'),
-                                                       'data'  => "\n".'   
<select name="participants[]" multiple size="7">'."\n".$str.'   </select>'
-                                               );
-                                               break;
-                               }
 // I Participate
-                               if((($event['id'] > 0) && 
isset($event['participants'][$event['owner']])) || !$event['id'])
-                               {
-                                       $checked = ' checked';
-                               }
-                               else
-                               {
-                                       $checked = '';
-                               }
-                               $var['owner'] = Array(
-                                       'field' => 
$this->bo->contacts->get_name_of_person_id($event['owner']).' 
'.lang('Participates'),
-                                       'data'  => '<input type="checkbox" 
name="participants[]" 
value="'.$event['owner'].$event['participants'][$event['owner']].'"'.$checked.'>'
-                               );
+                       if((($event['id'] > 0) && 
isset($event['participants'][$event['owner']])) || !$event['id'])
+                       {
+                               $checked = ' checked="checked"';
                        }
-                       */
+                       else
+                       {
+                               $checked = '';
+                       }
+                       $var['owner'] = Array(
+                               'field' => lang('%1 participates', 
$this->bo->contacts->get_name_of_person_id($event['owner']) ),
+                               'data'  => '<input type="checkbox" 
name="participants[]" value="'.$event['owner'].'"'.$checked.'>'
+                       );
 // Reminder
                        // The user must use "Alarm Management" to 
change/modify an alarm
                        // so only display the email reminder fields if this is 
a new event






reply via email to

[Prev in Thread] Current Thread [Next in Thread]