$offset = getIntFromRequest('offset');
$_assigned_to = getIntFromRequest('_assigned_to');
-$_status = getStringFromRequest('_status');
+$_status = getIntFromRequest('_status');
$_order = getStringFromRequest('_order');
$_resolution = getStringFromRequest('_resolution');
$_category_id = getIntFromRequest('_category_id');
$_size = getIntFromRequest('_size');
+$max_rows = getIntFromRequest('max_rows',50);
$ptf->setup($offset,$_order,$max_rows,'custom',$_assigned_to,$_status,$_category_id);
if ($ptf->isError()) {
$graph->SetMargin(10,10,25,10);
// Add title and subtitle
-$graph->title-> Set($pg->getName());
-//global $sys_gantt_title_font_family,$sys_gantt_title_font_style,$sys_gantt_title_font_size;
-//settitlefont($graph,$sys_gantt_title_font_family,$sys_gantt_title_font_style,$sys_gantt_title_font_size);
+$graph->title->Set($pg->getName());
+
+if (isset($gantt_title_font_family)) {
+ $graph->title->SetFont( constant($gantt_title_font_family),
+ constant($gantt_title_font_style), $gantt_title_font_size);
+}
+
//$graph->subtitle-> Set("(Draft version)");
// Show day, week and month scale
$graph->ShowHeaders( GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH);
} elseif ($_resolution == 'Weeks') {
$graph->ShowHeaders( GANTT_HWEEK | GANTT_HMONTH);
+} elseif ($_resolution == 'Months') {
+ $graph->ShowHeaders( GANTT_HMONTH | GANTT_HYEAR);
} else {
- $graph->ShowHeaders( GANTT_HMONTH);
+ $graph->ShowHeaders( GANTT_HYEAR);
}
// Instead of week number show the date for the first day in the week
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);
// Make the week scale font smaller than the default
-$graph->scale->week->SetFont(FF_FONT0 );
+if (isset($gantt_title_font_family)) {
+ $graph->scale->week->SetFont( constant($gantt_title_font_family), FS_NORMAL, 9);
+ $graph->scale->month->SetFont( constant($gantt_title_font_family), FS_NORMAL, 9);
+}
// Use the short name of the month together with a 2 digit year
// on the month scale
-$graph->scale->month->SetStyle( MONTHSTYLE_SHORTNAMEYEAR2);
+$graph->scale->month->SetStyle( MONTHSTYLE_SHORTNAME);
$rows=count($pt_arr);
$activity[$i]->SetFillColor ("red");
$activity[$i]->progress->Set( (( $pt_arr[$i]->getPercentComplete() ) ? ($pt_arr[$i]->getPercentComplete()/100) : 0));
$activity[$i]->progress->SetPattern(BAND_RDIAG, "blue");
- $activity[$i]->title->SetFont( FF_ARIAL, FS_NORMAL,9);
-// global $sys_gantt_task_font_family,$sys_gantt_task_font_style,$sys_gantt_task_font_size;
-// settitlefont($activity[$i],$sys_gantt_title_font_family,$sys_gantt_title_font_style,$sys_gantt_title_font_size);
+ if (isset($gantt_task_font_family)) {
+ $activity[$i]->title->SetFont( constant($gantt_task_font_family),
+ constant($gantt_task_font_style), $gantt_task_font_size);
+ }
+
// Finally add the bar to the graph
$graph->Add( $activity[$i] );
}