diff options
author | wei <> | 2006-07-19 03:55:25 +0000 |
---|---|---|
committer | wei <> | 2006-07-19 03:55:25 +0000 |
commit | 0c16571c091f8c4c89ae18427b2c2994cd4cf3bb (patch) | |
tree | bd0186684f6291e735c585c1c36baee7046ae0e9 /demos/time-tracker/protected/pages | |
parent | 63e66acd2ed45300d095d5428ebdfff7652070ea (diff) |
Add project details in time-tracker
Diffstat (limited to 'demos/time-tracker/protected/pages')
-rw-r--r-- | demos/time-tracker/protected/pages/TimeTracker/ProjectDetails.page | 44 | ||||
-rw-r--r-- | demos/time-tracker/protected/pages/TimeTracker/ProjectDetails.php | 35 |
2 files changed, 78 insertions, 1 deletions
diff --git a/demos/time-tracker/protected/pages/TimeTracker/ProjectDetails.page b/demos/time-tracker/protected/pages/TimeTracker/ProjectDetails.page index a8a7d1d3..2a7cb6dd 100644 --- a/demos/time-tracker/protected/pages/TimeTracker/ProjectDetails.page +++ b/demos/time-tracker/protected/pages/TimeTracker/ProjectDetails.page @@ -1,4 +1,46 @@ <com:TContent ID="Main">
-<h1>Project Details</h1>
+<h1>Create New Project</h1>
+
+<fieldset class="project"><legend>Project Configuration</legend>
+ <p>Define the project and specify which users will be part of the project.
+ Then add categories to the project to help keep track of specific areas of
+ product. Press the <tt>SAVE</tt> button at the bottom for your configuration
+ to take effect.</p>
+ <div class="projectInfo">
+ <h2>Project Information</h2>
+ <div class="projectName">
+ <com:TLabel ForControl="projectName" Text="Project Name"/>
+ <com:TTextBox ID="projectName" />
+ </div>
+ <div class="manager">
+ <com:TLabel ForControl="manager" Text="Project Manager" />
+ <com:TDropDownList ID="manager" />
+ </div>
+ <div class="completionDate">
+ <com:TLabel ForControl="completionDate" Text="Estimated complete date:"/>
+ <com:TDatePicker ID="completionDate" InputMode="DropDownList" />
+ </div>
+ <div class="estimateHours">
+ <com:TLabel ForControl="estimateHours" Text="Estimated Duration (in hours):"/>
+ <com:TTextBox ID="estimateHours" />
+ </div>
+ <div class="description">
+ <com:TLabel ForControl="description" Text="Description:" />
+ <com:TTextBox ID="description" TextMode="MultiLine" />
+ </div>
+ </div>
+
+ <div class="projectMembers">
+ <h2>Specify Project Members</h2>
+ <p>Select a resource. Use ctrl+click to select multiple resources at once:</p>
+ <com:TListBox ID="members" SelectionMode="Multiple" />
+ </div>
+
+ <div class="actionButtons">
+ <com:TButton Text="Save" />
+ <com:TButton Text="Cancel" />
+ <com:TButton Text="Delete" />
+ </div>
+ </fieldset>
</com:TContent>
\ No newline at end of file diff --git a/demos/time-tracker/protected/pages/TimeTracker/ProjectDetails.php b/demos/time-tracker/protected/pages/TimeTracker/ProjectDetails.php new file mode 100644 index 00000000..16c10e6f --- /dev/null +++ b/demos/time-tracker/protected/pages/TimeTracker/ProjectDetails.php @@ -0,0 +1,35 @@ +<?php
+
+class ProjectDetails extends TPage
+{
+ private $allUsers = null;
+
+ public function onLoad($param)
+ {
+ if(!$this->IsPostBack)
+ {
+ $this->manager->DataSource = $this->getUsersWithRole('manager');
+ $this->manager->dataBind();
+ $this->members->DataSource = $this->getUsersWithRole('consultant');
+ $this->members->dataBind();
+ }
+ }
+
+ protected function getUsersWithRole($role)
+ {
+ if(is_null($this->allUsers))
+ {
+ $dao = $this->Application->Modules['daos']->getDao('UserDao');
+ $this->allUsers = $dao->getAllUsers();
+ }
+ $users = array();
+ foreach($this->allUsers as $user)
+ {
+ if($user->isInRole($role))
+ $users[] = $user->Name;
+ }
+ return $users;
+ }
+}
+
+?>
\ No newline at end of file |