[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: projects/inc hook_home.inc.php, NONE, 1.1 class.
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: projects/inc hook_home.inc.php, NONE, 1.1 class.uiprojects.inc.php, 1.68, 1.69 |
Date: |
Mon, 15 Sep 2003 20:50:25 -0400 |
Update of /cvsroot/phpgroupware/projects/inc
In directory subversions:/tmp/cvs-serv18126/inc
Modified Files:
class.uiprojects.inc.php
Added Files:
hook_home.inc.php
Log Message:
hook_home
***** Error reading new file: [Errno 2] No such file or directory:
'hook_home.inc.php'
Index: class.uiprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.uiprojects.inc.php,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -r1.68 -r1.69
*** class.uiprojects.inc.php 15 Sep 2003 00:53:28 -0000 1.68
--- class.uiprojects.inc.php 16 Sep 2003 00:50:22 -0000 1.69
***************
*** 429,432 ****
--- 429,583 ----
}
+ function list_projects_home()
+ {
+ $action = get_var('action',array('POST','GET'));
+ $pro_main =
get_var('pro_main',array('POST','GET'));
+
+ if ($_GET['cat_id'])
+ {
+ $this->cat_id = $_GET['cat_id'];
+ }
+
+ $this->set_app_langs();
+
+ $this->t =
CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('projects'));
+ $this->t->set_file(array('projects_list_t' =>
'home_list.tpl'));
+
$this->t->set_block('projects_list_t','projects_list','list');
+
+ if (!$action)
+ {
+ $action = 'mains';
+ }
+
+ $link_data = array
+ (
+ 'menuaction' =>
'projects.uiprojects.list_projects_home',
+ 'pro_main' => $pro_main,
+ 'action' => $action
+ );
+
+ if (! $this->status)
+ {
+ $this->status = 'active';
+ }
+
+ $pro = $this->bo->list_projects($action,$pro_main);
+
+ // --------------------- nextmatch variable template-declarations
------------------------
+
+ $left =
$this->nextmatchs->left('/index.php',$this->start,$this->bo->total_records,$link_data);
+ $right =
$this->nextmatchs->right('/index.php',$this->start,$this->bo->total_records,$link_data);
+ $this->t->set_var('left',$left);
+ $this->t->set_var('right',$right);
+
+
$this->t->set_var('lang_showing',$this->nextmatchs->show_hits($this->bo->total_records,$this->start));
+
+ // ------------------------- end nextmatch template
--------------------------------------
+
+ 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'));
+ }
+ 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'));
+ }
+
+ $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));
+
+ // ---------------- list header variable template-declarations
--------------------------
+
+
$this->t->set_var('sort_number',$this->nextmatchs->show_sort_order($this->sort,'num',$this->order,'/index.php',lang('Project
ID'),$link_data));
+ $this->t->set_var('lang_milestones',lang('milestones'));
+
$this->t->set_var('sort_title',$this->nextmatchs->show_sort_order($this->sort,'title',$this->order,'/index.php',lang('Title'),$link_data));
+
$this->t->set_var('sort_end_date',$this->nextmatchs->show_sort_order($this->sort,'end_date',$this->order,'/index.php',lang('Date
due'),$link_data));
+
$this->t->set_var('sort_coordinator',$this->nextmatchs->show_sort_order($this->sort,'coordinator',$this->order,'/index.php',lang('Coordinator'),$link_data));
+
+
+ // -------------- end header declaration
---------------------------------------
+
+ for ($i=0;$i<count($pro);$i++)
+ {
+
$this->nextmatchs->template_alternate_row_color(&$this->t);
+ $edateout =
$this->bo->formatted_edate($pro[$i]['edate']);
+
+ if ($action == 'mains')
+ {
+ $td_action =
($pro[$i]['customerout']?$pro[$i]['customerout']:' ');
+ }
+ else
+ {
+ $td_action =
($pro[$i]['sdateout']?$pro[$i]['sdateout']:' ');
+ }
+
+ if ($pro[$i]['level'] > 0)
+ {
+ $space = ' . ';
+ $spaceset =
str_repeat($space,$pro[$i]['level']);
+ }
+
+ // --------------- template declaration for list records
-------------------------------------
+
+ $this->t->set_var(array
+ (
+ 'number' =>
$pro[$i]['number'],
+ 'milestones' =>
(isset($pro[$i]['mstones'])?$pro[$i]['mstones']:' '),
+ 'title' => $spaceset .
($pro[$i]['title']?$pro[$i]['title']:' '),
+ 'end_date' =>
(isset($pro[$i]['edate'])?$edateout:' '),
+ 'coordinator' =>
$pro[$i]['coordinatorout']
+ ));
+
+ $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',' ');
+ }
+
+ $link_data['menuaction'] =
'projects.uiprojects.view_project';
+
$this->t->set_var('view',$GLOBALS['phpgw']->link('/index.php',$link_data));
+
$this->t->set_var('lang_view_entry',lang('View'));
+
+ 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'));
+ }
+
+ $this->t->fp('list','projects_list',True);
+ }
+
+ // ------------------------- end record declaration ------------------------
+
+ $this->save_sessiondata($action);
+ return $this->t->fp('out','projects_list_t',True);
+ }
+
function coordinator_format($employee = '')
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: projects/inc hook_home.inc.php, NONE, 1.1 class.uiprojects.inc.php, 1.68, 1.69,
Bettina Gille <address@hidden> <=