protected function AddFieldColumns(Grid $grid) { // // View column for name field // $column = new TextViewColumn('name', 'Name', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for date field // $column = new DateTimeViewColumn('date', 'Timesheet Date', $this->dataset); $column->SetDateTimeFormat('Y-m-d'); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for task_name field // $column = new TextViewColumn('task_name', 'Task Name', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for project_name field // $column = new TextViewColumn('project_name', 'Project Name', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for pay_period_number field // $column = new TextViewColumn('pay_period_number', 'Pay Period ', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for hours field // $column = new TextViewColumn('hours', 'Hours', $this->dataset); $grid->SetTotal($column, PredefinedAggregate::$Sum); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for position field // $column = new TextViewColumn('position', 'Position', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for emp_number field // $column = new TextViewColumn('emp_number', 'Emp Number', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); }
protected function AddFieldColumns(Grid $grid) { if (GetCurrentUserGrantForDataSource('project.task')->HasViewGrant()) { // // View column for taskDetailView0project detail // $column = new DetailColumn(array('project_id'), 'detail0project', 'taskDetailEdit0project_handler', 'taskDetailView0project_handler', $this->dataset, 'Tasks within this project', $this->RenderText('Tasks')); $grid->AddViewColumn($column); } if (GetCurrentUserGrantForDataSource('project.project')->HasViewGrant()) { // // View column for projectDetailView1project detail // $column = new DetailColumn(array('project_id'), 'detail1project', 'projectDetailEdit1project_handler', 'projectDetailView1project_handler', $this->dataset, 'Project Budget Chart', $this->RenderText('Project Budget')); $grid->AddViewColumn($column); } if (GetCurrentUserGrantForDataSource('project.project_timeline_detail')->HasViewGrant()) { // // View column for project_timeline_detailDetailView2project detail // $column = new DetailColumn(array('project_id'), 'detail2project', 'project_timeline_detailDetailEdit2project_handler', 'project_timeline_detailDetailView2project_handler', $this->dataset, 'Tasks Gantt view', $this->RenderText('Tasks Gantt view')); $grid->AddViewColumn($column); } // // View column for program_name field // $column = new TextViewColumn('programm_id_program_name', 'Project Type', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for project_name field // $column = new TextViewColumn('project_name', 'Project Name', $this->dataset); $column->SetOrderable(true); $column->SetEscapeHTMLSpecialChars(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for date_start field // $column = new DateTimeViewColumn('date_start', 'Date Start', $this->dataset); $column->SetDateTimeFormat('Y-m-d'); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for date_end field // $column = new DateTimeViewColumn('date_end', 'Date End', $this->dataset); $column->SetDateTimeFormat('Y-m-d'); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for year field // $column = new TextViewColumn('year', 'Year', $this->dataset); $column->SetOrderable(true); $column->SetEscapeHTMLSpecialChars(true); $column->SetWordWrap(false); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for notes field // $column = new TextViewColumn('notes', 'Objectives', $this->dataset); $column->SetOrderable(true); $column->SetMaxLength(75); $column->SetFullTextWindowHandlerName('projectGrid_notes_handler_list'); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for Name field // $column = new TextViewColumn('priority_Name', 'Priority', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for username field // $column = new TextViewColumn('lead_username', 'Project Lead', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for approved_budget field // $column = new TextViewColumn('approved_budget', 'Approved Budget', $this->dataset); $grid->SetTotal($column, PredefinedAggregate::$Sum); $column->SetOrderable(true); $column = new CurrencyFormatValueViewColumnDecorator($column, 2, ',', '.', $this->RenderText('$')); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for budget_spent field // $column = new TextViewColumn('budget_spent', 'Budget Spent', $this->dataset); $grid->SetTotal($column, PredefinedAggregate::$Sum); $column->SetOrderable(true); $column = new CurrencyFormatValueViewColumnDecorator($column, 2, ',', '.', $this->RenderText('$')); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for multi_year field // $column = new TextViewColumn('multi_year', 'Multi Year', $this->dataset); $column->SetOrderable(true); $column = new CheckBoxFormatValueViewColumnDecorator($column); $column->SetDisplayValues($this->RenderText('<img src="images/checked.png" alt="true">'), $this->RenderText('')); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for public_engagement field // $column = new TextViewColumn('public_engagement', 'Public Engagement', $this->dataset); $column->SetOrderable(true); $column->SetMaxLength(75); $column->SetFullTextWindowHandlerName('projectGrid_public_engagement_handler_list'); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for level_of_service field // $column = new TextViewColumn('level_of_service', 'Level Of Service', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for approved field // $column = new TextViewColumn('approved', 'Approved by CAO', $this->dataset); $column->SetOrderable(true); $column = new CheckBoxFormatValueViewColumnDecorator($column); $column->SetDisplayValues($this->RenderText('<img src="images/checked.png" alt="true">'), $this->RenderText('')); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for progress field // $column = new TextViewColumn('progress', 'Progress', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for DEPARTMENT field // $column = new TextViewColumn('dept_id_DEPARTMENT', 'Department', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); }
protected function AddFieldColumns(Grid $grid) { // // View column for name field // $column = new TextViewColumn('name', 'Name', $this->dataset); $column->SetOrderable(true); $column->SetMaxLength(75); $column->SetFullTextWindowHandlerName('timesheetDetailEditGrid0taskDetailEdit0department_projects_name_handler_list'); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for task_id field // $column = new TextViewColumn('task_id', 'Task Name', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for hours field // $column = new TextViewColumn('hours', 'Hours', $this->dataset); $grid->SetTotal($column, PredefinedAggregate::$Sum); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for notes field // $column = new TextViewColumn('notes', 'Notes', $this->dataset); $column->SetOrderable(true); $column->SetMaxLength(75); $column->SetFullTextWindowHandlerName('timesheetDetailEditGrid0taskDetailEdit0department_projects_notes_handler_list'); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for date field // $column = new DateTimeViewColumn('date', 'Date', $this->dataset); $column->SetDateTimeFormat('Y-m-d'); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); }
protected function AddFieldColumns(Grid $grid) { // // View column for total_hours field // $column = new TextViewColumn('total_hours', 'Total Actual Hours', $this->dataset); $grid->SetTotal($column, PredefinedAggregate::$Sum); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for project_name field // $column = new TextViewColumn('project_name', 'Project', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for task_name field // $column = new TextViewColumn('task_name', 'Task Name', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for assigned_hours field // $column = new TextViewColumn('assigned_hours', 'Assigned Hours', $this->dataset); $grid->SetTotal($column, PredefinedAggregate::$Sum); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); }
protected function AddFieldColumns(Grid $grid) { // // View column for program_name field // $column = new TextViewColumn('programm_id_program_name', 'Project Type', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for project_name field // $column = new TextViewColumn('project_name', 'Project Name', $this->dataset); $column->SetOrderable(true); $column->SetMaxLength(75); $column->SetFullTextWindowHandlerName('projectDetailEditGrid0program_project_name_handler_list'); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for date_start field // $column = new DateTimeViewColumn('date_start', 'Date Start', $this->dataset); $column->SetDateTimeFormat('Y-m-d'); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for date_end field // $column = new DateTimeViewColumn('date_end', 'Date End', $this->dataset); $column->SetDateTimeFormat('Y-m-d'); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for notes field // $column = new TextViewColumn('notes', 'Notes', $this->dataset); $column->SetOrderable(true); $column->SetMaxLength(75); $column->SetFullTextWindowHandlerName('projectDetailEditGrid0program_notes_handler_list'); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for priority field // $column = new TextViewColumn('priority', 'Priority', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for lead field // $column = new TextViewColumn('lead', 'Lead', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for approved_budget field // $column = new TextViewColumn('approved_budget', 'Approved Budget', $this->dataset); $grid->SetTotal($column, PredefinedAggregate::$Sum); $column->SetOrderable(true); $column = new CurrencyFormatValueViewColumnDecorator($column, 2, ',', '.', $this->RenderText('$')); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); }
protected function AddFieldColumns(Grid $grid) { if (GetCurrentUserGrantForDataSource('task.timesheet')->HasViewGrant()) { // // View column for timesheetDetailView0task detail // $column = new DetailColumn(array('task_id'), 'detail0task', 'timesheetDetailEdit0task_handler', 'timesheetDetailView0task_handler', $this->dataset, 'Timesheet', $this->RenderText('Timesheet')); $grid->AddViewColumn($column); } // // View column for project_id field // $column = new TextViewColumn('project_id', 'Project', $this->dataset); $column->SetOrderable(true); $column = new ExtendedHyperLinkColumnDecorator($column, $this->dataset, 'project.php?operation=view&pk0=%project_id%', ''); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for task_name field // $column = new TextViewColumn('task_name', 'Name', $this->dataset); $column->SetOrderable(true); $column->SetMaxLength(75); $column->SetFullTextWindowHandlerName('taskGrid_task_name_handler_list'); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for notes field // $column = new TextViewColumn('notes', 'Notes', $this->dataset); $column->SetOrderable(true); $column->SetMaxLength(75); $column->SetFullTextWindowHandlerName('taskGrid_notes_handler_list'); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for hrs field // $column = new TextViewColumn('hrs', 'Allocated Hours', $this->dataset); $grid->SetTotal($column, PredefinedAggregate::$Sum); $column->SetOrderable(true); $column = new NumberFormatValueViewColumnDecorator($column, 2, ',', '.'); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for assigned_to field // $column = new TextViewColumn('assigned_to', 'Assigned To', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for date_start field // $column = new DateTimeViewColumn('date_start', 'Date Start', $this->dataset); $column->SetDateTimeFormat('Y-m-d'); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for date_end field // $column = new DateTimeViewColumn('date_end', 'Date End', $this->dataset); $column->SetDateTimeFormat('Y-m-d'); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); }
protected function AddFieldColumns(Grid $grid) { // // View column for name field // $column = new TextViewColumn('name', 'Name', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for total_hours field // $column = new TextViewColumn('total_hours', 'Total Hours', $this->dataset); $grid->SetTotal($column, PredefinedAggregate::$Sum); $column->SetOrderable(true); $column = new NumberFormatValueViewColumnDecorator($column, 2, ',', '.'); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for date field // $column = new DateTimeViewColumn('date', 'Date', $this->dataset); $column->SetDateTimeFormat('Y-m-d'); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for task_name field // $column = new TextViewColumn('task_id_task_name', 'Task Id', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); // // View column for notes field // $column = new TextViewColumn('notes', 'Notes', $this->dataset); $column->SetOrderable(true); $column->SetDescription($this->RenderText('')); $column->SetFixedWidth(null); $grid->AddViewColumn($column); }