phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php, 1.42.2.5.


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php, 1.42.2.5.2.32, 1.42.2.5.2.33 class.soprojects.inc.php, 1.34.2.6.2.30, 1.34.2.6.2.31 class.uiprojects.inc.php, 1.47.2.7.2.36, 1.47.2.7.2.37
Date: Fri, 19 Sep 2003 16:50:03 -0400

Update of /cvsroot/phpgroupware/projects/inc
In directory subversions:/tmp/cvs-serv13401/inc

Modified Files:
      Tag: Version-0_9_16-branch
        class.boprojects.inc.php class.soprojects.inc.php 
        class.uiprojects.inc.php 
Log Message:
update

Index: class.boprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.boprojects.inc.php,v
retrieving revision 1.42.2.5.2.32
retrieving revision 1.42.2.5.2.33
diff -C2 -r1.42.2.5.2.32 -r1.42.2.5.2.33
*** class.boprojects.inc.php    18 Sep 2003 23:38:13 -0000      1.42.2.5.2.32
--- class.boprojects.inc.php    19 Sep 2003 20:49:55 -0000      1.42.2.5.2.33
***************
*** 72,79 ****
                function boprojects($session=False, $action = '')
                {
!                       $this->so               = 
CreateObject('projects.soprojects');
!                       $this->sohours  = 
CreateObject('projects.soprojecthours');
!                       $this->contacts = CreateObject('phpgwapi.contacts');
!                       $this->cats             = 
CreateObject('phpgwapi.categories');
  
                        if ($session)
--- 72,79 ----
                function boprojects($session=False, $action = '')
                {
!                       $this->so                               = 
CreateObject('projects.soprojects');
!                       $this->sohours                  = 
CreateObject('projects.soprojecthours');
!                       $this->contacts                 = 
CreateObject('phpgwapi.contacts');
!                       $this->cats                             = 
CreateObject('phpgwapi.categories');
  
                        if ($session)
***************
*** 110,113 ****
--- 110,114 ----
                                unset($this->cat_id);
                        }
+                       $this->limit = True;
                }
  
***************
*** 433,437 ****
                                                                        (
                                                                                
'start'         => $this->start,
!                                                                               
'limit'         => True,
                                                                                
'query'         => $this->query,
                                                                                
'filter'        => $this->filter,
--- 434,438 ----
                                                                        (
                                                                                
'start'         => $this->start,
!                                                                               
'limit'         => $this->limit,
                                                                                
'query'         => $this->query,
                                                                                
'filter'        => $this->filter,

Index: class.soprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.soprojects.inc.php,v
retrieving revision 1.34.2.6.2.30
retrieving revision 1.34.2.6.2.31
diff -C2 -r1.34.2.6.2.30 -r1.34.2.6.2.31
*** class.soprojects.inc.php    18 Sep 2003 00:49:26 -0000      1.34.2.6.2.30
--- class.soprojects.inc.php    19 Sep 2003 20:49:55 -0000      1.34.2.6.2.31
***************
*** 165,168 ****
--- 165,172 ----
                                $filtermethod = ' coordinator=' . 
$this->account;
                        }
+                       elseif ($filter == 'public')
+                       {
+                               $filtermethod = " access != 'private' ";
+                       }
                        else
                        {

Index: class.uiprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.uiprojects.inc.php,v
retrieving revision 1.47.2.7.2.36
retrieving revision 1.47.2.7.2.37
diff -C2 -r1.47.2.7.2.36 -r1.47.2.7.2.37
*** class.uiprojects.inc.php    18 Sep 2003 00:49:26 -0000      1.47.2.7.2.36
--- class.uiprojects.inc.php    19 Sep 2003 20:49:55 -0000      1.47.2.7.2.37
***************
*** 41,44 ****
--- 41,45 ----
                (
                        'list_projects'         => True,
+                       'list_projects_home'    => True,
                        'edit_project'          => True,
                        'delete_pa'                     => True,
***************
*** 441,445 ****
                        }
  
!                       $this->set_app_langs();
  
                        $this->t = 
CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('projects'));
--- 442,456 ----
                        }
  
!                       $menuaction     = get_var('menuaction',Array('GET'));
!                       if ($menuaction)
!                       {
!                               $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . ($pro_main?lang('list jobs'):lang('list projects'));
!                               $GLOBALS['phpgw']->common->phpgw_header();
!                               echo parse_navbar();
!                       }
!                       else
!                       {
!                               $this->bo->cats->app_name = 'projects';
!                       }
  
                        $this->t = 
CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('projects'));
***************
*** 447,450 ****
--- 458,464 ----
                        
$this->t->set_block('projects_list_t','projects_list','list');
  
+                       
$this->t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
+ 
+ 
                        if (!$action)
                        {
***************
*** 459,467 ****
                        );
  
!                       if (! $this->status)
!                       {
!                               $this->status = 'active';
!                       }
  
                        $pro = $this->bo->list_projects($action,$pro_main);
  
--- 473,480 ----
                        );
  
!                       $this->status = 'active';
  
+                       $this->bo->filter = 'public';
+                       //$this->bo->limit = False;
                        $pro = $this->bo->list_projects($action,$pro_main);
  
***************
*** 479,484 ****
                        if ($action == 'mains')
                        {
!                               $action_list= '<form method="POST" action="' . 
$GLOBALS['phpgw']->link('/index.php',$link_data) . '" name="form">' . "\n"
!                                                       . '<select 
name="cat_id" onChange="this.form.submit();"><option value="none">' . 
lang('Select category') . '</option>' . "\n"
                                                        . 
$this->bo->cats->formatted_list('select','all',$this->cat_id,True) . 
'</select>';
                                $this->t->set_var('lang_action',lang('Jobs'));
--- 492,496 ----
                        if ($action == 'mains')
                        {
!                               $action_list= '<select name="cat_id" 
onChange="this.form.submit();"><option value="none">' . lang('Select category') 
. '</option>' . "\n"
                                                        . 
$this->bo->cats->formatted_list('select','all',$this->cat_id,True) . 
'</select>';
                                $this->t->set_var('lang_action',lang('Jobs'));
***************
*** 486,491 ****
                        else
                        {
!                               $action_list= '<form method="POST" action="' . 
$GLOBALS['phpgw']->link('/index.php',$link_data) .'" name="form">' . "\n"
!                                                       . '<select 
name="pro_main" onChange="this.form.submit();"><option value="">' . 
lang('Select main project') . '</option>' . "\n"
                                                        . 
$this->bo->select_project_list(array('status' => $status, 'selected' => 
$pro_main)) . '</select>';
                                $this->t->set_var('lang_action',lang('Work 
hours'));
--- 498,502 ----
                        else
                        {
!                               $action_list= '<select name="pro_main" 
onChange="this.form.submit();"><option value="">' . lang('Select main project') 
. '</option>' . "\n"
                                                        . 
$this->bo->select_project_list(array('status' => $status, 'selected' => 
$pro_main)) . '</select>';
                                $this->t->set_var('lang_action',lang('Work 
hours'));
***************
*** 493,501 ****
  
                        $this->t->set_var('action_list',$action_list);
!                       
$this->t->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$this->t->set_var('filter_list',$this->nextmatchs->new_filter($this->filter));
!                       
$this->t->set_var('search_action',$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_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        
$this->t->set_var('status_list',$this->status_format($this->status));
  
--- 504,509 ----
  
                        $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));
  
***************
*** 543,559 ****
  
                                $link_data['project_id'] = 
$pro[$i]['project_id'];
! 
!                               if 
($this->bo->check_perms($this->grants[$pro[$i]['coordinator']],PHPGW_ACL_EDIT) 
|| $pro[$i]['coordinator'] == $this->account)
!                               {
!                                       $link_data['menuaction'] = 
'projects.uiprojects.edit_project';
!                                       
$this->t->set_var('edit',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                                       
$this->t->set_var('lang_edit_entry',lang('Edit'));
!                               }
!                               else
!                               {
!                                       $this->t->set_var('edit','');
!                                       
$this->t->set_var('lang_edit_entry','&nbsp;');
!                               }
! 
                                $link_data['menuaction'] = 
'projects.uiprojects.view_project';
                                
$this->t->set_var('view',$GLOBALS['phpgw']->link('/index.php',$link_data));
--- 551,555 ----
  
                                $link_data['project_id'] = 
$pro[$i]['project_id'];
!                               $link_data['public_view'] = True;
                                $link_data['menuaction'] = 
'projects.uiprojects.view_project';
                                
$this->t->set_var('view',$GLOBALS['phpgw']->link('/index.php',$link_data));
***************
*** 562,574 ****
                                if ($action == 'mains')
                                {
!                                       
$this->t->set_var('action_entry',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_projects&pro_main='
                                                                                
. $pro[$i]['project_id'] . '&action=subs'));
!                                       
$this->t->set_var('lang_action_entry',lang('Jobs'));
                                }
                                else
                                {
!                                       $link_data['menuaction'] = 
'projects.uiprojecthours.list_hours';
!                                       
$this->t->set_var('action_entry',$GLOBALS['phpgw']->link('/index.php',$link_data));
 
!                                       
$this->t->set_var('lang_action_entry',lang('Work hours'));
                                }
  
--- 558,569 ----
                                if ($action == 'mains')
                                {
!                                       
$this->t->set_var('jobs',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_projects_home&pro_main='
                                                                                
. $pro[$i]['project_id'] . '&action=subs'));
!                                       
$this->t->set_var('lang_jobs_entry',lang('Jobs'));
                                }
                                else
                                {
!                                       $this->t->set_var('action_entry',''); 
!                                       
$this->t->set_var('lang_action_entry','');
                                }
  
***************
*** 579,583 ****
  
                        $this->save_sessiondata($action);
!                       return $this->t->fp('out','projects_list_t',True);
                }
  
--- 574,589 ----
  
                        $this->save_sessiondata($action);
! 
!                       $menuaction     = get_var('menuaction',Array('GET'));
!                       if ($menuaction)
!                       {
!                               list($app,$class,$method) = 
explode('.',$menuaction);
!                               $var['app_tpl'] = $method;
!                               $this->t->pfp('out','projects_list_t',True);
!                       }
!                       else
!                       {
!                               return 
$this->t->fp('out','projects_list_t',True);
!                       }
                }
  
***************
*** 995,1005 ****
                function view_project()
                {
!                       $action         = get_var('action',array('GET'));
!                       $pro_main       = get_var('pro_main',array('GET'));
!                       $project_id     = get_var('project_id',array('GET'));
  
                        $link_data = array
                        (
!                               'menuaction'    => 
'projects.uiprojects.list_projects',
                                'pro_main'              => $pro_main,
                                'action'                => $action,
--- 1001,1027 ----
                function view_project()
                {
!                       $action                 = $_GET['action'];
!                       $pro_main               = $_GET['pro_main'];
!                       $project_id             = $_GET['project_id'];
!                       $public_view    = $_GET['public_view'];
! 
!                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . ($pro_main?lang('view job'):lang('view project'));
! 
!                       if (isset($public_view))
!                       {
!                               $menuaction = 
'projects.uiprojects.list_projects_home';
!                               $GLOBALS['phpgw']->common->phpgw_header();
!                               echo parse_navbar();
!                               $this->set_app_langs();
!                       }
!                       else
!                       {
!                               $menuaction = 
'projects.uiprojects.list_projects';
!                               $this->display_app_header();
!                       }
  
                        $link_data = array
                        (
!                               'menuaction'    => $menuaction,
                                'pro_main'              => $pro_main,
                                'action'                => $action,
***************
*** 1007,1013 ****
                        );
  
-                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . ($pro_main?lang('view job'):lang('view project'));
-                       $this->display_app_header();
- 
                        $GLOBALS['phpgw']->template->set_file(array('view' => 
'view.tpl'));
                        
$GLOBALS['phpgw']->template->set_block('view','mslist','mslisthandle');
--- 1029,1032 ----
***************
*** 1109,1114 ****
                        {
                                $customer = 
$this->bo->read_single_contact($values['customer']);
!               if ($customer[0]['org_name'] == '') { $customerout = 
$customer[0]['n_given'] . ' ' . $customer[0]['n_family']; }
!               else { $customerout = $customer[0]['org_name'] . ' [ ' . 
$customer[0]['n_given'] . ' ' . $customer[0]['n_family'] . ' ]'; }
                        }
                        else { $customerout = '&nbsp;'; }
--- 1128,1133 ----
                        {
                                $customer = 
$this->bo->read_single_contact($values['customer']);
!               if ($customer[0]['org_name'] == '') { $customerout = 
$customer[0]['per_last_name'] . ' ' . $customer[0]['per_first_name']; }
!               else { $customerout = $customer[0]['org_name'] . ' [ ' . 
$customer[0]['per_first_name'] . ' ' . $customer[0]['per_last_name'] . ' ]'; }
                        }
                        else { $customerout = '&nbsp;'; }





reply via email to

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