Improve user controllers and views
This commit is contained in:
parent
abdf6f9780
commit
4514bc1d4b
|
|
@ -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())));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
@ -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'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
|
@ -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'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,33 +6,13 @@ 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
|
||||
*
|
||||
|
|
@ -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,
|
||||
|
|
@ -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]),
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
) ?>
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
) ?>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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']) ?>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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() ?>"
|
||||
|
|
|
|||
|
|
@ -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') ?>
|
||||
|
||||
|
|
|
|||
|
|
@ -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 ?>
|
||||
<?php endif ?>
|
||||
|
|
|
|||
|
|
@ -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 ?>
|
||||
<?php endif ?>
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
) ?>
|
||||
|
|
|
|||
|
|
@ -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 ?>
|
||||
<?php endif ?>
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
) ?>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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 ?>
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
</form>
|
||||
|
|
@ -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>
|
||||
</form>
|
||||
|
|
@ -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)): ?>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
</form>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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 ?>
|
||||
|
|
@ -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>
|
||||
Loading…
Reference in New Issue