phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] projects/inc class.uistatistics.inc.php, 1.59 class.u


From: ceb
Subject: [Phpgroupware-cvs] projects/inc class.uistatistics.inc.php, 1.59 class.uiprojects_base.inc.php, 1.8
Date: Thu, 31 Mar 2005 17:50:00 +0200

Update of projects/inc

Modified Files:
     Branch: MAIN
            class.uistatistics.inc.php lines: +10 -44
            class.uiprojects_base.inc.php lines: +3 -3

Log Message:
update

====================================================
Index: projects/inc/class.uistatistics.inc.php
diff -u projects/inc/class.uistatistics.inc.php:1.58 
projects/inc/class.uistatistics.inc.php:1.59
--- projects/inc/class.uistatistics.inc.php:1.58        Tue Mar 15 01:10:42 2005
+++ projects/inc/class.uistatistics.inc.php     Thu Mar 31 15:50:49 2005
@@ -1156,10 +1156,6 @@
                        );

                        
$GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
-                       
$GLOBALS['phpgw']->template->set_var('lang_workhours',lang('work hours'));
-                       
$GLOBALS['phpgw']->template->set_var('lang_workhours_project', lang('Project'));
-                       
$GLOBALS['phpgw']->template->set_var('lang_workhours_journey', lang('time of 
journey'));
-                       
$GLOBALS['phpgw']->template->set_var('lang_workhours_sum', lang('Sum'));

                        if(!isset($values['employee']))
                        {
@@ -1170,50 +1166,23 @@

                        if ($this->boprojects->isprojectadmin('pad') || 
$this->boprojects->isprojectadmin('pmanager'))
                        {
-                               $employees = 
$this->boprojects->read_projects_acl();
-                               $employees_list = array();
-
-                               while (is_array($employees) && 
(list($no_use,$account_id) = each($employees)))
-                               {
-                                       
$GLOBALS['phpgw']->accounts->get_account_name($account_id,$lid,$fname,$lname);
-                                       if(!$fname && !$lname)
-                                               continue;
-                                       $employees_list[$account_id] = 
$GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname);
-                               }
-
-                               if(count($employees_list))
-                               {
-                                       asort($employees_list);
-                                       reset($employees_list);
-                               }
-
-                               $select_employee_list = "<select 
name=\"values[employee]\" size=\"1\">\n";
-                               while (list($account_id,$account_name) = 
each($employees_list))
-                               {
-                                       $select_employee_list .= '<option 
value="' . $account_id . '"';
-                                       if ($values['employee'] == $account_id)
-                                       {
-                                               $select_employee_list .= ' 
selected';
-                                       }
-                                       $select_employee_list .= 
'>'.$account_name."</option>\n";
-                               }
+                               $select_employee_list = '<select 
name="values[employee]" size="1">' . "\n";
+                               $select_employee_list .= 
$this->ui_base->employee_format(array('selected' => $values['employee']));
                                $select_employee_list .= '</select>';
                        }
                        else
                        {
                                // show only current user
-                               $account_id = 
$GLOBALS['phpgw_info']['user']['account_id'];
-                               
$GLOBALS['phpgw']->accounts->get_account_name($account_id,$lid,$fname,$lname);
-                               $select_employee_list = '<input type="hidden" 
name="values[employee]" value="'.$account_id.'">'. 
$GLOBALS['phpgw']->common->display_fullname($lid,$fname,$lname);
+                               $select_employee_list = '<input type="hidden" 
name="values[employee]" value="'.$account_id.'">'. 
$GLOBALS['phpgw']->common->grab_owner_name($this->account);
                        }
-
+
                        
$GLOBALS['phpgw']->template->set_var('select_employee_list', 
$select_employee_list);

 // --------------- end employee selectbox template 
---------------------------------

 // ------------ action selectbox variable template-declarations 
---------------------

-                       $select_action_list = "<select 
name=\"values[stat_action]\" size=\"1\">\n";
+                       $select_action_list = '<select 
name="values[stat_action]" size="1">' . "\n";

                        $actions = array(
                                'pro_all'      => lang('all'),
@@ -1328,6 +1297,7 @@
                                        $project_hj = 
$this->boprojects->format_minutes($project['sum_minutes_journey']);
                                        $project_hs = 
$this->boprojects->format_minutes($project['sum_minutes_all']);

+                                       
$this->nextmatchs->template_alternate_row_color(&$GLOBALS['phpgw']->template);
                                        
$GLOBALS['phpgw']->template->set_var('pro_name', $project['project_title']);
                                        
$GLOBALS['phpgw']->template->set_var('pro_hours', $project_hw);
                                        
$GLOBALS['phpgw']->template->set_var('pro_hours_journey', $project_hj);
@@ -1341,16 +1311,12 @@
                                        
$GLOBALS['phpgw']->template->fp('project_list','pro', true);
                                        
$GLOBALS['phpgw']->template->set_var('pro', '');

-                                       
$GLOBALS['phpgw']->template->set_var('lang_summery', lang('Summary'));
-                                       
$GLOBALS['phpgw']->template->set_var('lang_summery_workhours_project', 
$this->boprojects->format_minutes($summary_sum_minutes_worktime));
-                                       
$GLOBALS['phpgw']->template->set_var('lang_summery_workhours_journey', 
$this->boprojects->format_minutes($summary_sum_minutes_journey));
-                                       
$GLOBALS['phpgw']->template->set_var('lang_summery_workhours_sum', 
$this->boprojects->format_minutes($summary_sum_minutes_all));
+                                       
$GLOBALS['phpgw']->template->set_var('summery_workhours_project', 
$this->boprojects->format_minutes($summary_sum_minutes_worktime));
+                                       
$GLOBALS['phpgw']->template->set_var('summery_workhours_journey', 
$this->boprojects->format_minutes($summary_sum_minutes_journey));
+                                       
$GLOBALS['phpgw']->template->set_var('summery_workhours_sum', 
$this->boprojects->format_minutes($summary_sum_minutes_all));
                                }
-
                                
$GLOBALS['phpgw']->template->fp('work','worktime_list', true);
-
                        }
-
                        
$GLOBALS['phpgw']->template->pfp('out','user_list_worktimes_t',True);
                }
        }

====================================================
Index: projects/inc/class.uiprojects_base.inc.php
diff -u projects/inc/class.uiprojects_base.inc.php:1.7 
projects/inc/class.uiprojects_base.inc.php:1.8
--- projects/inc/class.uiprojects_base.inc.php:1.7      Wed Mar 30 15:53:38 2005
+++ projects/inc/class.uiprojects_base.inc.php  Thu Mar 31 15:50:49 2005
@@ -940,7 +940,7 @@
                        
$GLOBALS['phpgw']->template->set_var('lang_delete',lang('delete'));
                        
$GLOBALS['phpgw']->template->set_var('lang_back',lang('back'));

-
+                       
$GLOBALS['phpgw']->template->set_var('lang_details',lang('details'));

                        
$GLOBALS['phpgw']->template->set_var('lang_parent',lang('Parent project'));
                        
$GLOBALS['phpgw']->template->set_var('lang_main',lang('Main project'));
@@ -987,7 +987,7 @@
                        
$GLOBALS['phpgw']->template->set_var('lang_plan_bottom_up',lang('plan bottom 
up'));
                        
$GLOBALS['phpgw']->template->set_var('lang_direct_work',lang('direct work'));
                        
$GLOBALS['phpgw']->template->set_var('lang_sum',lang('Sum'));
-
+                       $GLOBALS['phpgw']->template->set_var('lang_summery', 
lang('Summary'));

                        // hours







reply via email to

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