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 * Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent
9 * http://fusionforge.org
11 * This file is part of FusionForge. FusionForge is free software;
12 * you can redistribute it and/or modify it under the terms of the
13 * GNU General Public License as published by the Free Software
14 * Foundation; either version 2 of the Licence, or (at your option)
17 * FusionForge is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License along
23 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 echo '<' . '?xml version="1.0" encoding="utf-8" ?' . ">\n" .
28 $sysDTDs['transitional']['doctype']; ?>
29 <html <?php echo $sysXMLNSs; ?> xml:lang="en">
32 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
33 <title><?php echo _('Gantt Chart');?></title>
38 $_assigned_to = getIntFromRequest('_assigned_to', 0);
39 $_category_id = getIntFromRequest('_category_id');
40 $_order = getIntFromRequest('_order');
41 $_resolution = getStringFromRequest('_resolution');
42 $_size = getIntFromRequest('_size', 800);
43 $_status = getIntFromRequest('_status', 100);
44 $_order = getStringFromRequest('_order');
46 $engine = RBACEngine::getInstance () ;
47 $techs = $engine->getUsersByAllowedAction ('pm', $pg->getID(), 'tech') ;
49 $tech_id_arr = array () ;
50 $tech_name_arr = array () ;
52 foreach ($techs as $tech) {
53 $tech_id_arr[] = $tech->getID() ;
54 $tech_name_arr[] = $tech->getRealName() ;
57 $tech_name_arr[]=_('Any');
59 $tech_box=html_build_select_box_from_arrays ($tech_id_arr,$tech_name_arr,'_assigned_to',$_assigned_to,true,_('Unassigned'), true, _('Any'));
61 $status_box=html_build_select_box($pg->getStatuses(),'_status',$_status, false, '', true, _('Any'));
63 $cat_box=html_build_select_box($pg->getCategories(), '_category_id', $_category_id, true, _('None'), true, _('Any'));
66 Creating a custom sort box
69 $title_arr[]=_('Task Id');
70 $title_arr[]=_('Task Summary');
71 $title_arr[]=_('Start Date');
72 $title_arr[]=_('End Date');
73 $title_arr[]=_('Percent Complete');
75 $order_col_arr=array();
76 $order_col_arr[]='project_task_id';
77 $order_col_arr[]='summary';
78 $order_col_arr[]='start_date';
79 $order_col_arr[]='end_date';
80 $order_col_arr[]='percent_complete';
81 $order_box=html_build_select_box_from_arrays ($order_col_arr,$title_arr,'_order',$_order,false);
83 $dispres_col_arr=array();
84 $dispres_col_arr[]='Years';
85 $dispres_col_arr[]='Months';
86 $dispres_col_arr[]='Weeks';
87 $dispres_col_arr[]='Days';
89 $dispres_title_arr=array();
90 $dispres_title_arr[]=_('Years');
91 $dispres_title_arr[]=_('Months');
92 $dispres_title_arr[]=_('Weeks');
93 $dispres_title_arr[]=_('Days');
95 $_resolution=_('Months');
97 $dispres_box=html_build_select_box_from_arrays ($dispres_col_arr,$dispres_title_arr,'_resolution',$_resolution,false);
102 $size_col_arr=array();
105 $size_col_arr[]=1024;
106 $size_col_arr[]=1600;
108 $size_title_arr=array();
109 $size_title_arr[]='640 x 480';
110 $size_title_arr[]='800 x 600';
111 $size_title_arr[]='1024 x 768';
112 $size_title_arr[]='1600 x 1200';
114 $size_box=html_build_select_box_from_arrays ($size_col_arr,$size_title_arr,'_size',$_size,false);
117 Show the new pop-up boxes to select assigned to and/or status
123 } elseif ($_size==1024) {
126 } elseif ($_size==1600) {
133 //echo "XX $_size $gantt_width $gantt_height XX";
135 <script type="text/javascript">/* <![CDATA[ */
136 function setSize(width,height) {
137 if (window.outerWidth) {
138 window.outerWidth = width;
139 window.outerHeight = height;
142 else if (window.resizeTo) {
143 window.resizeTo(width,height);
146 alert("Not supported.");
149 window.setSize(<?php echo $gantt_width; ?>,<?php echo $gantt_height; ?>);
153 echo ' <form action="'. getStringFromServer('PHP_SELF') .'?group_id='.$group_id.'&group_project_id='.$group_project_id.'&func=ganttpage" method="post">
154 <table width="10%" class="tableheading">
156 <td>'._('Assignee').'<br />'. $tech_box .'</td>
157 <td>'._('Status').'<br />'. $status_box .'</td>
158 <td>'._('Category').'<br />'. $cat_box .'</td>
159 <td>'._('Sort On').'<br />'. $order_box .'</td>
160 <td>'._('Resolution').'<br />'. $dispres_box .'</td>
161 <td>'._('Size').'<br />'. $size_box .'</td>
162 <td><input type="submit" name="submit" value="'._('Browse').'" /></td>
163 </tr></table></form>';
165 echo '<img src="'. getStringFromServer('PHP_SELF') .
166 '?func=ganttchart&group_id='.$group_id.
167 '&group_project_id='.$group_project_id.
168 '&_assigned_to='.$_assigned_to.
169 '&_status='.$_status.
170 '&_order='.$_order.
171 '&_resolution='.$_resolution.
172 '&_category_id='.$_category_id.
173 '&_size='.$_size.
174 '&rand='.util_randnum().'" alt="'. _('Gantt Chart').'" />';
176 //pm_footer(array());