[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php,1.44,1.45
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php,1.44,1.45 class.uiprojects.inc.php,1.51,1.52 |
Date: |
Tue, 21 May 2002 08:36:32 -0400 |
Update of /cvsroot/phpgroupware/projects/inc
In directory subversions:/tmp/cvs-serv7897/inc
Modified Files:
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.44
retrieving revision 1.45
diff -C2 -r1.44 -r1.45
*** class.boprojects.inc.php 3 May 2002 22:13:31 -0000 1.44
--- class.boprojects.inc.php 21 May 2002 12:36:30 -0000 1.45
***************
*** 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.51
retrieving revision 1.52
diff -C2 -r1.51 -r1.52
*** class.uiprojects.inc.php 14 Mar 2002 02:06:14 -0000 1.51
--- class.uiprojects.inc.php 21 May 2002 12:36:30 -0000 1.52
***************
*** 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
--------------------------
***************
*** 423,443 ****
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()
--- 453,456 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php,1.44,1.45 class.uiprojects.inc.php,1.51,1.52,
Bettina Gille <address@hidden> <=