3 * GForge Project Management Facility
5 * Copyright 2002 GForge, LLC
12 By Tim Perdue, Sourceforge, 11/99
13 Heavy rewrite by Tim Perdue April 2000
15 Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
20 <?php echo '<?xml version="1.0" encoding="UTF-8"?>';?>
23 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
24 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
26 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en ">
29 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
30 <title><?php echo _('Gantt Chart');?></title>
35 $_assigned_to = getIntFromRequest('_assigned_to', 0);
36 $_category_id = getIntFromRequest('_category_id');
37 $_order = getIntFromRequest('_order');
38 $_resolution = getStringFromRequest('_resolution');
39 $_size = getIntFromRequest('_size', 800);
40 $_status = getIntFromRequest('_status', 100);
41 $_order = getStringFromRequest('_order');
43 $tech_box=html_build_select_box($pg->getTechnicians(),'_assigned_to',$_assigned_to,true,_('Unassigned'), true, _('Any'));
45 $status_box=html_build_select_box($pg->getStatuses(),'_status',$_status, false, '', true, _('Any'));
47 $cat_box=html_build_select_box($pg->getCategories(), '_category_id', $_category_id, true, _('None'), true, _('Any'));
50 Creating a custom sort box
53 $title_arr[]=_('Task Id');
54 $title_arr[]=_('Task Summary');
55 $title_arr[]=_('Start Date');
56 $title_arr[]=_('End Date');
57 $title_arr[]=_('Percent Complete');
59 $order_col_arr=array();
60 $order_col_arr[]='project_task_id';
61 $order_col_arr[]='summary';
62 $order_col_arr[]='start_date';
63 $order_col_arr[]='end_date';
64 $order_col_arr[]='percent_complete';
65 $order_box=html_build_select_box_from_arrays ($order_col_arr,$title_arr,'_order',$_order,false);
67 $dispres_col_arr=array();
68 $dispres_col_arr[]='Years';
69 $dispres_col_arr[]='Months';
70 $dispres_col_arr[]='Weeks';
71 $dispres_col_arr[]='Days';
73 $dispres_title_arr=array();
74 $dispres_title_arr[]=_('Years');
75 $dispres_title_arr[]=_('Months');
76 $dispres_title_arr[]=_('Weeks');
77 $dispres_title_arr[]=_('Days');
79 $_resolution=_('Months');
81 $dispres_box=html_build_select_box_from_arrays ($dispres_col_arr,$dispres_title_arr,'_resolution',$_resolution,false);
86 $size_col_arr=array();
92 $size_title_arr=array();
93 $size_title_arr[]='640 x 480';
94 $size_title_arr[]='800 x 600';
95 $size_title_arr[]='1024 x 768';
96 $size_title_arr[]='1600 x 1200';
98 $size_box=html_build_select_box_from_arrays ($size_col_arr,$size_title_arr,'_size',$_size,false);
101 Show the new pop-up boxes to select assigned to and/or status
107 } elseif ($_size==1024) {
110 } elseif ($_size==1600) {
117 //echo "XX $_size $gantt_width $gantt_height XX";
119 <script type="text/javascript">
121 function setSize(width,height) {
122 if (window.outerWidth) {
123 window.outerWidth = width;
124 window.outerHeight = height;
127 else if (window.resizeTo) {
128 window.resizeTo(width,height);
131 alert("Not supported.");
134 window.setSize(<?php echo $gantt_width; ?>,<?php echo $gantt_height; ?>);
139 echo ' <form action="'. getStringFromServer('PHP_SELF') .'?group_id='.$group_id.'&group_project_id='.$group_project_id.'&func=ganttpage" method="post">
140 <table width="10%" border="0" class="tableheading">
142 <td>'._('Assignee').'<br />'. $tech_box .'</td>
143 <td>'._('Status').'<br />'. $status_box .'</td>
144 <td>'._('Category').'<br />'. $cat_box .'</td>
145 <td>'._('Sort On').'<br />'. $order_box .'</td>
146 <td>'._('Resolution').'<br />'. $dispres_box .'</td>
147 <td>'._('Size').'<br />'. $size_box .'</td>
148 <td> <input type="submit" name="submit" value="'._('Browse').'" /></td>
149 </tr></table></form>';
151 echo '<img src="'. getStringFromServer('PHP_SELF') .
152 '?func=ganttchart&group_id='.$group_id.
153 '&group_project_id='.$group_project_id.
154 '&_assigned_to='.$_assigned_to.
155 '&_status='.$_status.
156 '&_order='.$_order.
157 '&_resolution='.$_resolution.
158 '&_category_id='.$_category_id.
159 '&_size='.$_size.
160 '&rand='.time().'" alt="'. _('Gantt Chart').'" />';
162 //pm_footer(array());