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.1,1


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php,1.42.2.1,1.42.2.2 class.uiprojects.inc.php,1.47.2.3,1.47.2.4
Date: Tue, 21 May 2002 08:37:22 -0400

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

Modified Files:
      Tag: Version-0_9_14-branch
        class.boprojects.inc.php class.uiprojects.inc.php 
Log Message:
added status select box

Index: class.boprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.boprojects.inc.php,v
retrieving revision 1.42.2.1
retrieving revision 1.42.2.2
diff -C2 -r1.42.2.1 -r1.42.2.2
*** class.boprojects.inc.php    3 May 2002 22:13:50 -0000       1.42.2.1
--- class.boprojects.inc.php    21 May 2002 12:37:19 -0000      1.42.2.2
***************
*** 34,37 ****
--- 34,38 ----
                var $sort;
                var $cat_id;
+               var $status;
  
                var $public_functions = array
***************
*** 78,82 ****
                        }
  
!                       global $start, $query, $filter, $order, $sort, $cat_id;
  
                        if(isset($start)) { $this->start = $start; }
--- 79,89 ----
                        }
  
!                       $start  = $GLOBALS['HTTP_POST_VARS']['start'] ? 
$GLOBALS['HTTP_POST_VARS']['start'] : $GLOBALS['HTTP_GET_VARS']['start'];
!                       $query  = $GLOBALS['HTTP_POST_VARS']['query'] ? 
$GLOBALS['HTTP_POST_VARS']['query'] : $GLOBALS['HTTP_GET_VARS']['query'];
!                       $sort   = $GLOBALS['HTTP_POST_VARS']['sort'] ? 
$GLOBALS['HTTP_POST_VARS']['sort'] : $GLOBALS['HTTP_GET_VARS']['sort'];
!                       $order  = $GLOBALS['HTTP_POST_VARS']['order'] ? 
$GLOBALS['HTTP_POST_VARS']['order'] : $GLOBALS['HTTP_GET_VARS']['order'];
!                       $cat_id = $GLOBALS['HTTP_POST_VARS']['cat_id'] ? 
$GLOBALS['HTTP_POST_VARS']['cat_id'] : $GLOBALS['HTTP_GET_VARS']['cat_id'];
!                       $filter = $GLOBALS['HTTP_POST_VARS']['filter'] ? 
$GLOBALS['HTTP_POST_VARS']['filter'] : $GLOBALS['HTTP_GET_VARS']['filter'];
!                       $status = $GLOBALS['HTTP_POST_VARS']['status'] ? 
$GLOBALS['HTTP_POST_VARS']['status'] : $GLOBALS['HTTP_GET_VARS']['status'];
  
                        if(isset($start)) { $this->start = $start; }
***************
*** 86,89 ****
--- 93,103 ----
                        if(isset($order)) { $this->order = $order; }
                        if(isset($cat_id)) { $this->cat_id = $cat_id; }
+ 
+                       if ($cat_id == 'none')
+                       {
+                               $this->cat_id = '';
+                       }
+ 
+                       if(isset($status)) { $this->status = $status; }
                }
  
***************
*** 124,127 ****
--- 138,142 ----
                        $this->sort             = $data['sort'];
                        $this->cat_id   = $data['cat_id'];
+                       $this->status   = $data['status'];
                }
  

Index: class.uiprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.uiprojects.inc.php,v
retrieving revision 1.47.2.3
retrieving revision 1.47.2.4
diff -C2 -r1.47.2.3 -r1.47.2.4
*** class.uiprojects.inc.php    13 Mar 2002 21:32:20 -0000      1.47.2.3
--- class.uiprojects.inc.php    21 May 2002 12:37:19 -0000      1.47.2.4
***************
*** 34,37 ****
--- 34,38 ----
                var $order;
                var $cat_id;
+               var $status;
  
                var $public_functions = array
***************
*** 71,74 ****
--- 72,76 ----
                        $this->sort                                             
= $this->boprojects->sort;
                        $this->cat_id                                   = 
$this->boprojects->cat_id;
+                       $this->status                                   = 
$this->boprojects->status;
                }
  
***************
*** 82,86 ****
                                'order'         => $this->order,
                                'sort'          => $this->sort,
!                               'cat_id'        => $this->cat_id
                        );
                        $this->boprojects->save_sessiondata($data, $action);
--- 84,89 ----
                                'order'         => $this->order,
                                'sort'          => $this->sort,
!                               'cat_id'        => $this->cat_id,
!                               'status'        => $this->status
                        );
                        $this->boprojects->save_sessiondata($data, $action);
***************
*** 167,170 ****
--- 170,193 ----
                }
  
+               function status_format()
+               {
+                       if (! $this->status)
+                       {
+                               $this->status = 'active';
+                       }
+ 
+                       switch ($this->status)
+                       {
+                               case 'active':          $stat_sel[0]=' 
selected'; break;
+                               case 'nonactive':       $stat_sel[1]=' 
selected'; break;
+                               case 'archive':         $stat_sel[2]=' 
selected'; break;
+                       }
+ 
+                       $status_list = '<option value="active"' . $stat_sel[0] 
. '>' . lang('Active') . '</option>' . "\n"
+                                               . '<option value="nonactive"' . 
$stat_sel[1] . '>' . lang('Nonactive') . '</option>' . "\n"
+                                               . '<option value="archive"' . 
$stat_sel[2] . '>' . lang('Archive') . '</option>' . "\n";
+                       return $status_list;
+               }
+ 
                function list_projects()
                {
***************
*** 194,197 ****
--- 217,225 ----
                        }
  
+                       if (! $this->status)
+                       {
+                               $this->status = 'active';
+                       }
+ 
                        if (!$pro_parent)
                        {
***************
*** 199,203 ****
                        }
  
!                       $pro = 
$this->boprojects->list_projects($this->start,True,$this->query,$this->filter,$this->sort,$this->order,'active',$this->cat_id,$action,$pro_parent);
  
  // --------------------- nextmatch variable template-declarations 
------------------------
--- 227,231 ----
                        }
  
!                       $pro = 
$this->boprojects->list_projects($this->start,True,$this->query,$this->filter,$this->sort,$this->order,$this->status,$this->cat_id,$action,$pro_parent);
  
  // --------------------- nextmatch variable template-declarations 
------------------------
***************
*** 215,219 ****
                        {
                                $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="">' . lang('None') 
. '</option>' . "\n"
                                                        . 
$this->cats->formated_list('select','all',$this->cat_id,True) . '</select>';
                                $this->t->set_var(lang_header,lang('Project 
list'));
--- 243,247 ----
                        {
                                $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->cats->formated_list('select','all',$this->cat_id,True) . '</select>';
                                $this->t->set_var(lang_header,lang('Project 
list'));
***************
*** 234,237 ****
--- 262,267 ----
                        
$this->t->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        
$this->t->set_var('search_list',$this->nextmatchs->search(array('search_obj' => 
1,'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());
  
  // ---------------- list header variable template-declarations 
--------------------------
***************
*** 425,445 ****
                        return $coordinator_list;
                }
- 
-               function status_format($status = '')
-               {
-                       switch ($status)
-                       {
-                               case 'active':          $stat_sel[0]=' 
selected'; break;
-                               case 'nonactive':       $stat_sel[1]=' 
selected'; break;
-                               case 'archive':         $stat_sel[2]=' 
selected'; break;
-                       }
- 
-                       $status_list = '<option value="active"' . $stat_sel[0] 
. '>' . lang('Active') . '</option>' . "\n"
-                                               . '<option value="nonactive"' . 
$stat_sel[1] . '>' . lang('Nonactive') . '</option>' . "\n"
-                                               . '<option value="archive"' . 
$stat_sel[2] . '>' . lang('Archive') . '</option>' . "\n";
-                       return $status_list;
-               }
- 
- 
  
                function add_project()
--- 455,458 ----




reply via email to

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