* [MOD] UI tweaks for improving the context help displaying for the options.

* [MOD] Improved user tab.
* [ADD] Added usage detail for users
This commit is contained in:
nuxsmin
2018-03-31 15:07:42 +02:00
parent f59611a17a
commit e484fb74a7
28 changed files with 1488 additions and 1202 deletions

View File

@@ -2,8 +2,8 @@
/**
* sysPass
*
* @author nuxsmin
* @link https://syspass.org
* @author nuxsmin
* @link https://syspass.org
* @copyright 2012-2018, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
@@ -143,6 +143,24 @@ class UserController extends ControllerBase implements CrudControllerInterface
if ($this->view->isView === true || $user->getLogin() === 'demo') {
$this->view->assign('disabled', 'disabled');
$this->view->assign('readonly', 'readonly');
$this->view->assign('usage', array_map(function ($value) {
switch ($value->ref) {
case 'Account':
$value->icon = 'description';
break;
case 'UserGroup':
$value->icon = 'group';
break;
case 'PublicLink':
$value->icon = 'link';
break;
default:
$value->icon = 'info_outline';
}
return $value;
}, $this->userService->getUsageForUser($userId)));
} else {
$this->view->assign('disabled');
$this->view->assign('readonly');