phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] projects/inc class.uiprojects_base.inc.php, 1.6 class


From: ceb
Subject: [Phpgroupware-cvs] projects/inc class.uiprojects_base.inc.php, 1.6 class.uiprojects.inc.php, 1.157 class.boprojects.inc.php, 1.155
Date: Tue, 29 Mar 2005 16:46:00 +0200

Update of projects/inc

Modified Files:
     Branch: MAIN
            class.uiprojects_base.inc.php lines: +2 -3
            class.uiprojects.inc.php lines: +65 -83
            class.boprojects.inc.php lines: +4 -4

Log Message:
update

====================================================
Index: projects/inc/class.uiprojects_base.inc.php
diff -u projects/inc/class.uiprojects_base.inc.php:1.5 
projects/inc/class.uiprojects_base.inc.php:1.6
--- projects/inc/class.uiprojects_base.inc.php:1.5      Wed Mar 16 16:26:40 2005
+++ projects/inc/class.uiprojects_base.inc.php  Tue Mar 29 14:46:57 2005
@@ -898,6 +898,7 @@
                        
$GLOBALS['phpgw']->template->set_var('lang_statistics',lang('Statistics'));
                        
$GLOBALS['phpgw']->template->set_var('lang_roles',lang('roles'));
                        
$GLOBALS['phpgw']->template->set_var('lang_role',lang('role'));
+                       
$GLOBALS['phpgw']->template->set_var('lang_name',lang('name'));

                        
$GLOBALS['phpgw']->template->set_var('lang_act_number',lang('Activity ID'));
                        
$GLOBALS['phpgw']->template->set_var('lang_status',lang('Status'));
@@ -1156,7 +1157,6 @@
                        $type                           = 
(isset($data['type'])? $data['type']: 'selectbox');
                        $selected                       = 
(isset($data['selected'])? 
$data['selected']:$this->boprojects->get_acl_for_project($data['project_id']));
                        $project_only           = 
(isset($data['project_only'])?$data['project_only']:False);
-                       $admins_included        = 
(isset($data['admins_included'])?$data['admins_included']:False);
                        $pro_parent                     = 
intval($data['pro_parent']);

                        if($project_only)
@@ -1175,7 +1175,6 @@
                                case 'selectbox':
                                        $employees = 
$this->boprojects->selected_employees(array('action' => $data['action'],
                                                                                
                 'pro_parent' => (($pro_parent>0 && $pro_parent != 
$data['project_id'])?$pro_parent:''),
-                                                                               
                 'admins_included' => $admins_included,
                                                                                
                 'project_id' => $data['project_id']
                                                                                
                ));
                                        break;

====================================================
Index: projects/inc/class.uiprojects.inc.php
diff -u projects/inc/class.uiprojects.inc.php:1.156 
projects/inc/class.uiprojects.inc.php:1.157
--- projects/inc/class.uiprojects.inc.php:1.156 Wed Mar 16 16:26:40 2005
+++ projects/inc/class.uiprojects.inc.php       Tue Mar 29 14:46:57 2005
@@ -669,7 +669,7 @@
                        $this->t->set_var('action_list',$action_list);
                        
$this->t->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        
$this->t->set_var('search_list',$this->nextmatchs->search(array('query' => 
$this->query)));
-                       
$this->t->set_var('status_list',$this->status_format($this->status,False));
+                       
$this->t->set_var('status_list',$this->ui_base->status_format($this->status,False));

 // ---------------- list header variable template-declarations 
--------------------------

@@ -1490,8 +1490,7 @@
                                'menuaction'  => 
'projects.uiprojects.view_project',
                                'pro_main'    => $pro_main,
                                'action'      => $action,
-                               'project_id'  => $project_id,
-                               'public_view' => $public_view
+                               'project_id'  => $project_id
                        );

                        if($_POST['back'])
@@ -1504,50 +1503,13 @@
                                
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
                        }

-                       if($_POST['edit'])
-                       {
-                               $link_data['menuaction'] = 
'projects.uiprojects.edit_project';
-                               
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
-                       }
-                       if($_POST['mstone'])
-                       {
-                               $link_data['menuaction'] = 
'projects.uiprojects.project_mstones';
-                               
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
-                       }
-
-                       if($_POST['roles'])
-                       {
-                               $link_data['menuaction'] = 
'projects.uiprojects.assign_employee_roles';
-                               
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
-                       }
-
                        if($_POST['done'])
                        {
-                               if ($public_view)
-                               {
-                                       $menu = 
'projects.uiprojects.list_projects_home';
-                               }
-                               else
-                               {
-                                       $menu = 
'projects.uiprojects.list_projects';
-                               }
-                               $link_data['menuaction'] = $menu;
+                               $link_data['menuaction'] = 
'projects.uiprojects.list_projects';
                                
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
                        }

-                       if (isset($public_view))
-                       {
-                               $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . lang('view project')
-                                                                               
                                                . $this->admin_header_info();
-                               $GLOBALS['phpgw']->common->phpgw_header();
-                               echo parse_navbar();
-                               $this->set_app_langs();
-                       }
-                       else
-                       {
-                               //$this->display_app_header();
-                               $this->ui_base->display_app_header();
-                       }
+                       $this->ui_base->display_app_header();

                        $GLOBALS['phpgw']->template->set_file(array('view' => 
'view.tpl'));
                        
$GLOBALS['phpgw']->template->set_block('view','sub','subhandle');
@@ -1555,8 +1517,6 @@
                        
$GLOBALS['phpgw']->template->set_block('view','accounting_own','ownhandle');
                        
$GLOBALS['phpgw']->template->set_block('view','accounting_both','bothhandle');

-                       
$GLOBALS['phpgw']->template->set_block('view','nonanonym','nonanonymhandle');
-
                        
$GLOBALS['phpgw']->template->set_block('view','mslist','mslisthandle');
                        
$GLOBALS['phpgw']->template->set_block('view','emplist','emplisthandle');

@@ -1688,8 +1648,41 @@

 // --------- emps & roles ------------------------------

-                       $emps = 
$this->boprojects->get_employee_roles(array('project_id' => 
$project_id,'formatted' => True));
+                       $e_emps = 
$this->boprojects->get_employee_roles(array('project_id' => 
$project_id,'formatted' => True));
+                       $a_emps = 
$this->boprojects->selected_employees(array('project_id' => $project_id));

+                       if(is_array($a_emps))
+                       {
+                               $emps = array();
+                               foreach($a_emps as $null => $a)
+                               {
+                                       if(is_array($e_emps))
+                                       {
+                                               foreach($e_emps as $bla => $e)
+                                               {
+                                                       
if($a['account_id']==$e['account_id'])
+                                                       {
+                                                               $emps[] = $e;
+                                                       }
+                                                       else
+                                                       {
+                                                               $emps[] = array
+                                                               (
+                                                                       
'emp_name' => $a['account_fullname']
+                                                               );
+                                                       }
+                                               }
+                                       }
+                                       else
+                                       {
+                                               $emps[] = array
+                                               (
+                                                       'emp_name' => 
$a['account_fullname']
+                                               );
+                                       }
+                               }
+                       }
+                       //_debug_array($emps);
                        while (is_array($emps) && (list($no_use,$emp) = 
each($emps)))
                        {
                                
$GLOBALS['phpgw']->template->set_var('emp_name',$emp['emp_name']);
@@ -1698,59 +1691,48 @@
                                
$GLOBALS['phpgw']->template->fp('emplisthandle','emplist',True);
                        }

-                       if (!isset($public_view))
+                       if($this->boprojects->siteconfig['accounting'] == 'own')
                        {
-                               if($this->boprojects->siteconfig['accounting'] 
== 'own')
-                               {
-                                       
$GLOBALS['phpgw']->template->set_var('accounting_factor',($values['accounting']=='employee'?lang('factor
 employee'):lang('factor project')));
-                                       
$GLOBALS['phpgw']->template->set_var('project_accounting_factor',sprintf("%01.2f",$values['project_accounting_factor']));
-                                       
$GLOBALS['phpgw']->template->set_var('project_accounting_factor_d',sprintf("%01.2f",$values['project_accounting_factor_d']));
-                                       
$GLOBALS['phpgw']->template->set_var('billable',($values['billable']=='Y'?lang('yes'):lang('no')));
+                               
$GLOBALS['phpgw']->template->set_var('accounting_factor',($values['accounting']=='employee'?lang('factor
 employee'):lang('factor project')));
+                               
$GLOBALS['phpgw']->template->set_var('project_accounting_factor',sprintf("%01.2f",$values['project_accounting_factor']));
+                               
$GLOBALS['phpgw']->template->set_var('project_accounting_factor_d',sprintf("%01.2f",$values['project_accounting_factor_d']));
+                               
$GLOBALS['phpgw']->template->set_var('billable',($values['billable']=='Y'?lang('yes'):lang('no')));

-                                       
$GLOBALS['phpgw']->template->fp('accounting_settings','accounting_own',True);
-                               }
-                               else
-                               {
+                               
$GLOBALS['phpgw']->template->fp('accounting_settings','accounting_own',True);
+                       }
+                       else
+                       {
 // ------------ activites bookable ----------------------
-                                       $boact = 
$this->boprojects->activities_list($project_id,False);
-                                       if (is_array($boact))
+                               $boact = 
$this->boprojects->activities_list($project_id,False);
+                               if (is_array($boact))
+                               {
+                                       while (list($null,$bo) = each($boact))
                                        {
-                                               while (list($null,$bo) = 
each($boact))
-                                               {
-                                                       $boact_list .=  
$bo['descr'] . ' [' . $bo['num'] . ']' . '<br>';
-                                               }
+                                               $boact_list .=  $bo['descr'] . 
' [' . $bo['num'] . ']' . '<br>';
                                        }
+                               }

-                                       
$GLOBALS['phpgw']->template->set_var('book_activities_list',$boact_list);
+                               
$GLOBALS['phpgw']->template->set_var('book_activities_list',$boact_list);
 // -------------- activities billable ----------------------

-                                       $billact = 
$this->boprojects->activities_list($project_id,True);
-                                       if (is_array($billact))
+                               $billact = 
$this->boprojects->activities_list($project_id,True);
+                               if (is_array($billact))
+                               {
+                                       while (list($null,$bill) = 
each($billact))
                                        {
-                                               while (list($null,$bill) = 
each($billact))
-                                               {
-                                                       $billact_list .=        
$bill['descr'] . ' [' . $bill['num'] . ']' . "\n";
-                                               }
+                                               $billact_list .=        
$bill['descr'] . ' [' . $bill['num'] . ']' . "\n";
                                        }
-                                       
$GLOBALS['phpgw']->template->set_var('bill_activities_list',$billact_list);
-                                       
$GLOBALS['phpgw']->template->fp('accounting_settings','accounting_act',True);
                                }
-                               
$GLOBALS['phpgw']->template->fp('accounting_2settings','accounting_both',True);
-                               
$GLOBALS['phpgw']->template->fp('nonanonymhandle','nonanonym',True);
+                               
$GLOBALS['phpgw']->template->set_var('bill_activities_list',$billact_list);
+                               
$GLOBALS['phpgw']->template->fp('accounting_settings','accounting_act',True);
+                       }
+                       
$GLOBALS['phpgw']->template->fp('accounting_2settings','accounting_both',True);
+
                                /*$GLOBALS['phpgw']->hooks->process(array
                                (
                                        'location'   => 'projects_view',
                                        'project_id' => $project_id
                                ));*/
-
-                               if 
($this->boprojects->edit_perms(array('action' => $action,'coordinator' => 
$values['coordinator'],'main' => $values['main'],
-                                                                               
                        'parent' => $values['parent'])))
-                               {
-                                       
$GLOBALS['phpgw']->template->set_var('edit_button','<input type="submit" 
name="edit" value="' . lang('edit') .'">');
-                                       
$GLOBALS['phpgw']->template->set_var('edit_milestones_button','<input 
type="submit" name="mstone" value="' . lang('edit milestones') .'">');
-                                       
$GLOBALS['phpgw']->template->set_var('edit_roles_events_button','<input 
type="submit" name="roles" value="' . lang('edit roles and events') .'">');
-                               }
-                       }

                        
//$GLOBALS['phpgw']->template->set_var('attachment',$this->attached_files->get_files($project_id));


====================================================
Index: projects/inc/class.boprojects.inc.php
diff -u projects/inc/class.boprojects.inc.php:1.154 
projects/inc/class.boprojects.inc.php:1.155
--- projects/inc/class.boprojects.inc.php:1.154 Wed Mar 16 16:26:40 2005
+++ projects/inc/class.boprojects.inc.php       Tue Mar 29 14:46:57 2005
@@ -422,7 +422,7 @@
                        }
                }

-               function read_projectsmembers_acl($project_id = false)
+               function read_projectsmembers_acl($project_id = False)
                {
                        $members = 
$this->soprojects->get_acl_project_members($project_id);
                        return $members;
@@ -507,7 +507,7 @@
                                }
                        }

-                       if($data['admins_included'] == True)
+                       /*if($data['admins_included'] == True)
                        {
                                $co = 
$this->soprojects->return_value('co',$project_id?$project_id:$pro_parent);

@@ -521,7 +521,7 @@
                                {
                                        $emps[0] = $co;
                                }
-                       }
+                       }*/
                        //_debug_array($emps);

                        for($i=0;$i<count($emps);$i++)






reply via email to

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