Progress 14 for the dashboards

This commit is contained in:
Julio Cesar Laura
2011-10-31 20:19:21 -04:00
parent c643744c99
commit a8e653d82e
3 changed files with 39 additions and 28 deletions

View File

@@ -53,6 +53,18 @@ class PMDashlet extends DashletInstance implements DashletInterface {
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
while ($row = $dataset->getRow()) {
$row['DAS_INS_STATUS_LABEL'] = ($row['DAS_INS_STATUS'] == '1' ? G::LoadTranslation('ID_ACTIVE') : G::LoadTranslation('ID_INACTIVE'));
switch ($row['DAS_INS_OWNER_TYPE']) {
case 'DEPARTMENT':
require_once 'classes/model/Department.php';
$departmentInstance = new Department();
$department = $departmentInstance->load($row['DAS_INS_OWNER_UID']);
$row['DAS_INS_OWNER_TITLE'] = $department['DEPO_TITLE'];
break;
default:
$row['DAS_INS_OWNER_TITLE'] = $row['DAS_INS_OWNER_TYPE'];
break;
}
$dashletsInstances[] = $row;
$dataset->next();
}