3 * GForge Project Management Facility
5 * Copyright 2002 GForge, LLC
13 By Tim Perdue, Sourceforge, 11/99
14 Heavy rewrite by Tim Perdue April 2000
16 Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
19 //pm_header(array('title'=>'Browse Tasks','pagename'=>$pagename,'group_project_id'=>$group_project_id,'sectionvals'=>$g->getPublicName()));
23 <?php echo '<?xml version="1.0" encoding="UTF-8"?>';?>
26 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
27 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
29 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en ">
32 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
33 <title><?php echo $Language->getText('pm_include_grouphtml', 'gantt_chart');?></title>
38 creating a custom technician box which includes "any" and "unassigned"
41 $res_tech=$pg->getTechnicians();
43 $tech_id_arr=util_result_column_to_array($res_tech,0);
44 $tech_id_arr[]='0'; //this will be the 'any' row
46 $tech_name_arr=util_result_column_to_array($res_tech,1);
47 $tech_name_arr[]=$Language->getText('pm','tech_any');
49 if ( empty($_assigned_to) ) {
52 $tech_box=html_build_select_box_from_arrays ($tech_id_arr,$tech_name_arr,'_assigned_to',$_assigned_to,true,$Language->getText('pm','unassigned'));
55 creating a custom category box which includes "any" and "none"
58 $res_cat=$pg->getCategories();
60 $cat_id_arr=util_result_column_to_array($res_cat,0);
61 $cat_id_arr[]='0'; //this will be the 'any' row
63 $cat_name_arr=util_result_column_to_array($res_cat,1);
64 $cat_name_arr[]=$Language->getText('pm','cat_any');
66 $cat_box=html_build_select_box_from_arrays ($cat_id_arr,$cat_name_arr,'_category_id',$_category_id,true,$Language->getText('pm','none').$Language->getText('pm','none'));
69 Creating a custom sort box
72 $title_arr[]=$Language->getText('pm','task_id');
73 $title_arr[]=$Language->getText('pm','summary');
74 $title_arr[]=$Language->getText('pm','start_date');
75 $title_arr[]=$Language->getText('pm','end_date');
76 $title_arr[]=$Language->getText('pm','percent_complete');
78 $order_col_arr=array();
79 $order_col_arr[]='project_task_id';
80 $order_col_arr[]='summary';
81 $order_col_arr[]='start_date';
82 $order_col_arr[]='end_date';
83 $order_col_arr[]='percent_complete';
84 $order_box=html_build_select_box_from_arrays ($order_col_arr,$title_arr,'_order',$_order,false);
86 $dispres_title_arr=array();
87 $dispres_title_arr[]=$Language->getText('pm_ganttpage','months');
88 $dispres_title_arr[]=$Language->getText('pm_ganttpage','weeks');
89 $dispres_title_arr[]=$Language->getText('pm_ganttpage','days');
91 $_resolution=$Language->getText('pm_ganttpage','months');
93 $dispres_box=html_build_select_box_from_arrays ($dispres_title_arr,$dispres_title_arr,'_resolution',$_resolution,false);
98 $size_col_arr=array();
101 $size_col_arr[]=1024;
102 $size_col_arr[]=1600;
104 $size_title_arr=array();
105 $size_title_arr[]='640 x 480';
106 $size_title_arr[]='800 x 600';
107 $size_title_arr[]='1024 x 768';
108 $size_title_arr[]='1600 x 1200';
112 $size_box=html_build_select_box_from_arrays ($size_col_arr,$size_title_arr,'_size',$_size,false);
119 Show the new pop-up boxes to select assigned to and/or status
125 } elseif ($_size==1024) {
128 } elseif ($_size==1600) {
135 //echo "XX $_size $gantt_width $gantt_height XX";
137 <script type="text/javascript">
139 function setSize(width,height) {
140 if (window.outerWidth) {
141 window.outerWidth = width;
142 window.outerHeight = height;
145 else if (window.resizeTo) {
146 window.resizeTo(width,height);
149 alert("Not supported.");
152 window.setSize(<?php echo $gantt_width; ?>,<?php echo $gantt_height; ?>);
157 echo ' <form action="'. getStringFromServer('PHP_SELF') .'?group_id='.$group_id.'&group_project_id='.$group_project_id.'&func=ganttpage" method="post">
158 <table width="10%" border="0" class="tableheading">
160 <td>'.$Language->getText('pm_ganttpage','assignee').':<br />'. $tech_box .'</td>
161 <td>'.$Language->getText('pm','status').':<br />'. $pg->statusBox('_status',$_status,'Any') .'</td>
162 <td>'.$Language->getText('pm','category').':<br />'. $cat_box .'</td>
163 <td>'.$Language->getText('pm_ganttpage','sort_on').':<br />'. $order_box .'</td>
164 <td>'.$Language->getText('pm_ganttpage','resolution').':<br />'. $dispres_box .'</td>
165 <td>'.$Language->getText('pm_ganttpage','size').':<br />'. $size_box .'</td>
166 <td><input type="submit" name="submit" value="'.$Language->getText('general','browse').'" /></td>
167 </tr></table></form>';
169 echo '<img src="'. getStringFromServer('PHP_SELF') .
170 '?func=ganttchart&group_id='.$group_id.
171 '&group_project_id='.$group_project_id.
172 '&_assigned_to='.$_assigned_to.
173 '&_status='.$_status.
174 '&_order='.$_order.
175 '&_resolution='.$_resolution.
176 '&_category_id='.$_category_id.
177 '&_size='.$_size.
178 '&rand='.time().'" alt="'. $Language->getText('pm_include_grouphtml', 'gantt_chart').'" />';
180 //pm_footer(array());