summaryrefslogtreecommitdiff
path: root/demos/time-tracker/protected/pages
diff options
context:
space:
mode:
authorwei <>2006-07-28 06:06:32 +0000
committerwei <>2006-07-28 06:06:32 +0000
commit5fc75a5f53fa07971b604c5318da5bf07379ef89 (patch)
tree2a88f91df64f0182e245e3b87ee3c2658fdc06aa /demos/time-tracker/protected/pages
parentcaa348ceabba58447bf8deddb8c6316ff3dc88ce (diff)
Complete Time-Tracker demo app.
Diffstat (limited to 'demos/time-tracker/protected/pages')
-rw-r--r--demos/time-tracker/protected/pages/TimeTracker/Login.php16
-rw-r--r--demos/time-tracker/protected/pages/TimeTracker/ReportProject.page75
-rw-r--r--demos/time-tracker/protected/pages/TimeTracker/ReportResource.page81
3 files changed, 154 insertions, 18 deletions
diff --git a/demos/time-tracker/protected/pages/TimeTracker/Login.php b/demos/time-tracker/protected/pages/TimeTracker/Login.php
index d8c5182f..aa12e716 100644
--- a/demos/time-tracker/protected/pages/TimeTracker/Login.php
+++ b/demos/time-tracker/protected/pages/TimeTracker/Login.php
@@ -1,7 +1,4 @@
<?php
-
-Prado::using('Application.App_Data.ezpdo.Models.*');
-
/**
* Login Page class file.
*
@@ -26,19 +23,6 @@ Prado::using('Application.App_Data.ezpdo.Models.*');
*/
class Login extends TPage
{
-
- function onLoad($param)
- {
- //$category = new TimeEntryCategory();
- $ezpdo = $this->Application->Modules['ezpdo']->getConnection();
- //$cats = $ezpdo->find('from TimeEntryCategory');
- $category = $ezpdo->create('TimeEntryCategory');
- //$category->Name = "Category 1";
- //$category->Abbreviation = "CAT1";
- var_dump($category);
- //$ezpdo->commit($category);
- }
-
/**
* Validates the username and password.
* @param TControl custom validator that created the event.
diff --git a/demos/time-tracker/protected/pages/TimeTracker/ReportProject.page b/demos/time-tracker/protected/pages/TimeTracker/ReportProject.page
index 50345afa..38c8d86d 100644
--- a/demos/time-tracker/protected/pages/TimeTracker/ReportProject.page
+++ b/demos/time-tracker/protected/pages/TimeTracker/ReportProject.page
@@ -1,15 +1,86 @@
<com:TContent ID="Main">
<h2>Project Reports</h2>
-<fieldset>
+<fieldset class="project-report">
<legend>Project Report</legend>
<com:TMultiView ID="views" ActiveViewIndex="0">
<com:TView>
<com:TLabel ForControl="projectList"
- Text="Select a project. Use ctrl+click to select multiple resources at once: "/>
+ Text="Select a project. Use ctrl+click to select multiple projects at once: "/>
<com:TListBox ID="projectList" CssClass="projects" SelectionMode="Multiple" />
<com:TButton Text="Generate Report" OnClick="generateReport_Clicked"/>
</com:TView>
+ <com:TView>
+ <com:TRepeater ID="projects" onItemCreated="project_itemCreated" EnableViewState="false">
+ <prop:ItemTemplate>
+ <!-- project -->
+ <table class="project">
+ <tr>
+ <th>Project Name</th>
+ <th>Est. Hours</th>
+ <th>Actual Hours</th>
+ <th>Est. Completion</th>
+ </tr>
+ <tr>
+ <td><%# $this->DataItem->ProjectName %></td>
+ <td><%# $this->DataItem->EstimateHours %></td>
+ <td><%# $this->DataItem->ActualHours %></td>
+ <td>
+ <com:System.I18N.TDateFormat
+ Pattern="dd/MM/yyyy"
+ Value=<%# $this->DataItem->EstimateCompletion %> />
+ </td>
+ </tr>
+
+ <com:TRepeater ID="category" onItemCreated="Page.category_itemCreated" EnableViewState="false">
+ <prop:HeaderTemplate>
+ <tr><td></td><td colspan="2">
+ </prop:HeaderTemplate>
+ <prop:FooterTemplate>
+ </tr></td><td></td>
+ </prop:FooterTemplate>
+ <prop:ItemTemplate>
+
+ <!-- category -->
+ <table class="category">
+ <tr>
+ <th>Category</th>
+ <th>Est. Hours</th>
+ <th>Actual Hours</th>
+ </tr>
+ <tr>
+ <td><%# $this->DataItem->CategoryName %></td>
+ <td><%# $this->DataItem->EstimateHours %></td>
+ <td><%# $this->DataItem->ActualHours %></td>
+ </tr>
+
+
+ <com:TRepeater ID="members" EnableViewState="false">
+ <prop:ItemTemplate>
+ <!-- member -->
+ <tr>
+ <td colspan="2">
+ <%# $this->DataItem['username'] %>
+ </td>
+ <td>
+ <%# $this->DataItem['hours'] %>
+ </td>
+ </tr>
+ <!-- //member -->
+ </prop:ItemTemplate>
+ </com:TRepeater>
+
+ </table>
+ <!-- //category -->
+
+ </prop:ItemTemplate>
+ </com:TRepeater>
+
+ </table>
+ <!-- //project -->
+ </prop:ItemTemplate>
+ </com:TRepeater>
+ </com:TView>
</com:TMultiView>
</fieldset>
diff --git a/demos/time-tracker/protected/pages/TimeTracker/ReportResource.page b/demos/time-tracker/protected/pages/TimeTracker/ReportResource.page
index 4d8b7b17..5e112505 100644
--- a/demos/time-tracker/protected/pages/TimeTracker/ReportResource.page
+++ b/demos/time-tracker/protected/pages/TimeTracker/ReportResource.page
@@ -1,4 +1,85 @@
<com:TContent ID="Main">
<h1>Resource Report</h1>
+<fieldset class="resource-report">
+ <legend>Resource Report</legend>
+ <com:TMultiView ID="views" ActiveViewIndex="0">
+ <com:TView>
+ <h2>STEP 1 - Select project(s)</h2>
+ <com:TLabel ForControl="projectList"
+ Text="Select a project. Use ctrl+click to select multiple projects at once: "/>
+ <com:TListBox ID="projectList" CssClass="projects" SelectionMode="Multiple" />
+ <h2>STEP 2 - Select resource(s)</h2>
+ <com:TLabel ForControl="resourceList"
+ Text="Select a resource. Use ctrl+click to select multiple resources at once: "/>
+ <com:TListBox ID="resourceList" CssClass="resource" SelectionMode="Multiple" />
+ <h2>STEP 3 - Select a date range</h2>
+ <div class="date-from">
+ <com:TLabel ForControl="dateFrom" Text="Dates from:"/>
+ <com:TDatePicker id="dateFrom"
+ TimeStamp=<%= strtotime("-1 year") %>
+ InputMode="DropDownList" />
+ </div>
+ <div class="date-to">
+ <com:TLabel ForControl="dateTo" Text="to:"/>
+ <com:TDatePicker id="dateTo" InputMode="DropDownList"/>
+ </div>
+ <div class="buttons">
+ <com:TButton Text="Generate Report" Onclick="generateReport_Clicked"/>
+ </div>
+ </com:TView>
+
+ <com:TView>
+ <h3>Beginning Date</h3>
+ <h4><%= $this->dateFrom->Date %></h4>
+ <h3>Ending Date</h3>
+ <h4><%= $this->dateTo->Date %></h4>
+
+ <com:TRepeater ID="resource_report" OnItemCreated="resource_report_itemCreated" EnableViewState="false">
+ <prop:ItemTemplate>
+ <table class="resource">
+ <tr>
+ <th>Consultant</th>
+ <th>Total Hours</th>
+ </tr>
+ <tr>
+ <td><%# $this->DataItem->Username %></td>
+ <td><%# $this->DataItem->TotalHours %></td>
+ </tr>
+ </table>
+
+ <com:TRepeater ID="time_entries">
+ <prop:HeaderTemplate>
+ <table>
+ <tr>
+ <th>Reported Date</th>
+ <th>Project Name</th>
+ <th>Category Name</th>
+ <th>Duration</th>
+ <th>Description</th>
+ </tr>
+ </prop:HeaderTemplate>
+ <prop:FooterTemplate>
+ </table>
+ </prop:FooterTemplate>
+ <prop:ItemTemplate>
+ <tr>
+ <td><com:System.I18N.TDateFormat
+ Pattern="dd/MM/yyyy"
+ Value=<%# $this->DataItem->ReportDate %> />
+ </td>
+ <td><%# $this->DataItem->ProjectName %></td>
+ <td><%# $this->DataItem->CategoryName %></td>
+ <td><%# $this->DataItem->Duration %></td>
+ <td><%# $this->DataItem->Description %></td>
+ </tr>
+ </prop:ItemTemplate>
+ </com:TRepeater>
+ </prop:ItemTemplate>
+ </com:TRepeater>
+
+ </com:TView>
+
+ </com:TMultiView>
+</fieldset>
</com:TContent> \ No newline at end of file