New UI based on Admin LTE

This commit is contained in:
Dan Cryer 2014-12-02 16:26:55 +00:00
commit 3eac0b0c23
357 changed files with 51422 additions and 961 deletions

View file

@ -49,7 +49,7 @@ class UserController extends Controller
$users = $this->userStore->getWhere(array(), 1000, 0, array(), array('email' => 'ASC'));
$this->view->users = $users;
$this->config->set('page_title', 'Users');
$this->layout->title = 'Users';
return $this->view->render();
}
@ -58,6 +58,8 @@ class UserController extends Controller
{
$user = $_SESSION['phpci_user'];
$this->layout->title = 'Edit Profile';
if ($this->request->getMethod() == 'POST') {
$name = $this->getParam('name', null);
$email = $this->getParam('email', null);
@ -65,6 +67,8 @@ class UserController extends Controller
$_SESSION['phpci_user'] = $this->userService->updateUser($user, $name, $email, $password);
$user = $_SESSION['phpci_user'];
$this->view->updated = 1;
}
$values = $user->getDataArray();
@ -115,7 +119,7 @@ class UserController extends Controller
throw new ForbiddenException('You do not have permission to do that.');
}
$this->config->set('page_title', 'Add User');
$this->layout->title = 'Add User';
$method = $this->request->getMethod();
@ -164,6 +168,9 @@ class UserController extends Controller
throw new NotFoundException('User with ID: ' . $userId . ' does not exist.');
}
$this->layout->title = $user->getName();
$this->layout->subtitle = 'Edit User';
$values = array_merge($user->getDataArray(), $this->getParams());
$form = $this->userForm($values, 'edit/' . $userId);