3 * FusionForge : Project Management Facility
5 * Copyright 1999/2000, Sourceforge.net Tim Perdue
6 * Copyright 2002 GForge, LLC, Tim Perdue
7 * Copyright 2010, FusionForge Team
8 * http://fusionforge.org
10 * This file is part of FusionForge. FusionForge is free software;
11 * you can redistribute it and/or modify it under the terms of the
12 * GNU General Public License as published by the Free Software
13 * Foundation; either version 2 of the Licence, or (at your option)
16 * FusionForge is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 echo '<' . '?xml version="1.0" encoding="utf-8" ?' . ">\n" .
27 $sysDTDs['transitional']['doctype']; ?>
28 <html <?php echo $sysXMLNSs; ?> xml:lang="en">
31 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
32 <title><?php echo _('Gantt Chart');?></title>
37 $_assigned_to = getIntFromRequest('_assigned_to', 0);
38 $_category_id = getIntFromRequest('_category_id');
39 $_order = getIntFromRequest('_order');
40 $_resolution = getStringFromRequest('_resolution');
41 $_size = getIntFromRequest('_size', 800);
42 $_status = getIntFromRequest('_status', 100);
43 $_order = getStringFromRequest('_order');
45 $engine = RBACEngine::getInstance () ;
46 $techs = $engine->getUsersByAllowedAction ('pm', $pg->getID(), 'tech') ;
48 $tech_id_arr = array () ;
49 $tech_name_arr = array () ;
51 foreach ($techs as $tech) {
52 $tech_id_arr[] = $tech->getID() ;
53 $tech_name_arr[] = $tech->getRealName() ;
56 $tech_name_arr[]=_('Any');
58 $tech_box=html_build_select_box_from_arrays ($tech_id_arr,$tech_name_arr,'_assigned_to',$_assigned_to,true,_('Unassigned'), true, _('Any'));
60 $status_box=html_build_select_box($pg->getStatuses(),'_status',$_status, false, '', true, _('Any'));
62 $cat_box=html_build_select_box($pg->getCategories(), '_category_id', $_category_id, true, _('None'), true, _('Any'));
65 Creating a custom sort box
68 $title_arr[]=_('Task Id');
69 $title_arr[]=_('Task Summary');
70 $title_arr[]=_('Start Date');
71 $title_arr[]=_('End Date');
72 $title_arr[]=_('Percent Complete');
74 $order_col_arr=array();
75 $order_col_arr[]='project_task_id';
76 $order_col_arr[]='summary';
77 $order_col_arr[]='start_date';
78 $order_col_arr[]='end_date';
79 $order_col_arr[]='percent_complete';
80 $order_box=html_build_select_box_from_arrays ($order_col_arr,$title_arr,'_order',$_order,false);
82 $dispres_col_arr=array();
83 $dispres_col_arr[]='Years';
84 $dispres_col_arr[]='Months';
85 $dispres_col_arr[]='Weeks';
86 $dispres_col_arr[]='Days';
88 $dispres_title_arr=array();
89 $dispres_title_arr[]=_('Years');
90 $dispres_title_arr[]=_('Months');
91 $dispres_title_arr[]=_('Weeks');
92 $dispres_title_arr[]=_('Days');
94 $_resolution=_('Months');
96 $dispres_box=html_build_select_box_from_arrays ($dispres_col_arr,$dispres_title_arr,'_resolution',$_resolution,false);
101 $size_col_arr=array();
104 $size_col_arr[]=1024;
105 $size_col_arr[]=1600;
107 $size_title_arr=array();
108 $size_title_arr[]='640 x 480';
109 $size_title_arr[]='800 x 600';
110 $size_title_arr[]='1024 x 768';
111 $size_title_arr[]='1600 x 1200';
113 $size_box=html_build_select_box_from_arrays ($size_col_arr,$size_title_arr,'_size',$_size,false);
116 Show the new pop-up boxes to select assigned to and/or status
122 } elseif ($_size==1024) {
125 } elseif ($_size==1600) {
132 //echo "XX $_size $gantt_width $gantt_height XX";
134 <script language="JavaScript" type="text/javascript">/* <![CDATA[ */
135 function setSize(width,height) {
136 if (window.outerWidth) {
137 window.outerWidth = width;
138 window.outerHeight = height;
141 else if (window.resizeTo) {
142 window.resizeTo(width,height);
145 alert("Not supported.");
148 window.setSize(<?php echo $gantt_width; ?>,<?php echo $gantt_height; ?>);
152 echo ' <form action="'. getStringFromServer('PHP_SELF') .'?group_id='.$group_id.'&group_project_id='.$group_project_id.'&func=ganttpage" method="post">
153 <table width="10%" border="0" class="tableheading">
155 <td>'._('Assignee').'<br />'. $tech_box .'</td>
156 <td>'._('Status').'<br />'. $status_box .'</td>
157 <td>'._('Category').'<br />'. $cat_box .'</td>
158 <td>'._('Sort On').'<br />'. $order_box .'</td>
159 <td>'._('Resolution').'<br />'. $dispres_box .'</td>
160 <td>'._('Size').'<br />'. $size_box .'</td>
161 <td><input type="submit" name="submit" value="'._('Browse').'" /></td>
162 </tr></table></form>';
164 echo '<img src="'. getStringFromServer('PHP_SELF') .
165 '?func=ganttchart&group_id='.$group_id.
166 '&group_project_id='.$group_project_id.
167 '&_assigned_to='.$_assigned_to.
168 '&_status='.$_status.
169 '&_order='.$_order.
170 '&_resolution='.$_resolution.
171 '&_category_id='.$_category_id.
172 '&_size='.$_size.
173 '&rand='.util_randnum().'" alt="'. _('Gantt Chart').'" />';
175 //pm_footer(array());