Adding per-page titles throughout PHPCI, fixes #371
This commit is contained in:
parent
d1080e2cb1
commit
08afe7b104
7 changed files with 29 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue