diff options
Diffstat (limited to 'demos/time-tracker/protected')
3 files changed, 79 insertions, 2 deletions
diff --git a/demos/time-tracker/protected/App_Code/UserDao.php b/demos/time-tracker/protected/App_Code/UserDao.php index 6064be7e..6f31090d 100644 --- a/demos/time-tracker/protected/App_Code/UserDao.php +++ b/demos/time-tracker/protected/App_Code/UserDao.php @@ -51,7 +51,7 @@ class UserDao extends BaseDao $sqlmap = $this->getConnection();
return $sqlmap->queryForList('GetAllUsers');
}
-
+
/**
* @param TimeTrackerUser new user details.
* @param string new user password.
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 |