summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-16 20:55:21 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-16 20:55:21 -0400
commit4514bc1d4b4abff23902e46da76e70f13a3647eb (patch)
treefb4f03d47f49bd8acc6fbae943ac44ac58df9540
parentabdf6f97800e7e838b5841820815385b183bab67 (diff)
Improve user controllers and views
-rw-r--r--app/Controller/Oauth.php6
-rw-r--r--app/Controller/Twofactor.php4
-rw-r--r--app/Controller/UserAjaxController.php (renamed from app/Controller/UserHelper.php)6
-rw-r--r--app/Controller/UserCreationController.php4
-rw-r--r--app/Controller/UserImportController.php2
-rw-r--r--app/Controller/UserListController.php32
-rw-r--r--app/Controller/UserStatusController.php6
-rw-r--r--app/Controller/UserViewController.php (renamed from app/Controller/User.php)72
-rw-r--r--app/Core/Markdown.php2
-rw-r--r--app/Helper/LayoutHelper.php2
-rw-r--r--app/ServiceProvider/AuthenticationProvider.php5
-rw-r--r--app/ServiceProvider/RouteProvider.php26
-rw-r--r--app/Template/comment/create.php2
-rw-r--r--app/Template/comments/create.php2
-rw-r--r--app/Template/group/index.php2
-rw-r--r--app/Template/group/users.php4
-rw-r--r--app/Template/header.php6
-rw-r--r--app/Template/layout.php2
-rw-r--r--app/Template/project_permission/index.php2
-rw-r--r--app/Template/task/time_tracking_details.php4
-rw-r--r--app/Template/task/transitions.php4
-rw-r--r--app/Template/task_creation/show.php2
-rw-r--r--app/Template/task_internal_link/table.php4
-rw-r--r--app/Template/task_modification/edit_description.php2
-rw-r--r--app/Template/twofactor/disable.php4
-rw-r--r--app/Template/user/sidebar.php83
-rw-r--r--app/Template/user_creation/local.php2
-rw-r--r--app/Template/user_creation/remote.php2
-rw-r--r--app/Template/user_import/show.php2
-rw-r--r--app/Template/user_list/dropdown.php (renamed from app/Template/user/dropdown.php)2
-rw-r--r--app/Template/user_list/show.php (renamed from app/Template/user/index.php)4
-rw-r--r--app/Template/user_status/disable.php2
-rw-r--r--app/Template/user_status/enable.php2
-rw-r--r--app/Template/user_status/remove.php2
-rw-r--r--app/Template/user_view/authentication.php (renamed from app/Template/user/authentication.php)7
-rw-r--r--app/Template/user_view/edit.php (renamed from app/Template/user/edit.php)6
-rw-r--r--app/Template/user_view/external.php (renamed from app/Template/user/external.php)0
-rw-r--r--app/Template/user_view/integrations.php (renamed from app/Template/user/integrations.php)2
-rw-r--r--app/Template/user_view/last.php (renamed from app/Template/user/last.php)0
-rw-r--r--app/Template/user_view/layout.php (renamed from app/Template/user/layout.php)4
-rw-r--r--app/Template/user_view/notifications.php (renamed from app/Template/user/notifications.php)6
-rw-r--r--app/Template/user_view/password.php (renamed from app/Template/user/password.php)4
-rw-r--r--app/Template/user_view/password_reset.php (renamed from app/Template/user/password_reset.php)0
-rw-r--r--app/Template/user_view/profile.php (renamed from app/Template/user/profile.php)0
-rw-r--r--app/Template/user_view/sessions.php (renamed from app/Template/user/sessions.php)2
-rw-r--r--app/Template/user_view/share.php (renamed from app/Template/user/share.php)7
-rw-r--r--app/Template/user_view/show.php (renamed from app/Template/user/show.php)0
-rw-r--r--app/Template/user_view/sidebar.php83
-rw-r--r--app/Template/user_view/timesheet.php (renamed from app/Template/user/timesheet.php)0
49 files changed, 219 insertions, 210 deletions
diff --git a/app/Controller/Oauth.php b/app/Controller/Oauth.php
index c38654be..04adf154 100644
--- a/app/Controller/Oauth.php
+++ b/app/Controller/Oauth.php
@@ -49,7 +49,7 @@ class Oauth extends BaseController
$this->link($provider);
} else {
$this->flash->failure(t('The OAuth2 state parameter is invalid'));
- $this->response->redirect($this->helper->url->to('user', 'external', array('user_id' => $this->userSession->getId())));
+ $this->response->redirect($this->helper->url->to('UserViewController', 'external', array('user_id' => $this->userSession->getId())));
}
} else {
if ($hasValidState) {
@@ -75,7 +75,7 @@ class Oauth extends BaseController
$this->flash->success(t('Your external account is linked to your profile successfully.'));
}
- $this->response->redirect($this->helper->url->to('user', 'external', array('user_id' => $this->userSession->getId())));
+ $this->response->redirect($this->helper->url->to('UserViewController', 'external', array('user_id' => $this->userSession->getId())));
}
/**
@@ -94,7 +94,7 @@ class Oauth extends BaseController
$this->flash->failure(t('Unable to unlink your external account.'));
}
- $this->response->redirect($this->helper->url->to('user', 'external', array('user_id' => $this->userSession->getId())));
+ $this->response->redirect($this->helper->url->to('UserViewController', 'external', array('user_id' => $this->userSession->getId())));
}
/**
diff --git a/app/Controller/Twofactor.php b/app/Controller/Twofactor.php
index 2eb61594..118613b2 100644
--- a/app/Controller/Twofactor.php
+++ b/app/Controller/Twofactor.php
@@ -10,7 +10,7 @@ use Kanboard\Core\Controller\AccessForbiddenException;
* @package controller
* @author Frederic Guillot
*/
-class Twofactor extends User
+class Twofactor extends UserViewController
{
/**
* Only the current user can access to 2FA settings
@@ -192,7 +192,7 @@ class Twofactor extends User
'twofactor_secret' => '',
));
- return $this->response->redirect($this->helper->url->to('user', 'show', array('user_id' => $user['id'])));
+ return $this->response->redirect($this->helper->url->to('UserViewController', 'show', array('user_id' => $user['id'])));
}
return $this->response->html($this->helper->layout->user('twofactor/disable', array(
diff --git a/app/Controller/UserHelper.php b/app/Controller/UserAjaxController.php
index d5e0920d..7b365667 100644
--- a/app/Controller/UserHelper.php
+++ b/app/Controller/UserAjaxController.php
@@ -7,12 +7,12 @@ use Kanboard\Formatter\UserAutoCompleteFormatter;
use Kanboard\Model\User as UserModel;
/**
- * User Helper
+ * User Ajax Controller
*
- * @package controller
+ * @package Kanboard\Controller
* @author Frederic Guillot
*/
-class UserHelper extends BaseController
+class UserAjaxController extends BaseController
{
/**
* User auto-completion (Ajax)
diff --git a/app/Controller/UserCreationController.php b/app/Controller/UserCreationController.php
index d1c554ae..49f9db54 100644
--- a/app/Controller/UserCreationController.php
+++ b/app/Controller/UserCreationController.php
@@ -74,10 +74,10 @@ class UserCreationController extends BaseController
}
$this->flash->success(t('User created successfully.'));
- $this->response->redirect($this->helper->url->to('user', 'show', array('user_id' => $user_id)));
+ $this->response->redirect($this->helper->url->to('UserViewController', 'show', array('user_id' => $user_id)));
} else {
$this->flash->failure(t('Unable to create your user.'));
- $this->response->redirect($this->helper->url->to('user', 'index'));
+ $this->response->redirect($this->helper->url->to('UserListController', 'show'));
}
}
}
diff --git a/app/Controller/UserImportController.php b/app/Controller/UserImportController.php
index b3cb52d1..fec9a31d 100644
--- a/app/Controller/UserImportController.php
+++ b/app/Controller/UserImportController.php
@@ -43,7 +43,7 @@ class UserImportController extends BaseController
$this->importFile($values, $filename);
}
- $this->response->redirect($this->helper->url->to('user', 'index'));
+ $this->response->redirect($this->helper->url->to('UserListController', 'show'));
}
/**
diff --git a/app/Controller/UserListController.php b/app/Controller/UserListController.php
new file mode 100644
index 00000000..685746fb
--- /dev/null
+++ b/app/Controller/UserListController.php
@@ -0,0 +1,32 @@
+<?php
+
+namespace Kanboard\Controller;
+
+/**
+ * Class User List Controller
+ *
+ * @package Kanboard\Controller
+ * @author Frederic Guillot
+ */
+class UserListController extends BaseController
+{
+ /**
+ * List all users
+ *
+ * @access public
+ */
+ public function show()
+ {
+ $paginator = $this->paginator
+ ->setUrl('UserListController', 'show')
+ ->setMax(30)
+ ->setOrder('username')
+ ->setQuery($this->user->getQuery())
+ ->calculate();
+
+ $this->response->html($this->helper->layout->app('user_list/show', array(
+ 'title' => t('Users').' ('.$paginator->getTotal().')',
+ 'paginator' => $paginator,
+ )));
+ }
+}
diff --git a/app/Controller/UserStatusController.php b/app/Controller/UserStatusController.php
index 2b23505c..bc40a7dd 100644
--- a/app/Controller/UserStatusController.php
+++ b/app/Controller/UserStatusController.php
@@ -40,7 +40,7 @@ class UserStatusController extends BaseController
$this->flash->failure(t('Unable to remove this user.'));
}
- $this->response->redirect($this->helper->url->to('user', 'index'));
+ $this->response->redirect($this->helper->url->to('UserListController', 'show'));
}
/**
@@ -73,7 +73,7 @@ class UserStatusController extends BaseController
$this->flash->failure(t('Unable to enable this user.'));
}
- $this->response->redirect($this->helper->url->to('user', 'index'));
+ $this->response->redirect($this->helper->url->to('UserListController', 'show'));
}
/**
@@ -106,6 +106,6 @@ class UserStatusController extends BaseController
$this->flash->failure(t('Unable to disable this user.'));
}
- $this->response->redirect($this->helper->url->to('user', 'index'));
+ $this->response->redirect($this->helper->url->to('UserListController', 'show'));
}
}
diff --git a/app/Controller/User.php b/app/Controller/UserViewController.php
index 190acb61..dc03f419 100644
--- a/app/Controller/User.php
+++ b/app/Controller/UserViewController.php
@@ -6,34 +6,14 @@ use Kanboard\Core\Controller\PageNotFoundException;
use Kanboard\Model\Project as ProjectModel;
/**
- * User controller
+ * Class UserViewController
*
- * @package controller
- * @author Frederic Guillot
+ * @package Kanboard\Controller
+ * @author Frederic Guillot
*/
-class User extends BaseController
+class UserViewController extends BaseController
{
/**
- * List all users
- *
- * @access public
- */
- public function index()
- {
- $paginator = $this->paginator
- ->setUrl('user', 'index')
- ->setMax(30)
- ->setOrder('username')
- ->setQuery($this->user->getQuery())
- ->calculate();
-
- $this->response->html($this->helper->layout->app('user/index', array(
- 'title' => t('Users').' ('.$paginator->getTotal().')',
- 'paginator' => $paginator,
- )));
- }
-
- /**
* Public user profile
*
* @access public
@@ -47,7 +27,7 @@ class User extends BaseController
throw new PageNotFoundException();
}
- $this->response->html($this->helper->layout->app('user/profile', array(
+ $this->response->html($this->helper->layout->app('user_view/profile', array(
'title' => $user['name'] ?: $user['username'],
'user' => $user,
)));
@@ -61,7 +41,7 @@ class User extends BaseController
public function show()
{
$user = $this->getUser();
- $this->response->html($this->helper->layout->user('user/show', array(
+ $this->response->html($this->helper->layout->user('user_view/show', array(
'user' => $user,
'timezones' => $this->timezone->getTimezones(true),
'languages' => $this->language->getLanguages(true),
@@ -78,14 +58,14 @@ class User extends BaseController
$user = $this->getUser();
$subtask_paginator = $this->paginator
- ->setUrl('user', 'timesheet', array('user_id' => $user['id'], 'pagination' => 'subtasks'))
+ ->setUrl('UserViewController', 'timesheet', array('user_id' => $user['id'], 'pagination' => 'subtasks'))
->setMax(20)
->setOrder('start')
->setDirection('DESC')
->setQuery($this->subtaskTimeTracking->getUserQuery($user['id']))
->calculateOnlyIf($this->request->getStringParam('pagination') === 'subtasks');
- $this->response->html($this->helper->layout->user('user/timesheet', array(
+ $this->response->html($this->helper->layout->user('user_view/timesheet', array(
'subtask_paginator' => $subtask_paginator,
'user' => $user,
)));
@@ -99,7 +79,7 @@ class User extends BaseController
public function passwordReset()
{
$user = $this->getUser();
- $this->response->html($this->helper->layout->user('user/password_reset', array(
+ $this->response->html($this->helper->layout->user('user_view/password_reset', array(
'tokens' => $this->passwordReset->getAll($user['id']),
'user' => $user,
)));
@@ -110,10 +90,10 @@ class User extends BaseController
*
* @access public
*/
- public function last()
+ public function lastLogin()
{
$user = $this->getUser();
- $this->response->html($this->helper->layout->user('user/last', array(
+ $this->response->html($this->helper->layout->user('user_view/last', array(
'last_logins' => $this->lastLogin->getAll($user['id']),
'user' => $user,
)));
@@ -127,7 +107,7 @@ class User extends BaseController
public function sessions()
{
$user = $this->getUser();
- $this->response->html($this->helper->layout->user('user/sessions', array(
+ $this->response->html($this->helper->layout->user('user_view/sessions', array(
'sessions' => $this->rememberMeSession->getAll($user['id']),
'user' => $user,
)));
@@ -143,7 +123,7 @@ class User extends BaseController
$this->checkCSRFParam();
$user = $this->getUser();
$this->rememberMeSession->remove($this->request->getIntegerParam('id'));
- $this->response->redirect($this->helper->url->to('user', 'sessions', array('user_id' => $user['id'])));
+ $this->response->redirect($this->helper->url->to('UserViewController', 'sessions', array('user_id' => $user['id'])));
}
/**
@@ -159,10 +139,10 @@ class User extends BaseController
$values = $this->request->getValues();
$this->userNotification->saveSettings($user['id'], $values);
$this->flash->success(t('User updated successfully.'));
- return $this->response->redirect($this->helper->url->to('user', 'notifications', array('user_id' => $user['id'])));
+ return $this->response->redirect($this->helper->url->to('UserViewController', 'notifications', array('user_id' => $user['id'])));
}
- return $this->response->html($this->helper->layout->user('user/notifications', array(
+ return $this->response->html($this->helper->layout->user('user_view/notifications', array(
'projects' => $this->projectUserRole->getProjectsByUser($user['id'], array(ProjectModel::ACTIVE)),
'notifications' => $this->userNotification->readSettings($user['id']),
'types' => $this->userNotificationType->getTypes(),
@@ -184,10 +164,10 @@ class User extends BaseController
$values = $this->request->getValues();
$this->userMetadata->save($user['id'], $values);
$this->flash->success(t('User updated successfully.'));
- $this->response->redirect($this->helper->url->to('user', 'integrations', array('user_id' => $user['id'])));
+ $this->response->redirect($this->helper->url->to('UserViewController', 'integrations', array('user_id' => $user['id'])));
}
- $this->response->html($this->helper->layout->user('user/integrations', array(
+ $this->response->html($this->helper->layout->user('user_view/integrations', array(
'user' => $user,
'values' => $this->userMetadata->getAll($user['id']),
)));
@@ -201,7 +181,7 @@ class User extends BaseController
public function external()
{
$user = $this->getUser();
- $this->response->html($this->helper->layout->user('user/external', array(
+ $this->response->html($this->helper->layout->user('user_view/external', array(
'last_logins' => $this->lastLogin->getAll($user['id']),
'user' => $user,
)));
@@ -226,10 +206,10 @@ class User extends BaseController
$this->flash->failure(t('Unable to update this user.'));
}
- return $this->response->redirect($this->helper->url->to('user', 'share', array('user_id' => $user['id'])));
+ return $this->response->redirect($this->helper->url->to('UserViewController', 'share', array('user_id' => $user['id'])));
}
- return $this->response->html($this->helper->layout->user('user/share', array(
+ return $this->response->html($this->helper->layout->user('user_view/share', array(
'user' => $user,
'title' => t('Public access'),
)));
@@ -257,11 +237,11 @@ class User extends BaseController
$this->flash->failure(t('Unable to change the password.'));
}
- return $this->response->redirect($this->helper->url->to('user', 'show', array('user_id' => $user['id'])));
+ return $this->response->redirect($this->helper->url->to('UserViewController', 'show', array('user_id' => $user['id'])));
}
}
- return $this->response->html($this->helper->layout->user('user/password', array(
+ return $this->response->html($this->helper->layout->user('user_view/password', array(
'values' => $values,
'errors' => $errors,
'user' => $user,
@@ -299,11 +279,11 @@ class User extends BaseController
$this->flash->failure(t('Unable to update your user.'));
}
- return $this->response->redirect($this->helper->url->to('user', 'show', array('user_id' => $user['id'])));
+ return $this->response->redirect($this->helper->url->to('UserViewController', 'show', array('user_id' => $user['id'])));
}
}
- return $this->response->html($this->helper->layout->user('user/edit', array(
+ return $this->response->html($this->helper->layout->user('user_view/edit', array(
'values' => $values,
'errors' => $errors,
'user' => $user,
@@ -337,11 +317,11 @@ class User extends BaseController
$this->flash->failure(t('Unable to update your user.'));
}
- return $this->response->redirect($this->helper->url->to('user', 'authentication', array('user_id' => $user['id'])));
+ return $this->response->redirect($this->helper->url->to('UserViewController', 'authentication', array('user_id' => $user['id'])));
}
}
- return $this->response->html($this->helper->layout->user('user/authentication', array(
+ return $this->response->html($this->helper->layout->user('user_view/authentication', array(
'values' => $values,
'errors' => $errors,
'user' => $user,
diff --git a/app/Core/Markdown.php b/app/Core/Markdown.php
index 8275c752..0e7b6425 100644
--- a/app/Core/Markdown.php
+++ b/app/Core/Markdown.php
@@ -90,7 +90,7 @@ class Markdown extends Parsedown
$user_id = $this->container['user']->getIdByUsername($matches[1]);
if (! empty($user_id)) {
- $url = $this->container['helper']->url->href('user', 'profile', array('user_id' => $user_id));
+ $url = $this->container['helper']->url->href('UserViewController', 'profile', array('user_id' => $user_id));
return array(
'extent' => strlen($matches[0]),
diff --git a/app/Helper/LayoutHelper.php b/app/Helper/LayoutHelper.php
index 39defc88..75cd178a 100644
--- a/app/Helper/LayoutHelper.php
+++ b/app/Helper/LayoutHelper.php
@@ -47,7 +47,7 @@ class LayoutHelper extends Base
$params['title'] = '#'.$params['user']['id'].' '.($params['user']['name'] ?: $params['user']['username']);
}
- return $this->subLayout('user/layout', 'user/sidebar', $template, $params);
+ return $this->subLayout('user_view/layout', 'user_view/sidebar', $template, $params);
}
/**
diff --git a/app/ServiceProvider/AuthenticationProvider.php b/app/ServiceProvider/AuthenticationProvider.php
index 5540bf88..fbc10abf 100644
--- a/app/ServiceProvider/AuthenticationProvider.php
+++ b/app/ServiceProvider/AuthenticationProvider.php
@@ -100,7 +100,7 @@ class AuthenticationProvider implements ServiceProviderInterface
$acl->add('TaskExternalLink', '*', Role::PROJECT_MEMBER);
$acl->add('Taskmodification', '*', Role::PROJECT_MEMBER);
$acl->add('Taskstatus', '*', Role::PROJECT_MEMBER);
- $acl->add('UserHelper', array('mention'), Role::PROJECT_MEMBER);
+ $acl->add('UserAjaxController', array('mention'), Role::PROJECT_MEMBER);
return $acl;
}
@@ -141,8 +141,9 @@ class AuthenticationProvider implements ServiceProviderInterface
$acl->add('Twofactor', 'disable', Role::APP_ADMIN);
$acl->add('UserImportController', '*', Role::APP_ADMIN);
$acl->add('UserCreationController', '*', Role::APP_ADMIN);
- $acl->add('User', array('index', 'authentication'), Role::APP_ADMIN);
+ $acl->add('UserListController', '*', Role::APP_ADMIN);
$acl->add('UserStatusController', '*', Role::APP_ADMIN);
+ $acl->add('UserViewController', array('authentication'), Role::APP_ADMIN);
return $acl;
}
diff --git a/app/ServiceProvider/RouteProvider.php b/app/ServiceProvider/RouteProvider.php
index a6d6abef..359bd220 100644
--- a/app/ServiceProvider/RouteProvider.php
+++ b/app/ServiceProvider/RouteProvider.php
@@ -144,19 +144,19 @@ class RouteProvider implements ServiceProviderInterface
$container['route']->addRoute('ical/user/:token', 'ical', 'user');
// Users
- $container['route']->addRoute('users', 'user', 'index');
- $container['route']->addRoute('user/profile/:user_id', 'user', 'profile');
- $container['route']->addRoute('user/show/:user_id', 'user', 'show');
- $container['route']->addRoute('user/show/:user_id/timesheet', 'user', 'timesheet');
- $container['route']->addRoute('user/show/:user_id/last-logins', 'user', 'last');
- $container['route']->addRoute('user/show/:user_id/sessions', 'user', 'sessions');
- $container['route']->addRoute('user/:user_id/edit', 'user', 'edit');
- $container['route']->addRoute('user/:user_id/password', 'user', 'password');
- $container['route']->addRoute('user/:user_id/share', 'user', 'share');
- $container['route']->addRoute('user/:user_id/notifications', 'user', 'notifications');
- $container['route']->addRoute('user/:user_id/accounts', 'user', 'external');
- $container['route']->addRoute('user/:user_id/integrations', 'user', 'integrations');
- $container['route']->addRoute('user/:user_id/authentication', 'user', 'authentication');
+ $container['route']->addRoute('users', 'UserListController', 'show');
+ $container['route']->addRoute('user/profile/:user_id', 'UserViewController', 'profile');
+ $container['route']->addRoute('user/show/:user_id', 'UserViewController', 'show');
+ $container['route']->addRoute('user/show/:user_id/timesheet', 'UserViewController', 'timesheet');
+ $container['route']->addRoute('user/show/:user_id/last-logins', 'UserViewController', 'lastLogin');
+ $container['route']->addRoute('user/show/:user_id/sessions', 'UserViewController', 'sessions');
+ $container['route']->addRoute('user/:user_id/edit', 'UserViewController', 'edit');
+ $container['route']->addRoute('user/:user_id/password', 'UserViewController', 'password');
+ $container['route']->addRoute('user/:user_id/share', 'UserViewController', 'share');
+ $container['route']->addRoute('user/:user_id/notifications', 'UserViewController', 'notifications');
+ $container['route']->addRoute('user/:user_id/accounts', 'UserViewController', 'external');
+ $container['route']->addRoute('user/:user_id/integrations', 'UserViewController', 'integrations');
+ $container['route']->addRoute('user/:user_id/authentication', 'UserViewController', 'authentication');
$container['route']->addRoute('user/:user_id/2fa', 'twofactor', 'index');
$container['route']->addRoute('user/:user_id/avatar', 'AvatarFile', 'show');
diff --git a/app/Template/comment/create.php b/app/Template/comment/create.php
index b6c27ae0..fa7c0ca6 100644
--- a/app/Template/comment/create.php
+++ b/app/Template/comment/create.php
@@ -15,7 +15,7 @@
'autofocus',
'required',
'placeholder="'.t('Leave a comment').'"',
- 'data-mention-search-url="'.$this->url->href('UserHelper', 'mention', array('project_id' => $task['project_id'])).'"',
+ 'data-mention-search-url="'.$this->url->href('UserAjaxController', 'mention', array('project_id' => $task['project_id'])).'"',
),
'markdown-editor'
) ?>
diff --git a/app/Template/comments/create.php b/app/Template/comments/create.php
index a638d3b8..633f4392 100644
--- a/app/Template/comments/create.php
+++ b/app/Template/comments/create.php
@@ -12,7 +12,7 @@
'data-markdown-editor-disable-toolbar="true"',
'required',
'placeholder="'.t('Leave a comment').'"',
- 'data-mention-search-url="'.$this->url->href('UserHelper', 'mention', array('project_id' => $task['project_id'])).'"',
+ 'data-mention-search-url="'.$this->url->href('UserAjaxController', 'mention', array('project_id' => $task['project_id'])).'"',
),
'markdown-editor'
) ?>
diff --git a/app/Template/group/index.php b/app/Template/group/index.php
index 74e074c3..1062e18c 100644
--- a/app/Template/group/index.php
+++ b/app/Template/group/index.php
@@ -1,7 +1,7 @@
<section id="main">
<div class="page-header">
<ul>
- <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li>
+ <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'UserListController', 'show') ?></li>
<li><i class="fa fa-user-plus fa-fw"></i><?= $this->url->link(t('New group'), 'GroupCreationController', 'show', array(), false, 'popover') ?></li>
</ul>
</div>
diff --git a/app/Template/group/users.php b/app/Template/group/users.php
index 0f802146..a4895ab7 100644
--- a/app/Template/group/users.php
+++ b/app/Template/group/users.php
@@ -19,10 +19,10 @@
<?php foreach ($paginator->getCollection() as $user): ?>
<tr>
<td>
- <?= $this->url->link('#'.$user['id'], 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link('#'.$user['id'], 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
</td>
<td>
- <?= $this->url->link($this->text->e($user['username']), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link($this->text->e($user['username']), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
</td>
<td>
<?= $this->text->e($user['name']) ?>
diff --git a/app/Template/header.php b/app/Template/header.php
index bac026d3..23906a9e 100644
--- a/app/Template/header.php
+++ b/app/Template/header.php
@@ -67,16 +67,16 @@
</li>
<li>
<i class="fa fa-home fa-fw"></i>
- <?= $this->url->link(t('My profile'), 'user', 'show', array('user_id' => $this->user->getId())) ?>
+ <?= $this->url->link(t('My profile'), 'UserViewController', 'show', array('user_id' => $this->user->getId())) ?>
</li>
<li>
<i class="fa fa-folder fa-fw"></i>
<?= $this->url->link(t('Projects management'), 'project', 'index') ?>
</li>
- <?php if ($this->user->hasAccess('user', 'index')): ?>
+ <?php if ($this->user->hasAccess('UserListController', 'show')): ?>
<li>
<i class="fa fa-user fa-fw"></i>
- <?= $this->url->link(t('Users management'), 'user', 'index') ?>
+ <?= $this->url->link(t('Users management'), 'UserListController', 'show') ?>
</li>
<li>
<i class="fa fa-group fa-fw"></i>
diff --git a/app/Template/layout.php b/app/Template/layout.php
index 701b297d..ff29e18f 100644
--- a/app/Template/layout.php
+++ b/app/Template/layout.php
@@ -44,7 +44,7 @@
<?= $this->hook->render('template:layout:head') ?>
</head>
- <body data-status-url="<?= $this->url->href('UserHelper', 'status') ?>"
+ <body data-status-url="<?= $this->url->href('UserAjaxController', 'status') ?>"
data-login-url="<?= $this->url->href('auth', 'login') ?>"
data-keyboard-shortcut-url="<?= $this->url->href('Doc', 'shortcuts') ?>"
data-timezone="<?= $this->app->getTimezone() ?>"
diff --git a/app/Template/project_permission/index.php b/app/Template/project_permission/index.php
index 6d1fc15c..6c454a28 100644
--- a/app/Template/project_permission/index.php
+++ b/app/Template/project_permission/index.php
@@ -51,7 +51,7 @@
'placeholder="'.t('Enter user name...').'"',
'title="'.t('Enter user name...').'"',
'data-dst-field="user_id"',
- 'data-search-url="'.$this->url->href('UserHelper', 'autocomplete').'"',
+ 'data-search-url="'.$this->url->href('UserAjaxController', 'autocomplete').'"',
),
'autocomplete') ?>
diff --git a/app/Template/task/time_tracking_details.php b/app/Template/task/time_tracking_details.php
index c51b8f5a..d86273c5 100644
--- a/app/Template/task/time_tracking_details.php
+++ b/app/Template/task/time_tracking_details.php
@@ -18,7 +18,7 @@
</tr>
<?php foreach ($subtask_paginator->getCollection() as $record): ?>
<tr>
- <td><?= $this->url->link($this->text->e($record['user_fullname'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?></td>
+ <td><?= $this->url->link($this->text->e($record['user_fullname'] ?: $record['username']), 'UserViewController', 'show', array('user_id' => $record['user_id'])) ?></td>
<td><?= t($record['subtask_title']) ?></td>
<td><?= $this->dt->datetime($record['start']) ?></td>
<td><?= $this->dt->datetime($record['end']) ?></td>
@@ -28,4 +28,4 @@
</table>
<?= $subtask_paginator ?>
-<?php endif ?> \ No newline at end of file
+<?php endif ?>
diff --git a/app/Template/task/transitions.php b/app/Template/task/transitions.php
index 83040177..9e04c4e1 100644
--- a/app/Template/task/transitions.php
+++ b/app/Template/task/transitions.php
@@ -22,9 +22,9 @@
<td><?= $this->dt->datetime($transition['date']) ?></td>
<td><?= $this->text->e($transition['src_column']) ?></td>
<td><?= $this->text->e($transition['dst_column']) ?></td>
- <td><?= $this->url->link($this->text->e($transition['name'] ?: $transition['username']), 'user', 'show', array('user_id' => $transition['user_id'])) ?></td>
+ <td><?= $this->url->link($this->text->e($transition['name'] ?: $transition['username']), 'UserViewController', 'show', array('user_id' => $transition['user_id'])) ?></td>
<td><?= $this->dt->duration($transition['time_spent']) ?></td>
</tr>
<?php endforeach ?>
</table>
-<?php endif ?> \ No newline at end of file
+<?php endif ?>
diff --git a/app/Template/task_creation/show.php b/app/Template/task_creation/show.php
index d3991177..cecf459d 100644
--- a/app/Template/task_creation/show.php
+++ b/app/Template/task_creation/show.php
@@ -18,7 +18,7 @@
array(
'placeholder="'.t('Leave a description').'"',
'tabindex="2"',
- 'data-mention-search-url="'.$this->url->href('UserHelper', 'mention', array('project_id' => $values['project_id'])).'"'
+ 'data-mention-search-url="'.$this->url->href('UserAjaxController', 'mention', array('project_id' => $values['project_id'])).'"'
),
'markdown-editor'
) ?>
diff --git a/app/Template/task_internal_link/table.php b/app/Template/task_internal_link/table.php
index 8f25b29b..57a3536c 100644
--- a/app/Template/task_internal_link/table.php
+++ b/app/Template/task_internal_link/table.php
@@ -52,7 +52,7 @@
<td>
<?php if (! empty($link['task_assignee_username'])): ?>
<?php if ($editable): ?>
- <?= $this->url->link($this->text->e($link['task_assignee_name'] ?: $link['task_assignee_username']), 'user', 'show', array('user_id' => $link['task_assignee_id'])) ?>
+ <?= $this->url->link($this->text->e($link['task_assignee_name'] ?: $link['task_assignee_username']), 'UserViewController', 'show', array('user_id' => $link['task_assignee_id'])) ?>
<?php else: ?>
<?= $this->text->e($link['task_assignee_name'] ?: $link['task_assignee_username']) ?>
<?php endif ?>
@@ -82,4 +82,4 @@
<?php endforeach ?>
<?php endforeach ?>
</table>
-<?php endif ?> \ No newline at end of file
+<?php endif ?>
diff --git a/app/Template/task_modification/edit_description.php b/app/Template/task_modification/edit_description.php
index 8c149f4f..801b4005 100644
--- a/app/Template/task_modification/edit_description.php
+++ b/app/Template/task_modification/edit_description.php
@@ -14,7 +14,7 @@
array(
'autofocus',
'placeholder="'.t('Leave a description').'"',
- 'data-mention-search-url="'.$this->url->href('UserHelper', 'mention', array('project_id' => $task['project_id'])).'"'
+ 'data-mention-search-url="'.$this->url->href('UserAjaxController', 'mention', array('project_id' => $task['project_id'])).'"'
),
'markdown-editor'
) ?>
diff --git a/app/Template/twofactor/disable.php b/app/Template/twofactor/disable.php
index 36be4ef9..bdbe1233 100644
--- a/app/Template/twofactor/disable.php
+++ b/app/Template/twofactor/disable.php
@@ -9,6 +9,6 @@
<div class="form-actions">
<?= $this->url->link(t('Yes'), 'twofactor', 'disable', array('user_id' => $user['id'], 'disable' => 'yes'), true, 'btn btn-red') ?>
- <?= t('or') ?> <?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= t('or') ?> <?= $this->url->link(t('cancel'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
</div>
-</div> \ No newline at end of file
+</div>
diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php
deleted file mode 100644
index 9da43ced..00000000
--- a/app/Template/user/sidebar.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<div class="sidebar">
- <h2><?= t('Information') ?></h2>
- <ul>
- <?php if ($this->user->hasAccess('user', 'show')): ?>
- <li <?= $this->app->checkMenuSelection('user', 'show') ?>>
- <?= $this->url->link(t('Summary'), 'user', 'show', array('user_id' => $user['id'])) ?>
- </li>
- <?php endif ?>
- <?php if ($this->user->isAdmin()): ?>
- <li>
- <?= $this->url->link(t('User dashboard'), 'DashboardController', 'show', array('user_id' => $user['id'])) ?>
- </li>
- <?php endif ?>
- <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?>
- <li <?= $this->app->checkMenuSelection('user', 'timesheet') ?>>
- <?= $this->url->link(t('Time tracking'), 'user', 'timesheet', array('user_id' => $user['id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('user', 'last') ?>>
- <?= $this->url->link(t('Last logins'), 'user', 'last', array('user_id' => $user['id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('user', 'sessions') ?>>
- <?= $this->url->link(t('Persistent connections'), 'user', 'sessions', array('user_id' => $user['id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('user', 'passwordReset') ?>>
- <?= $this->url->link(t('Password reset history'), 'user', 'passwordReset', array('user_id' => $user['id'])) ?>
- </li>
- <?php endif ?>
-
- <?= $this->hook->render('template:user:sidebar:information', array('user' => $user)) ?>
- </ul>
-
- <h2><?= t('Actions') ?></h2>
- <ul>
- <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?>
-
- <?php if ($this->user->hasAccess('user', 'edit')): ?>
- <li <?= $this->app->checkMenuSelection('user', 'edit') ?>>
- <?= $this->url->link(t('Edit profile'), 'user', 'edit', array('user_id' => $user['id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('AvatarFile') ?>>
- <?= $this->url->link(t('Avatar'), 'AvatarFile', 'show', array('user_id' => $user['id'])) ?>
- </li>
- <?php endif ?>
-
- <?php if ($user['is_ldap_user'] == 0): ?>
- <li <?= $this->app->checkMenuSelection('user', 'password') ?>>
- <?= $this->url->link(t('Change password'), 'user', 'password', array('user_id' => $user['id'])) ?>
- </li>
- <?php endif ?>
-
- <?php if ($this->user->isCurrentUser($user['id'])): ?>
- <li <?= $this->app->checkMenuSelection('twofactor', 'index') ?>>
- <?= $this->url->link(t('Two factor authentication'), 'twofactor', 'index', array('user_id' => $user['id'])) ?>
- </li>
- <?php elseif ($this->user->hasAccess('twofactor', 'disable') && $user['twofactor_activated'] == 1): ?>
- <li <?= $this->app->checkMenuSelection('twofactor', 'disable') ?>>
- <?= $this->url->link(t('Two factor authentication'), 'twofactor', 'disable', array('user_id' => $user['id'])) ?>
- </li>
- <?php endif ?>
-
- <li <?= $this->app->checkMenuSelection('user', 'share') ?>>
- <?= $this->url->link(t('Public access'), 'user', 'share', array('user_id' => $user['id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('user', 'notifications') ?>>
- <?= $this->url->link(t('Notifications'), 'user', 'notifications', array('user_id' => $user['id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('user', 'external') ?>>
- <?= $this->url->link(t('External accounts'), 'user', 'external', array('user_id' => $user['id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('user', 'integrations') ?>>
- <?= $this->url->link(t('Integrations'), 'user', 'integrations', array('user_id' => $user['id'])) ?>
- </li>
- <?php endif ?>
-
- <?php if ($this->user->hasAccess('user', 'authentication')): ?>
- <li <?= $this->app->checkMenuSelection('user', 'authentication') ?>>
- <?= $this->url->link(t('Edit Authentication'), 'user', 'authentication', array('user_id' => $user['id'])) ?>
- </li>
- <?php endif ?>
-
- <?= $this->hook->render('template:user:sidebar:actions', array('user' => $user)) ?>
- </ul>
-</div>
diff --git a/app/Template/user_creation/local.php b/app/Template/user_creation/local.php
index a83074e8..4c224cec 100644
--- a/app/Template/user_creation/local.php
+++ b/app/Template/user_creation/local.php
@@ -40,6 +40,6 @@
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'user', 'index', array(), false, 'close-popover') ?>
+ <?= $this->url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?>
</div>
</form>
diff --git a/app/Template/user_creation/remote.php b/app/Template/user_creation/remote.php
index 5266fce8..dc4981a4 100644
--- a/app/Template/user_creation/remote.php
+++ b/app/Template/user_creation/remote.php
@@ -39,7 +39,7 @@
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'user', 'index', array(), false, 'close-popover') ?>
+ <?= $this->url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?>
</div>
</form>
<div class="alert alert-info">
diff --git a/app/Template/user_import/show.php b/app/Template/user_import/show.php
index 54a66237..663f107e 100644
--- a/app/Template/user_import/show.php
+++ b/app/Template/user_import/show.php
@@ -36,6 +36,6 @@
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Import') ?></button>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'user', 'index', array(), false, 'close-popover') ?>
+ <?= $this->url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?>
</div>
</form>
diff --git a/app/Template/user/dropdown.php b/app/Template/user_list/dropdown.php
index 086bf01b..9e90c230 100644
--- a/app/Template/user/dropdown.php
+++ b/app/Template/user_list/dropdown.php
@@ -3,7 +3,7 @@
<ul>
<li>
<i class="fa fa-user fa-fw"></i>
- <?= $this->url->link(t('View profile'), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('View profile'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
</li>
<?php if ($user['is_active'] == 1 && $this->user->hasAccess('UserStatusController', 'disable') && ! $this->user->isCurrentUser($user['id'])): ?>
<li>
diff --git a/app/Template/user/index.php b/app/Template/user_list/show.php
index 15923e84..b2bd9377 100644
--- a/app/Template/user/index.php
+++ b/app/Template/user_list/show.php
@@ -30,7 +30,7 @@
<?= '#'.$user['id'] ?>
</td>
<td>
- <?= $this->url->link($this->text->e($user['username']), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link($this->text->e($user['username']), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
</td>
<td>
<?= $this->text->e($user['name']) ?>
@@ -55,7 +55,7 @@
<?php endif ?>
</td>
<td>
- <?= $this->render('user/dropdown', array('user' => $user)) ?>
+ <?= $this->render('user_list/dropdown', array('user' => $user)) ?>
</td>
</tr>
<?php endforeach ?>
diff --git a/app/Template/user_status/disable.php b/app/Template/user_status/disable.php
index b551b3b8..d30b0c20 100644
--- a/app/Template/user_status/disable.php
+++ b/app/Template/user_status/disable.php
@@ -8,6 +8,6 @@
<div class="form-actions">
<?= $this->url->link(t('Yes'), 'UserStatusController', 'disable', array('user_id' => $user['id']), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'user', 'index', array(), false, 'close-popover') ?>
+ <?= $this->url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?>
</div>
</div>
diff --git a/app/Template/user_status/enable.php b/app/Template/user_status/enable.php
index fe527047..29d25eee 100644
--- a/app/Template/user_status/enable.php
+++ b/app/Template/user_status/enable.php
@@ -8,6 +8,6 @@
<div class="form-actions">
<?= $this->url->link(t('Yes'), 'UserStatusController', 'enable', array('user_id' => $user['id']), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'user', 'index', array(), false, 'close-popover') ?>
+ <?= $this->url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?>
</div>
</div>
diff --git a/app/Template/user_status/remove.php b/app/Template/user_status/remove.php
index c8458092..2b8f2df5 100644
--- a/app/Template/user_status/remove.php
+++ b/app/Template/user_status/remove.php
@@ -8,6 +8,6 @@
<div class="form-actions">
<?= $this->url->link(t('Yes'), 'UserStatusController', 'remove', array('user_id' => $user['id']), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'user', 'index', array(), false, 'close-popover') ?>
+ <?= $this->url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?>
</div>
</div>
diff --git a/app/Template/user/authentication.php b/app/Template/user_view/authentication.php
index 6cfd4e57..44643388 100644
--- a/app/Template/user/authentication.php
+++ b/app/Template/user_view/authentication.php
@@ -1,8 +1,7 @@
<div class="page-header">
<h2><?= t('Edit Authentication') ?></h2>
</div>
-<form method="post" action="<?= $this->url->href('user', 'authentication', array('user_id' => $user['id'])) ?>" autocomplete="off">
-
+<form method="post" action="<?= $this->url->href('UserViewController', 'authentication', array('user_id' => $user['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->hidden('id', $values) ?>
@@ -16,7 +15,7 @@
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
</div>
<div class="alert alert-info">
@@ -25,4 +24,4 @@
<li><?= t('If you check the box "Disallow login form", credentials entered in the login form will be ignored.') ?></li>
</ul>
</div>
-</form> \ No newline at end of file
+</form>
diff --git a/app/Template/user/edit.php b/app/Template/user_view/edit.php
index 7b51eb73..18947905 100644
--- a/app/Template/user/edit.php
+++ b/app/Template/user_view/edit.php
@@ -1,7 +1,7 @@
<div class="page-header">
<h2><?= t('Edit user') ?></h2>
</div>
-<form method="post" action="<?= $this->url->href('user', 'edit', array('user_id' => $user['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('UserViewController', 'edit', array('user_id' => $user['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
@@ -30,6 +30,6 @@
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
</div>
-</form> \ No newline at end of file
+</form>
diff --git a/app/Template/user/external.php b/app/Template/user_view/external.php
index 22c25af2..22c25af2 100644
--- a/app/Template/user/external.php
+++ b/app/Template/user_view/external.php
diff --git a/app/Template/user/integrations.php b/app/Template/user_view/integrations.php
index ef9d8e71..4a237346 100644
--- a/app/Template/user/integrations.php
+++ b/app/Template/user_view/integrations.php
@@ -2,7 +2,7 @@
<h2><?= t('Integrations') ?></h2>
</div>
-<form method="post" action="<?= $this->url->href('user', 'integrations', array('user_id' => $user['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('UserViewController', 'integrations', array('user_id' => $user['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?php $hooks = $this->hook->render('template:user:integrations', array('values' => $values)) ?>
<?php if (! empty($hooks)): ?>
diff --git a/app/Template/user/last.php b/app/Template/user_view/last.php
index 3de4d5e2..3de4d5e2 100644
--- a/app/Template/user/last.php
+++ b/app/Template/user_view/last.php
diff --git a/app/Template/user/layout.php b/app/Template/user_view/layout.php
index 2c4bb7be..c3604b99 100644
--- a/app/Template/user/layout.php
+++ b/app/Template/user_view/layout.php
@@ -2,7 +2,7 @@
<div class="page-header">
<?php if ($this->user->hasAccess('UserCreationController', 'show')): ?>
<ul>
- <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li>
+ <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'UserListController', 'show') ?></li>
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'UserCreationController', 'show', array(), false, 'popover') ?></li>
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New remote user'), 'UserCreationController', 'show', array('remote' => 1), false, 'popover') ?></li>
<li><i class="fa fa-upload fa-fw"></i><?= $this->url->link(t('Import'), 'UserImportController', 'show', array(), false, 'popover') ?></li>
@@ -11,7 +11,7 @@
<?php endif ?>
</div>
<section class="sidebar-container" id="user-section">
- <?= $this->render('user/sidebar', array('user' => $user)) ?>
+ <?= $this->render('user_view/sidebar', array('user' => $user)) ?>
<div class="sidebar-content">
<?= $content_for_sublayout ?>
</div>
diff --git a/app/Template/user/notifications.php b/app/Template/user_view/notifications.php
index 6e1a0004..84ca1282 100644
--- a/app/Template/user/notifications.php
+++ b/app/Template/user_view/notifications.php
@@ -2,7 +2,7 @@
<h2><?= t('Notifications') ?></h2>
</div>
-<form method="post" action="<?= $this->url->href('user', 'notifications', array('user_id' => $user['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('UserViewController', 'notifications', array('user_id' => $user['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<h4><?= t('Notification methods:') ?></h4>
@@ -21,6 +21,6 @@
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
</div>
-</form> \ No newline at end of file
+</form>
diff --git a/app/Template/user/password.php b/app/Template/user_view/password.php
index ea6e997d..32ff9d5c 100644
--- a/app/Template/user/password.php
+++ b/app/Template/user_view/password.php
@@ -2,7 +2,7 @@
<h2><?= t('Password modification') ?></h2>
</div>
-<form method="post" action="<?= $this->url->href('user', 'password', array('user_id' => $user['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('UserViewController', 'password', array('user_id' => $user['id'])) ?>" autocomplete="off">
<?= $this->form->hidden('id', $values) ?>
<?= $this->form->csrf() ?>
@@ -21,6 +21,6 @@
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
</div>
</form>
diff --git a/app/Template/user/password_reset.php b/app/Template/user_view/password_reset.php
index 1371ce11..1371ce11 100644
--- a/app/Template/user/password_reset.php
+++ b/app/Template/user_view/password_reset.php
diff --git a/app/Template/user/profile.php b/app/Template/user_view/profile.php
index 9c9d3282..9c9d3282 100644
--- a/app/Template/user/profile.php
+++ b/app/Template/user_view/profile.php
diff --git a/app/Template/user/sessions.php b/app/Template/user_view/sessions.php
index d7fe895d..eda3ef7f 100644
--- a/app/Template/user/sessions.php
+++ b/app/Template/user_view/sessions.php
@@ -19,7 +19,7 @@
<td><?= $this->dt->datetime($session['expiration']) ?></td>
<td><?= $this->text->e($session['ip']) ?></td>
<td><?= $this->text->e($session['user_agent']) ?></td>
- <td><?= $this->url->link(t('Remove'), 'User', 'removeSession', array('user_id' => $user['id'], 'id' => $session['id']), true) ?></td>
+ <td><?= $this->url->link(t('Remove'), 'UserViewController', 'removeSession', array('user_id' => $user['id'], 'id' => $session['id']), true) ?></td>
</tr>
<?php endforeach ?>
</table>
diff --git a/app/Template/user/share.php b/app/Template/user_view/share.php
index 56dc8675..9ef150e8 100644
--- a/app/Template/user/share.php
+++ b/app/Template/user_view/share.php
@@ -3,16 +3,13 @@
</div>
<?php if (! empty($user['token'])): ?>
-
<div class="listing">
<ul class="no-bullet">
<li><strong><i class="fa fa-rss-square"></i> <?= $this->url->link(t('RSS feed'), 'feed', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li>
<li><strong><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ical', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li>
</ul>
</div>
-
- <?= $this->url->link(t('Disable public access'), 'user', 'share', array('user_id' => $user['id'], 'switch' => 'disable'), true, 'btn btn-red') ?>
-
+ <?= $this->url->link(t('Disable public access'), 'UserViewController', 'share', array('user_id' => $user['id'], 'switch' => 'disable'), true, 'btn btn-red') ?>
<?php else: ?>
- <?= $this->url->link(t('Enable public access'), 'user', 'share', array('user_id' => $user['id'], 'switch' => 'enable'), true, 'btn btn-blue') ?>
+ <?= $this->url->link(t('Enable public access'), 'UserViewController', 'share', array('user_id' => $user['id'], 'switch' => 'enable'), true, 'btn btn-blue') ?>
<?php endif ?>
diff --git a/app/Template/user/show.php b/app/Template/user_view/show.php
index df0affb8..df0affb8 100644
--- a/app/Template/user/show.php
+++ b/app/Template/user_view/show.php
diff --git a/app/Template/user_view/sidebar.php b/app/Template/user_view/sidebar.php
new file mode 100644
index 00000000..9a25df16
--- /dev/null
+++ b/app/Template/user_view/sidebar.php
@@ -0,0 +1,83 @@
+<div class="sidebar">
+ <h2><?= t('Information') ?></h2>
+ <ul>
+ <?php if ($this->user->hasAccess('UserViewController', 'show')): ?>
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'show') ?>>
+ <?= $this->url->link(t('Summary'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
+ </li>
+ <?php endif ?>
+ <?php if ($this->user->isAdmin()): ?>
+ <li>
+ <?= $this->url->link(t('User dashboard'), 'DashboardController', 'show', array('user_id' => $user['id'])) ?>
+ </li>
+ <?php endif ?>
+ <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?>
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'timesheet') ?>>
+ <?= $this->url->link(t('Time tracking'), 'UserViewController', 'timesheet', array('user_id' => $user['id'])) ?>
+ </li>
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'lastLogin') ?>>
+ <?= $this->url->link(t('Last logins'), 'UserViewController', 'lastLogin', array('user_id' => $user['id'])) ?>
+ </li>
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'sessions') ?>>
+ <?= $this->url->link(t('Persistent connections'), 'UserViewController', 'sessions', array('user_id' => $user['id'])) ?>
+ </li>
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'passwordReset') ?>>
+ <?= $this->url->link(t('Password reset history'), 'UserViewController', 'passwordReset', array('user_id' => $user['id'])) ?>
+ </li>
+ <?php endif ?>
+
+ <?= $this->hook->render('template:user:sidebar:information', array('user' => $user)) ?>
+ </ul>
+
+ <h2><?= t('Actions') ?></h2>
+ <ul>
+ <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?>
+
+ <?php if ($this->user->hasAccess('UserViewController', 'edit')): ?>
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'edit') ?>>
+ <?= $this->url->link(t('Edit profile'), 'UserViewController', 'edit', array('user_id' => $user['id'])) ?>
+ </li>
+ <li <?= $this->app->checkMenuSelection('AvatarFile') ?>>
+ <?= $this->url->link(t('Avatar'), 'AvatarFile', 'show', array('user_id' => $user['id'])) ?>
+ </li>
+ <?php endif ?>
+
+ <?php if ($user['is_ldap_user'] == 0): ?>
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'password') ?>>
+ <?= $this->url->link(t('Change password'), 'UserViewController', 'password', array('user_id' => $user['id'])) ?>
+ </li>
+ <?php endif ?>
+
+ <?php if ($this->user->isCurrentUser($user['id'])): ?>
+ <li <?= $this->app->checkMenuSelection('twofactor', 'index') ?>>
+ <?= $this->url->link(t('Two factor authentication'), 'twofactor', 'index', array('user_id' => $user['id'])) ?>
+ </li>
+ <?php elseif ($this->user->hasAccess('twofactor', 'disable') && $user['twofactor_activated'] == 1): ?>
+ <li <?= $this->app->checkMenuSelection('twofactor', 'disable') ?>>
+ <?= $this->url->link(t('Two factor authentication'), 'twofactor', 'disable', array('user_id' => $user['id'])) ?>
+ </li>
+ <?php endif ?>
+
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'share') ?>>
+ <?= $this->url->link(t('Public access'), 'UserViewController', 'share', array('user_id' => $user['id'])) ?>
+ </li>
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'notifications') ?>>
+ <?= $this->url->link(t('Notifications'), 'UserViewController', 'notifications', array('user_id' => $user['id'])) ?>
+ </li>
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'external') ?>>
+ <?= $this->url->link(t('External accounts'), 'UserViewController', 'external', array('user_id' => $user['id'])) ?>
+ </li>
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'integrations') ?>>
+ <?= $this->url->link(t('Integrations'), 'UserViewController', 'integrations', array('user_id' => $user['id'])) ?>
+ </li>
+ <?php endif ?>
+
+ <?php if ($this->user->hasAccess('UserViewController', 'authentication')): ?>
+ <li <?= $this->app->checkMenuSelection('UserViewController', 'authentication') ?>>
+ <?= $this->url->link(t('Edit Authentication'), 'UserViewController', 'authentication', array('user_id' => $user['id'])) ?>
+ </li>
+ <?php endif ?>
+
+ <?= $this->hook->render('template:user:sidebar:actions', array('user' => $user)) ?>
+ </ul>
+</div>
diff --git a/app/Template/user/timesheet.php b/app/Template/user_view/timesheet.php
index 92ebafb5..92ebafb5 100644
--- a/app/Template/user/timesheet.php
+++ b/app/Template/user_view/timesheet.php