diff options
author | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
commit | 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch) | |
tree | e08bf04f0823650a231227ac3499121270172a23 /demos/time-tracker/protected/pages/TimeTracker/ReportProject.php | |
parent | 3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff) |
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'demos/time-tracker/protected/pages/TimeTracker/ReportProject.php')
-rw-r--r-- | demos/time-tracker/protected/pages/TimeTracker/ReportProject.php | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/demos/time-tracker/protected/pages/TimeTracker/ReportProject.php b/demos/time-tracker/protected/pages/TimeTracker/ReportProject.php index fcb1c865..6ce849b9 100644 --- a/demos/time-tracker/protected/pages/TimeTracker/ReportProject.php +++ b/demos/time-tracker/protected/pages/TimeTracker/ReportProject.php @@ -1,53 +1,53 @@ -<?php
-
-class ReportProject extends TPage
-{
- protected function getProjects()
- {
- $projectDao = $this->Application->Modules['daos']->getDao('ProjectDao');
- $projects = array();
- foreach($projectDao->getAllProjects() as $project)
- $projects[$project->ID] = $project->Name;
- return $projects;
- }
-
- public function onLoad($param)
- {
- if(!$this->IsPostBack)
- {
- $this->projectList->DataSource = $this->getProjects();
- $this->dataBind();
- }
- }
-
- public function generateReport_Clicked($sender, $param)
- {
- if(count($this->projectList->SelectedValues) > 0)
- $this->showReport();
- }
-
- protected function showReport()
- {
- $reportDao = $this->Application->Modules['daos']->getDao('ReportDao');
- $reports = $reportDao->getTimeReportsByProjectIDs($this->projectList->SelectedValues);
- $this->views->ActiveViewIndex = 1;
- $this->projects->DataSource = $reports;
- $this->projects->dataBind();
- }
-
- public function project_itemCreated($sender, $param)
- {
- $item = $param->Item;
- if($item->ItemType==='Item' || $item->ItemType==='AlternatingItem')
- $item->category->DataSource = $item->DataItem->Categories;
- }
-
- public function category_itemCreated($sender, $param)
- {
- $item = $param->Item;
- if($item->ItemType==='Item' || $item->ItemType==='AlternatingItem')
- $item->members->DataSource = $item->DataItem->members;
- }
-}
-
+<?php + +class ReportProject extends TPage +{ + protected function getProjects() + { + $projectDao = $this->Application->Modules['daos']->getDao('ProjectDao'); + $projects = array(); + foreach($projectDao->getAllProjects() as $project) + $projects[$project->ID] = $project->Name; + return $projects; + } + + public function onLoad($param) + { + if(!$this->IsPostBack) + { + $this->projectList->DataSource = $this->getProjects(); + $this->dataBind(); + } + } + + public function generateReport_Clicked($sender, $param) + { + if(count($this->projectList->SelectedValues) > 0) + $this->showReport(); + } + + protected function showReport() + { + $reportDao = $this->Application->Modules['daos']->getDao('ReportDao'); + $reports = $reportDao->getTimeReportsByProjectIDs($this->projectList->SelectedValues); + $this->views->ActiveViewIndex = 1; + $this->projects->DataSource = $reports; + $this->projects->dataBind(); + } + + public function project_itemCreated($sender, $param) + { + $item = $param->Item; + if($item->ItemType==='Item' || $item->ItemType==='AlternatingItem') + $item->category->DataSource = $item->DataItem->Categories; + } + + public function category_itemCreated($sender, $param) + { + $item = $param->Item; + if($item->ItemType==='Item' || $item->ItemType==='AlternatingItem') + $item->members->DataSource = $item->DataItem->members; + } +} + ?>
\ No newline at end of file |