summaryrefslogtreecommitdiff
path: root/demos/time-tracker/protected/pages/TimeTracker/ReportResource.php
diff options
context:
space:
mode:
Diffstat (limited to 'demos/time-tracker/protected/pages/TimeTracker/ReportResource.php')
-rw-r--r--demos/time-tracker/protected/pages/TimeTracker/ReportResource.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/demos/time-tracker/protected/pages/TimeTracker/ReportResource.php b/demos/time-tracker/protected/pages/TimeTracker/ReportResource.php
index a233e127..03fc7115 100644
--- a/demos/time-tracker/protected/pages/TimeTracker/ReportResource.php
+++ b/demos/time-tracker/protected/pages/TimeTracker/ReportResource.php
@@ -34,6 +34,15 @@ class ReportResource extends TPage
public function generateReport_Clicked($sender, $param)
{
+ if(count($this->projectList->SelectedValues) > 0
+ && count($this->resourceList->SelectedValues) >0)
+ {
+ $this->showReport();
+ }
+ }
+
+ protected function showReport()
+ {
$this->views->ActiveViewIndex = 1;
$reportDao = $this->Application->Modules['daos']->getDao('ReportDao');
$projects = $this->projectList->SelectedValues;
@@ -43,7 +52,7 @@ class ReportResource extends TPage
$report = $reportDao->getUserProjectTimeReports($users, $projects, $start, $end);
$this->resource_report->DataSource = $report;
- $this->resource_report->dataBind();
+ $this->resource_report->dataBind();
}
public function resource_report_itemCreated($sender, $param)