BUG-14034 Status in Dashboards -NEW FEATURE

In ADMIN > Settings > Dashboard now is available the button Status, this button let Activate or Deactivate the Dashlet, showing the changed status in the Status Field in the grid.

When a dashlet is Inactive this dashlet is not showed in the DASHBOARDS tab. A validation was added to only let the current user see the active dashlets assigned to himself.
This commit is contained in:
jennylee
2014-05-19 16:26:43 -04:00
parent 5809a36bbc
commit 1c133aabb2
3 changed files with 91 additions and 3 deletions

View File

@@ -176,7 +176,16 @@ class Dashboard extends Controller
if (! isset( $_SESSION['USER_LOGGED'] )) {
throw new Exception( G::LoadTranslation('ID_SESSION_EXPIRED') );
}
return $this->pmDashlet->getDashletsInstancesForUser( $_SESSION['USER_LOGGED'] );
$dash= $this->pmDashlet->getDashletsInstancesForUser( $_SESSION['USER_LOGGED']);
$dashStatusActive = "";
$j=0;
foreach ($dash as $dashStatus) {
if ($dashStatus['DAS_INS_STATUS'] != 0){
$dashStatusActive[$j] = $dashStatus;
$j++;
}
}
return $dashStatusActive;
} catch (Exception $error) {
throw $error;
}