Adding per-page titles throughout PHPCI, fixes #371

This commit is contained in:
Dan Cryer 2014-04-24 16:25:24 +01:00
commit 08afe7b104
7 changed files with 29 additions and 1 deletions

View file

@ -40,6 +40,8 @@ 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');
return $this->view->render();
}
@ -52,6 +54,9 @@ class UserController extends Controller
throw new \Exception('You do not have permission to do that.');
}
$this->config->set('page_title', 'Add User');
$method = $this->request->getMethod();
if ($method == 'POST') {
@ -96,6 +101,9 @@ class UserController extends Controller
$method = $this->request->getMethod();
$user = $this->userStore->getById($userId);
$this->config->set('page_title', 'Edit: ' . $user->getName());
if ($method == 'POST') {
$values = $this->getParams();
} else {