Rewrite of the authentication and authorization system
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<i class="fa fa-calendar fa-fw"></i>
|
||||
<?= $this->url->link(t('Back to the calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
<?php if ($this->user->isProjectManagementAllowed($project['id'])): ?>
|
||||
<?php if ($this->user->hasProjectAccess('project', 'edit', $project['id'])): ?>
|
||||
<li>
|
||||
<i class="fa fa-cog fa-fw"></i>
|
||||
<?= $this->url->link(t('Project settings'), 'project', 'show', array('project_id' => $project['id'])) ?>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<i class="fa fa-calendar fa-fw"></i>
|
||||
<?= $this->url->link(t('Back to the calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
<?php if ($this->user->isProjectManagementAllowed($project['id'])): ?>
|
||||
<?php if ($this->user->hasProjectAccess('project', 'edit', $project['id'])): ?>
|
||||
<li>
|
||||
<i class="fa fa-cog fa-fw"></i>
|
||||
<?= $this->url->link(t('Project settings'), 'project', 'show', array('project_id' => $project['id'])) ?>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<section id="main">
|
||||
<div class="page-header page-header-mobile">
|
||||
<ul>
|
||||
<?php if ($this->user->isProjectAdmin() || $this->user->isAdmin()): ?>
|
||||
<?php if ($this->user->hasAccess('project', 'create')): ?>
|
||||
<li>
|
||||
<i class="fa fa-plus fa-fw"></i>
|
||||
<?= $this->url->link(t('New project'), 'project', 'create') ?>
|
||||
@@ -9,7 +9,7 @@
|
||||
<?php endif ?>
|
||||
<li>
|
||||
<i class="fa fa-lock fa-fw"></i>
|
||||
<?= $this->url->link(t('New private project'), 'project', 'create', array('private' => 1)) ?>
|
||||
<?= $this->url->link(t('New private project'), 'project', 'createPrivate') ?>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-search fa-fw"></i>
|
||||
@@ -19,7 +19,7 @@
|
||||
<i class="fa fa-folder fa-fw"></i>
|
||||
<?= $this->url->link(t('Project management'), 'project', 'index') ?>
|
||||
</li>
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<?php if ($this->user->hasAccess('user', 'index')): ?>
|
||||
<li>
|
||||
<i class="fa fa-user fa-fw"></i>
|
||||
<?= $this->url->link(t('User management'), 'user', 'index') ?>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($this->user->isProjectManagementAllowed($project['id'])): ?>
|
||||
<?php if ($this->user->hasProjectAccess('project', 'edit', $project['id'])): ?>
|
||||
<?= $this->url->link('<i class="fa fa-sliders fa-fw"></i>', 'gantt', 'project', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Gantt chart')) ?>
|
||||
<?php endif ?>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<section id="main">
|
||||
<section>
|
||||
<h3><?= t('Change assignee for the task "%s"', $values['title']) ?></h3>
|
||||
<form method="post" action="<?= $this->url->href('board', 'updateAssignee', array('task_id' => $values['id'], 'project_id' => $values['project_id'])) ?>">
|
||||
<form method="post" action="<?= $this->url->href('BoardPopover', 'updateAssignee', array('task_id' => $values['id'], 'project_id' => $values['project_id'])) ?>">
|
||||
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<section id="main">
|
||||
<section>
|
||||
<h3><?= t('Change category for the task "%s"', $values['title']) ?></h3>
|
||||
<form method="post" action="<?= $this->url->href('board', 'updateCategory', array('task_id' => $values['id'], 'project_id' => $values['project_id'])) ?>">
|
||||
<form method="post" action="<?= $this->url->href('BoardPopover', 'updateCategory', array('task_id' => $values['id'], 'project_id' => $values['project_id'])) ?>">
|
||||
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<!-- column in expanded mode -->
|
||||
<div class="board-column-expanded">
|
||||
<?php if (! $not_editable): ?>
|
||||
<?php if (! $not_editable && $this->user->hasProjectAccess('taskcreation', 'create', $column['project_id'])): ?>
|
||||
<div class="board-add-icon">
|
||||
<?= $this->url->link('+', 'taskcreation', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover', t('Add a new task')) ?>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<span
|
||||
title="<?= t('Description') ?>"
|
||||
class="tooltip"
|
||||
data-href="<?= $this->url->href('board', 'swimlane', array('swimlane_id' => $swimlane['id'], 'project_id' => $project['id'])) ?>">
|
||||
data-href="<?= $this->url->href('BoardTooltip', 'swimlane', array('swimlane_id' => $swimlane['id'], 'project_id' => $project['id'])) ?>">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
@@ -27,31 +27,31 @@
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($task['recurrence_status'] == \Kanboard\Model\Task::RECURRING_STATUS_PENDING): ?>
|
||||
<span title="<?= t('Recurrence') ?>" class="tooltip" data-href="<?= $this->url->href('board', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-refresh fa-rotate-90"></i></span>
|
||||
<span title="<?= t('Recurrence') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltip', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-refresh fa-rotate-90"></i></span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($task['recurrence_status'] == \Kanboard\Model\Task::RECURRING_STATUS_PROCESSED): ?>
|
||||
<span title="<?= t('Recurrence') ?>" class="tooltip" data-href="<?= $this->url->href('board', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-refresh fa-rotate-90 fa-inverse"></i></span>
|
||||
<span title="<?= t('Recurrence') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltip', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-refresh fa-rotate-90 fa-inverse"></i></span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['nb_links'])): ?>
|
||||
<span title="<?= t('Links') ?>" class="tooltip" data-href="<?= $this->url->href('board', 'tasklinks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-code-fork"></i> <?= $task['nb_links'] ?></span>
|
||||
<span title="<?= t('Links') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltip', 'tasklinks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-code-fork"></i> <?= $task['nb_links'] ?></span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['nb_subtasks'])): ?>
|
||||
<span title="<?= t('Sub-Tasks') ?>" class="tooltip" data-href="<?= $this->url->href('board', 'subtasks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-bars"></i> <?= round($task['nb_completed_subtasks']/$task['nb_subtasks']*100, 0).'%' ?></span>
|
||||
<span title="<?= t('Sub-Tasks') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltip', 'subtasks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-bars"></i> <?= round($task['nb_completed_subtasks']/$task['nb_subtasks']*100, 0).'%' ?></span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['nb_files'])): ?>
|
||||
<span title="<?= t('Attachments') ?>" class="tooltip" data-href="<?= $this->url->href('board', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-paperclip"></i> <?= $task['nb_files'] ?></span>
|
||||
<span title="<?= t('Attachments') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltip', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-paperclip"></i> <?= $task['nb_files'] ?></span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['nb_comments'])): ?>
|
||||
<span title="<?= $task['nb_comments'] == 1 ? t('%d comment', $task['nb_comments']) : t('%d comments', $task['nb_comments']) ?>" class="tooltip" data-href="<?= $this->url->href('board', 'comments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-comment-o"></i> <?= $task['nb_comments'] ?></span>
|
||||
<span title="<?= $task['nb_comments'] == 1 ? t('%d comment', $task['nb_comments']) : t('%d comments', $task['nb_comments']) ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltip', 'comments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-comment-o"></i> <?= $task['nb_comments'] ?></span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['description'])): ?>
|
||||
<span title="<?= t('Description') ?>" class="tooltip" data-href="<?= $this->url->href('board', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>">
|
||||
<span title="<?= t('Description') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltip', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>">
|
||||
<i class="fa fa-file-text-o"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<span class="dropdown">
|
||||
<a href="#" class="dropdown-menu"><?= '#'.$task['id'] ?></a>
|
||||
<ul>
|
||||
<li><i class="fa fa-user fa-fw"></i> <?= $this->url->link(t('Change assignee'), 'board', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
|
||||
<li><i class="fa fa-tag fa-fw"></i> <?= $this->url->link(t('Change category'), 'board', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
|
||||
<li><i class="fa fa-user fa-fw"></i> <?= $this->url->link(t('Change assignee'), 'BoardPopover', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
|
||||
<li><i class="fa fa-tag fa-fw"></i> <?= $this->url->link(t('Change category'), 'BoardPopover', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
|
||||
<li><i class="fa fa-align-left fa-fw"></i> <?= $this->url->link(t('Change description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
|
||||
<li><i class="fa fa-pencil-square-o fa-fw"></i> <?= $this->url->link(t('Edit this task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
|
||||
<li><i class="fa fa-comment-o fa-fw"></i> <?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
|
||||
<li><i class="fa fa-code-fork fa-fw"></i> <?= $this->url->link(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
|
||||
<li><i class="fa fa-camera fa-fw"></i> <?= $this->url->link(t('Add a screenshot'), 'board', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
|
||||
<li><i class="fa fa-camera fa-fw"></i> <?= $this->url->link(t('Add a screenshot'), 'BoardPopover', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
|
||||
<?php if ($task['is_active'] == 1): ?>
|
||||
<li><i class="fa fa-close fa-fw"></i> <?= $this->url->link(t('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'popover') ?></li>
|
||||
<?php else: ?>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="
|
||||
task-board
|
||||
<?= $task['is_active'] == 1 ? 'draggable-item task-board-status-open '.($task['date_modification'] > (time() - $board_highlight_period) ? 'task-board-recent' : '') : 'task-board-status-closed' ?>
|
||||
<?= $task['is_active'] == 1 ? ($this->user->hasProjectAccess('board', 'save', $task['project_id']) ? 'draggable-item ' : '').'task-board-status-open '.($task['date_modification'] > (time() - $board_highlight_period) ? 'task-board-recent' : '') : 'task-board-status-closed' ?>
|
||||
color-<?= $task['color_id'] ?>"
|
||||
data-task-id="<?= $task['id'] ?>"
|
||||
data-owner-id="<?= $task['owner_id'] ?>"
|
||||
@@ -12,7 +12,11 @@
|
||||
|
||||
<?php if ($this->board->isCollapsed($task['project_id'])): ?>
|
||||
<div class="task-board-collapsed">
|
||||
<?= $this->render('board/task_menu', array('task' => $task)) ?>
|
||||
<?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?>
|
||||
<?= $this->render('board/task_menu', array('task' => $task)) ?>
|
||||
<?php else: ?>
|
||||
<strong><?= '#'.$task['id'] ?></strong>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['assignee_username'])): ?>
|
||||
<span title="<?= $this->e($task['assignee_name'] ?: $task['assignee_username']) ?>">
|
||||
@@ -23,7 +27,11 @@
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="task-board-expanded">
|
||||
<?= $this->render('board/task_menu', array('task' => $task)) ?>
|
||||
<?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?>
|
||||
<?= $this->render('board/task_menu', array('task' => $task)) ?>
|
||||
<?php else: ?>
|
||||
<strong><?= '#'.$task['id'] ?></strong>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($task['reference']): ?>
|
||||
<span class="task-board-reference" title="<?= t('Reference') ?>">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
)) ?>
|
||||
|
||||
<div id="calendar"
|
||||
data-save-url="<?= $this->url->href('calendar', 'save') ?>"
|
||||
data-save-url="<?= $this->url->href('calendar', 'save', array('project_id' => $project['id'])) ?>"
|
||||
data-check-url="<?= $this->url->href('calendar', 'project', array('project_id' => $project['id'])) ?>"
|
||||
data-check-interval="<?= $check_interval ?>"
|
||||
>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<?= $this->form->label(t('Filter'), 'filter') ?>
|
||||
<?= $this->form->text('filter', $values, $errors, array('required', 'maxlength="100"')) ?>
|
||||
|
||||
<?php if ($this->user->isProjectManagementAllowed($project['id'])): ?>
|
||||
<?php if ($this->user->hasProjectAccess('project', 'edit', $project['id'])): ?>
|
||||
<?= $this->form->checkbox('is_shared', t('Share with all project members'), 1) ?>
|
||||
<?php endif ?>
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<?= $this->form->label(t('Filter'), 'filter') ?>
|
||||
<?= $this->form->text('filter', $values, $errors, array('required', 'maxlength="100"')) ?>
|
||||
|
||||
<?php if ($this->user->isProjectManagementAllowed($project['id'])): ?>
|
||||
<?php if ($this->user->hasProjectAccess('project', 'edit', $project['id'])): ?>
|
||||
<?= $this->form->checkbox('is_shared', t('Share with all project members'), 1, $values['is_shared'] == 1) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->form->hidden('is_shared', $values) ?>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</td>
|
||||
<td><?= $this->e($filter['owner_name'] ?: $filter['owner_username']) ?></td>
|
||||
<td>
|
||||
<?php if ($filter['user_id'] == $this->user->getId() || $this->user->isProjectManagementAllowed($project['id'])): ?>
|
||||
<?php if ($filter['user_id'] == $this->user->getId() || $this->user->hasProjectAccess('customfilter', 'edit', $project['id'])): ?>
|
||||
<ul>
|
||||
<li><?= $this->url->link(t('Remove'), 'customfilter', 'remove', array('project_id' => $filter['project_id'], 'filter_id' => $filter['id']), true) ?></li>
|
||||
<li><?= $this->url->link(t('Edit'), 'customfilter', 'edit', array('project_id' => $filter['project_id'], 'filter_id' => $filter['id'])) ?></li>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<ul>
|
||||
<?php if ($this->user->isProjectAdmin() || $this->user->isAdmin()): ?>
|
||||
<?php if ($this->user->hasAccess('project', 'create')): ?>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New project'), 'project', 'create') ?></li>
|
||||
<?php endif ?>
|
||||
<li>
|
||||
@@ -10,7 +10,7 @@
|
||||
<li>
|
||||
<i class="fa fa-folder fa-fw"></i><?= $this->url->link(t('Projects list'), 'project', 'index') ?>
|
||||
</li>
|
||||
<?php if ($this->user->isProjectAdmin() || $this->user->isAdmin()): ?>
|
||||
<?php if ($this->user->hasAccess('projectuser', 'managers')): ?>
|
||||
<li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('Users overview'), 'projectuser', 'managers') ?></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<ul>
|
||||
<li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'group', 'index') ?></li>
|
||||
<li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('View group members'), 'group', 'users', array('group_id' => $group['id'])) ?></li>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<div class="confirm">
|
||||
<p class="alert alert-info"><?= t('Do you really want to remove the user "%s" from the group "%s"?', $user['name'] ?: $user['username'], $group['name']) ?></p>
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<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-plus fa-fw"></i><?= $this->url->link(t('New group'), 'group', 'create') ?></li>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php if ($paginator->isEmpty()): ?>
|
||||
<p class="alert"><?= t('There is no group.') ?></p>
|
||||
@@ -31,7 +29,7 @@
|
||||
<td>
|
||||
<ul>
|
||||
<li><?= $this->url->link(t('Add group member'), 'group', 'associate', array('group_id' => $group['id'])) ?></li>
|
||||
<li><?= $this->url->link(t('Users'), 'group', 'users', array('group_id' => $group['id'])) ?></li>
|
||||
<li><?= $this->url->link(t('Members'), 'group', 'users', array('group_id' => $group['id'])) ?></li>
|
||||
<li><?= $this->url->link(t('Edit'), 'group', 'edit', array('group_id' => $group['id'])) ?></li>
|
||||
<li><?= $this->url->link(t('Remove'), 'group', 'confirm', array('group_id' => $group['id'])) ?></li>
|
||||
</ul>
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<ul>
|
||||
<li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'group', 'index') ?></li>
|
||||
<li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('View group members'), 'group', 'users', array('group_id' => $group['id'])) ?></li>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<div class="confirm">
|
||||
<p class="alert alert-info"><?= t('Do you really want to remove this group: "%s"?', $group['name']) ?></p>
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<ul>
|
||||
<li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'group', 'index') ?></li>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('Add group member'), 'group', 'associate', array('group_id' => $group['id'])) ?></li>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php if ($paginator->isEmpty()): ?>
|
||||
<p class="alert"><?= t('There is no user in this group.') ?></p>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</head>
|
||||
<body data-status-url="<?= $this->url->href('app', 'status') ?>"
|
||||
data-login-url="<?= $this->url->href('auth', 'login') ?>"
|
||||
data-markdown-preview-url="<?= $this->url->href('app', 'preview') ?>"
|
||||
data-markdown-preview-url="<?= $this->url->href('TaskHelper', 'preview') ?>"
|
||||
data-timezone="<?= $this->app->getTimezone() ?>"
|
||||
data-js-lang="<?= $this->app->jsLang() ?>">
|
||||
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
<i class="fa fa-dashboard fa-fw"></i>
|
||||
<?= $this->url->link(t('Activity'), 'activity', 'project', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
|
||||
<?php if ($this->user->hasProjectAccess('customfilter', 'index', $project['id'])): ?>
|
||||
<li>
|
||||
<i class="fa fa-filter fa-fw"></i>
|
||||
<?= $this->url->link(t('Custom filters'), 'customfilter', 'index', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($project['is_public']): ?>
|
||||
<li>
|
||||
@@ -15,15 +18,21 @@
|
||||
|
||||
<?= $this->hook->render('template:project:dropdown', array('project' => $project)) ?>
|
||||
|
||||
<?php if ($this->user->isProjectManagementAllowed($project['id'])): ?>
|
||||
<?php if ($this->user->hasProjectAccess('analytic', 'tasks', $project['id'])): ?>
|
||||
<li>
|
||||
<i class="fa fa-line-chart fa-fw"></i>
|
||||
<?= $this->url->link(t('Analytics'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($this->user->hasProjectAccess('export', 'tasks', $project['id'])): ?>
|
||||
<li>
|
||||
<i class="fa fa-download fa-fw"></i>
|
||||
<?= $this->url->link(t('Exports'), 'export', 'tasks', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($this->user->hasProjectAccess('project', 'edit', $project['id'])): ?>
|
||||
<li>
|
||||
<i class="fa fa-cog fa-fw"></i>
|
||||
<?= $this->url->link(t('Settings'), 'project', 'show', array('project_id' => $project['id'])) ?>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<?= $this->form->label(t('End date'), 'end_date') ?>
|
||||
<?= $this->form->text('end_date', $values, $errors, array('maxlength="10"'), 'form-date') ?>
|
||||
|
||||
<?php if ($this->user->isAdmin() || $this->user->isProjectAdministrationAllowed($project['id'])): ?>
|
||||
<?php if ($this->user->hasProjectAccess('project', 'create', $project['id'])): ?>
|
||||
<?= $this->form->checkbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?>
|
||||
<?php endif ?>
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<i class="fa fa-list fa-fw"></i>
|
||||
<?= $this->url->link(t('List'), 'listing', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-listing', t('Keyboard shortcut: "%s"', 'v l')) ?>
|
||||
</li>
|
||||
<?php if ($this->user->isProjectManagementAllowed($project['id'])): ?>
|
||||
<?php if ($this->user->hasProjectAccess('gantt', 'project', $project['id'])): ?>
|
||||
<li <?= $filters['controller'] === 'gantt' ? 'class="active"' : '' ?>>
|
||||
<i class="fa fa-sliders fa-fw"></i>
|
||||
<?= $this->url->link(t('Gantt'), 'gantt', 'project', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-gantt', t('Keyboard shortcut: "%s"', 'v g')) ?>
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<ul>
|
||||
<?php if ($this->user->isProjectAdmin() || $this->user->isAdmin()): ?>
|
||||
<?php if ($this->user->hasAccess('project', 'create')): ?>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New project'), 'project', 'create') ?></li>
|
||||
<?php endif ?>
|
||||
<li><i class="fa fa-lock fa-fw"></i><?= $this->url->link(t('New private project'), 'project', 'create', array('private' => 1)) ?></li>
|
||||
<?php if ($this->user->isProjectAdmin() || $this->user->isAdmin()): ?>
|
||||
<li><i class="fa fa-lock fa-fw"></i><?= $this->url->link(t('New private project'), 'project', 'createPrivate') ?></li>
|
||||
<?php if ($this->user->hasAccess('projectuser', 'managers')): ?>
|
||||
<li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('Users overview'), 'projectuser', 'managers') ?></li>
|
||||
<?php endif ?>
|
||||
<?php if ($this->user->hasAccess('gantt', 'projects')): ?>
|
||||
<li><i class="fa fa-sliders fa-fw"></i><?= $this->url->link(t('Projects Gantt chart'), 'gantt', 'projects') ?></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
@@ -21,7 +23,7 @@
|
||||
<th class="column-15"><?= $paginator->order(t('Project'), 'name') ?></th>
|
||||
<th class="column-8"><?= $paginator->order(t('Start date'), 'start_date') ?></th>
|
||||
<th class="column-8"><?= $paginator->order(t('End date'), 'end_date') ?></th>
|
||||
<?php if ($this->user->isAdmin() || $this->user->isProjectAdmin()): ?>
|
||||
<?php if ($this->user->hasAccess('projectuser', 'managers')): ?>
|
||||
<th class="column-12"><?= t('Managers') ?></th>
|
||||
<th class="column-12"><?= t('Members') ?></th>
|
||||
<?php endif ?>
|
||||
@@ -64,25 +66,17 @@
|
||||
<td>
|
||||
<?= $project['end_date'] ?>
|
||||
</td>
|
||||
<?php if ($this->user->isAdmin() || $this->user->isProjectAdmin()): ?>
|
||||
<td>
|
||||
<ul class="no-bullet">
|
||||
<?php foreach ($project['managers'] as $user_id => $user_name): ?>
|
||||
<li><?= $this->url->link($this->e($user_name), 'projectuser', 'opens', array('user_id' => $user_id)) ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($project['is_everybody_allowed'] == 1): ?>
|
||||
<?= t('Everybody') ?>
|
||||
<?php else: ?>
|
||||
<ul class="no-bullet">
|
||||
<?php foreach ($project['members'] as $user_id => $user_name): ?>
|
||||
<li><?= $this->url->link($this->e($user_name), 'projectuser', 'opens', array('user_id' => $user_id)) ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<?php if ($this->user->hasAccess('projectuser', 'managers')): ?>
|
||||
<td>
|
||||
<?= $this->render('project/roles', array('roles' => $project, 'role' => \Kanboard\Core\Security\Role::PROJECT_MANAGER)) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($project['is_everybody_allowed'] == 1): ?>
|
||||
<?= t('Everybody') ?>
|
||||
<?php else: ?>
|
||||
<?= $this->render('project/roles', array('roles' => $project, 'role' => \Kanboard\Core\Security\Role::PROJECT_MEMBER)) ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<?php endif ?>
|
||||
<td class="dashboard-project-stats">
|
||||
<?php foreach ($project['columns'] as $column): ?>
|
||||
|
||||
7
app/Template/project/roles.php
Normal file
7
app/Template/project/roles.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php if (! empty($roles[$role])): ?>
|
||||
<ul class="no-bullet">
|
||||
<?php foreach ($roles[$role] as $user_id => $user_name): ?>
|
||||
<li><?= $this->url->link($this->e($user_name), 'projectuser', 'opens', array('user_id' => $user_id)) ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
@@ -8,7 +8,7 @@
|
||||
<?= $this->url->link(t('Custom filters'), 'customfilter', 'index', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
|
||||
<?php if ($this->user->isProjectManagementAllowed($project['id'])): ?>
|
||||
<?php if ($this->user->hasProjectAccess('project', 'edit', $project['id'])): ?>
|
||||
<li <?= $this->app->getRouterController() === 'project' && $this->app->getRouterAction() === 'share' ? 'class="active"' : '' ?>>
|
||||
<?= $this->url->link(t('Public access'), 'project', 'share', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
@@ -30,9 +30,9 @@
|
||||
<li <?= $this->app->getRouterController() === 'category' ? 'class="active"' : '' ?>>
|
||||
<?= $this->url->link(t('Categories'), 'category', 'index', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
<?php if ($this->user->isAdmin() || $project['is_private'] == 0): ?>
|
||||
<li <?= $this->app->getRouterController() === 'project' && $this->app->getRouterAction() === 'users' ? 'class="active"' : '' ?>>
|
||||
<?= $this->url->link(t('Users'), 'project', 'users', array('project_id' => $project['id'])) ?>
|
||||
<?php if ($project['is_private'] == 0): ?>
|
||||
<li <?= $this->app->getRouterController() === 'project' && $this->app->getRouterAction() === 'permissions' ? 'class="active"' : '' ?>>
|
||||
<?= $this->url->link(t('Permissions'), 'ProjectPermission', 'index', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<li <?= $this->app->getRouterController() === 'action' ? 'class="active"' : '' ?>>
|
||||
@@ -51,7 +51,7 @@
|
||||
<li <?= $this->app->getRouterController() === 'taskImport' && $this->app->getRouterAction() === 'step1' ? 'class="active"' : '' ?>>
|
||||
<?= $this->url->link(t('Import'), 'taskImport', 'step1', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
<?php if ($this->user->isProjectAdministrationAllowed($project['id'])): ?>
|
||||
<?php if ($this->user->hasProjectAccess('project', 'remove', $project['id'])): ?>
|
||||
<li <?= $this->app->getRouterController() === 'project' && $this->app->getRouterAction() === 'remove' ? 'class="active"' : '' ?>>
|
||||
<?= $this->url->link(t('Remove'), 'project', 'remove', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('List of authorized users') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php if ($project['is_everybody_allowed']): ?>
|
||||
<div class="alert"><?= t('Everybody have access to this project.') ?></div>
|
||||
<?php else: ?>
|
||||
|
||||
<?php if (empty($users['allowed'])): ?>
|
||||
<div class="alert alert-error"><?= t('Nobody have access to this project.') ?></div>
|
||||
<?php else: ?>
|
||||
<table>
|
||||
<tr>
|
||||
<th><?= t('User') ?></th>
|
||||
<th><?= t('Role for this project') ?></th>
|
||||
<?php if ($project['is_private'] == 0): ?>
|
||||
<th><?= t('Actions') ?></th>
|
||||
<?php endif ?>
|
||||
</tr>
|
||||
<?php foreach ($users['allowed'] as $user_id => $username): ?>
|
||||
<tr>
|
||||
<td><?= $this->e($username) ?></td>
|
||||
<td><?= isset($users['managers'][$user_id]) ? t('Project manager') : t('Project member') ?></td>
|
||||
<?php if ($project['is_private'] == 0): ?>
|
||||
<td>
|
||||
<ul>
|
||||
<li><?= $this->url->link(t('Revoke'), 'project', 'revoke', array('project_id' => $project['id'], 'user_id' => $user_id), true) ?></li>
|
||||
<li>
|
||||
<?php if (isset($users['managers'][$user_id])): ?>
|
||||
<?= $this->url->link(t('Set project member'), 'project', 'role', array('project_id' => $project['id'], 'user_id' => $user_id, 'is_owner' => 0), true) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->url->link(t('Set project manager'), 'project', 'role', array('project_id' => $project['id'], 'user_id' => $user_id, 'is_owner' => 1), true) ?>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
<?php endif ?>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($project['is_private'] == 0 && ! empty($users['not_allowed'])): ?>
|
||||
<hr/>
|
||||
<form method="post" action="<?= $this->url->href('project', 'allow', array('project_id' => $project['id'])) ?>" autocomplete="off">
|
||||
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
<?= $this->form->hidden('project_id', array('project_id' => $project['id'])) ?>
|
||||
|
||||
<?= $this->form->label(t('User'), 'user_id') ?>
|
||||
<?= $this->form->select('user_id', $users['not_allowed'], array(), array(), array('data-notfound="'.t('No results match:').'"'), 'chosen-select') ?><br/>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Allow this user') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif ?>
|
||||
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($project['is_private'] == 0): ?>
|
||||
<hr/>
|
||||
<form method="post" action="<?= $this->url->href('project', 'allowEverybody', array('project_id' => $project['id'])) ?>">
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
<?= $this->form->hidden('id', array('id' => $project['id'])) ?>
|
||||
<?= $this->form->checkbox('is_everybody_allowed', t('Allow everybody to access to this project'), 1, $project['is_everybody_allowed']) ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="alert alert-info">
|
||||
<ul>
|
||||
<li><?= t('A project manager can change the settings of the project and have more privileges than a standard user.') ?></li>
|
||||
<li><?= t('Don\'t forget that administrators have access to everything.') ?></li>
|
||||
<li><?= $this->url->doc(t('Help with project permissions'), 'project-permissions') ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
141
app/Template/project_permission/index.php
Normal file
141
app/Template/project_permission/index.php
Normal file
@@ -0,0 +1,141 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Allowed Users') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php if ($project['is_everybody_allowed']): ?>
|
||||
<div class="alert"><?= t('Everybody have access to this project.') ?></div>
|
||||
<?php else: ?>
|
||||
|
||||
<?php if (empty($users)): ?>
|
||||
<div class="alert"><?= t('No user have been allowed specifically.') ?></div>
|
||||
<?php else: ?>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="column-50"><?= t('User') ?></th>
|
||||
<th><?= t('Role') ?></th>
|
||||
<?php if ($project['is_private'] == 0): ?>
|
||||
<th class="column-15"><?= t('Actions') ?></th>
|
||||
<?php endif ?>
|
||||
</tr>
|
||||
<?php foreach ($users as $user): ?>
|
||||
<tr>
|
||||
<td><?= $this->e($user['name'] ?: $user['username']) ?></td>
|
||||
<td>
|
||||
<?= $this->form->select(
|
||||
'role-'.$user['id'],
|
||||
$roles,
|
||||
array('role-'.$user['id'] => $user['role']),
|
||||
array(),
|
||||
array('data-url="'.$this->url->href('ProjectPermission', 'changeUserRole', array('project_id' => $project['id'])).'"', 'data-id="'.$user['id'].'"'),
|
||||
'project-change-role'
|
||||
) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->url->link(t('Remove'), 'ProjectPermission', 'removeUser', array('project_id' => $project['id'], 'user_id' => $user['id']), true) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($project['is_private'] == 0): ?>
|
||||
<div class="listing">
|
||||
<form method="post" action="<?= $this->url->href('ProjectPermission', 'addUser', array('project_id' => $project['id'])) ?>" autocomplete="off" class="form-inline">
|
||||
<?= $this->form->csrf() ?>
|
||||
<?= $this->form->hidden('project_id', array('project_id' => $project['id'])) ?>
|
||||
<?= $this->form->hidden('user_id', $values) ?>
|
||||
|
||||
<?= $this->form->label(t('Name'), 'name') ?>
|
||||
<?= $this->form->text('name', $values, $errors, array(
|
||||
'required',
|
||||
'placeholder="'.t('Enter user name...').'"',
|
||||
'title="'.t('Enter user name...').'"',
|
||||
'data-dst-field="user_id"',
|
||||
'data-search-url="'.$this->url->href('UserHelper', 'autocomplete').'"',
|
||||
),
|
||||
'autocomplete') ?>
|
||||
|
||||
<?= $this->form->select('role', $roles, $values, $errors) ?>
|
||||
|
||||
<input type="submit" value="<?= t('Add') ?>" class="btn btn-blue"/>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="page-header">
|
||||
<h2><?= t('Allowed Groups') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php if (empty($groups)): ?>
|
||||
<div class="alert"><?= t('No group have been allowed specifically.') ?></div>
|
||||
<?php else: ?>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="column-50"><?= t('Group') ?></th>
|
||||
<th><?= t('Role') ?></th>
|
||||
<?php if ($project['is_private'] == 0): ?>
|
||||
<th class="column-15"><?= t('Actions') ?></th>
|
||||
<?php endif ?>
|
||||
</tr>
|
||||
<?php foreach ($groups as $group): ?>
|
||||
<tr>
|
||||
<td><?= $this->e($group['name']) ?></td>
|
||||
<td>
|
||||
<?= $this->form->select(
|
||||
'role-'.$group['id'],
|
||||
$roles,
|
||||
array('role-'.$group['id'] => $group['role']),
|
||||
array(),
|
||||
array('data-url="'.$this->url->href('ProjectPermission', 'changeGroupRole', array('project_id' => $project['id'])).'"', 'data-id="'.$group['id'].'"'),
|
||||
'project-change-role'
|
||||
) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->url->link(t('Remove'), 'ProjectPermission', 'removeGroup', array('project_id' => $project['id'], 'group_id' => $group['id']), true) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($project['is_private'] == 0): ?>
|
||||
<div class="listing">
|
||||
<form method="post" action="<?= $this->url->href('ProjectPermission', 'addGroup', array('project_id' => $project['id'])) ?>" autocomplete="off" class="form-inline">
|
||||
<?= $this->form->csrf() ?>
|
||||
<?= $this->form->hidden('project_id', array('project_id' => $project['id'])) ?>
|
||||
<?= $this->form->hidden('group_id', $values) ?>
|
||||
<?= $this->form->hidden('external_id', $values) ?>
|
||||
|
||||
<?= $this->form->label(t('Group Name'), 'name') ?>
|
||||
<?= $this->form->text('name', $values, $errors, array(
|
||||
'required',
|
||||
'placeholder="'.t('Enter group name...').'"',
|
||||
'title="'.t('Enter group name...').'"',
|
||||
'data-dst-field="group_id"',
|
||||
'data-dst-extra-field="external_id"',
|
||||
'data-search-url="'.$this->url->href('GroupHelper', 'autocomplete').'"',
|
||||
),
|
||||
'autocomplete') ?>
|
||||
|
||||
<?= $this->form->select('role', $roles, $values, $errors) ?>
|
||||
|
||||
<input type="submit" value="<?= t('Add') ?>" class="btn btn-blue"/>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($project['is_private'] == 0): ?>
|
||||
<hr/>
|
||||
<form method="post" action="<?= $this->url->href('ProjectPermission', 'allowEverybody', array('project_id' => $project['id'])) ?>">
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
<?= $this->form->hidden('id', array('id' => $project['id'])) ?>
|
||||
<?= $this->form->checkbox('is_everybody_allowed', t('Allow everybody to access to this project'), 1, $project['is_everybody_allowed']) ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif ?>
|
||||
@@ -1,7 +1,7 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<ul>
|
||||
<?php if ($this->user->isProjectAdmin() || $this->user->isAdmin()): ?>
|
||||
<?php if ($this->user->hasAccess('project', 'create')): ?>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New project'), 'project', 'create') ?></li>
|
||||
<?php endif ?>
|
||||
<li>
|
||||
@@ -12,7 +12,7 @@
|
||||
<i class="fa fa-folder fa-fw"></i>
|
||||
<?= $this->url->link(t('Projects list'), 'project', 'index') ?>
|
||||
</li>
|
||||
<?php if ($this->user->isProjectAdmin() || $this->user->isAdmin()): ?>
|
||||
<?php if ($this->user->hasAccess('gantt', 'projects')): ?>
|
||||
<li>
|
||||
<i class="fa fa-sliders fa-fw"></i>
|
||||
<?= $this->url->link(t('Projects Gantt chart'), 'gantt', 'projects') ?>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
|
||||
<div id="subtasks" class="task-show-section">
|
||||
<div class="page-header">
|
||||
<h2><?= t('Sub-Tasks') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php if (! empty($subtasks)): ?>
|
||||
<div class="page-header">
|
||||
<h2><?= t('Sub-Tasks') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php $first_position = $subtasks[0]['position']; ?>
|
||||
<?php $last_position = $subtasks[count($subtasks) - 1]['position']; ?>
|
||||
<table class="subtasks-table">
|
||||
@@ -86,7 +87,13 @@
|
||||
</table>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! isset($not_editable)): ?>
|
||||
<?php if (! isset($not_editable) && $this->user->hasProjectAccess('subtask', 'save', $task['project_id'])): ?>
|
||||
|
||||
<?php if (empty($subtasks)): ?>
|
||||
<div class="page-header">
|
||||
<h2><?= t('Sub-Tasks') ?></h2>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<form method="post" action="<?= $this->url->href('subtask', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
|
||||
<?= $this->form->csrf() ?>
|
||||
<?= $this->form->hidden('task_id', array('task_id' => $task['id'])) ?>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<i class="fa fa-calendar fa-fw"></i>
|
||||
<?= $this->url->link(t('Back to the calendar'), 'calendar', 'show', array('project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<?php if ($this->user->isProjectManagementAllowed($task['project_id'])): ?>
|
||||
<?php if ($this->user->hasProjectAccess('project', 'edit', $task['project_id'])): ?>
|
||||
<li>
|
||||
<i class="fa fa-cog fa-fw"></i>
|
||||
<?= $this->url->link(t('Project settings'), 'project', 'show', array('project_id' => $task['project_id'])) ?>
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
'recurrence_basedate_list' => $this->task->recurrenceBasedates(),
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('task_modification/edit_time', array('task' => $task, 'values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?>
|
||||
<?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $project['id'])): ?>
|
||||
<?= $this->render('task_modification/edit_time', array('task' => $task, 'values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->render('task/description', array('task' => $task)) ?>
|
||||
<?= $this->render('tasklink/show', array('task' => $task, 'links' => $links, 'link_label_list' => $link_label_list)) ?>
|
||||
<?= $this->render('subtask/show', array('task' => $task, 'subtasks' => $subtasks, 'project' => $project, 'users_list' => isset($users_list) ? $users_list : array())) ?>
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
<?= $this->hook->render('template:task:sidebar:information') ?>
|
||||
</ul>
|
||||
<?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?>
|
||||
<h2><?= t('Actions') ?></h2>
|
||||
<ul>
|
||||
<li <?= $this->app->getRouterController() === 'taskmodification' && $this->app->getRouterAction() === 'edit' ? 'class="active"' : '' ?>>
|
||||
@@ -71,6 +72,7 @@
|
||||
|
||||
<?= $this->hook->render('template:task:sidebar:actions') ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
<div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div>
|
||||
<div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div>
|
||||
</div>
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
'placeholder="'.t('Start to type task title...').'"',
|
||||
'title="'.t('Start to type task title...').'"',
|
||||
'data-dst-field="opposite_task_id"',
|
||||
'data-search-url="'.$this->url->href('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"',
|
||||
'data-search-url="'.$this->url->href('TaskHelper', 'autocomplete', array('exclude_task_id' => $task['id'])).'"',
|
||||
),
|
||||
'task-autocomplete') ?>
|
||||
'autocomplete') ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
'placeholder="'.t('Start to type task title...').'"',
|
||||
'title="'.t('Start to type task title...').'"',
|
||||
'data-dst-field="opposite_task_id"',
|
||||
'data-search-url="'.$this->url->href('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"',
|
||||
'data-search-url="'.$this->url->href('TaskHelper', 'autocomplete', array('exclude_task_id' => $task['id'])).'"',
|
||||
),
|
||||
'task-autocomplete') ?>
|
||||
'autocomplete') ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
|
||||
@@ -95,9 +95,9 @@
|
||||
'placeholder="'.t('Start to type task title...').'"',
|
||||
'title="'.t('Start to type task title...').'"',
|
||||
'data-dst-field="opposite_task_id"',
|
||||
'data-search-url="'.$this->url->href('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"',
|
||||
'data-search-url="'.$this->url->href('TaskHelper', 'autocomplete', array('exclude_task_id' => $task['id'])).'"',
|
||||
),
|
||||
'task-autocomplete') ?>
|
||||
'autocomplete') ?>
|
||||
|
||||
<input type="submit" value="<?= t('Add') ?>" class="btn btn-blue"/>
|
||||
</form>
|
||||
|
||||
@@ -15,10 +15,16 @@
|
||||
<?php if ($user['twofactor_activated'] == 1): ?>
|
||||
<div class="listing">
|
||||
<p><?= t('Secret key: ') ?><strong><?= $this->e($user['twofactor_secret']) ?></strong> (base32)</p>
|
||||
<p><br/><img src="<?= $qrcode_url ?>"/><br/><br/></p>
|
||||
|
||||
<?php if (! empty($qrcode_url)): ?>
|
||||
<p><br/><img src="<?= $qrcode_url ?>"/><br/><br/></p>
|
||||
<?php endif ?>
|
||||
|
||||
<p>
|
||||
<?= t('This QR code contains the key URI: ') ?><strong><?= $this->e($key_url) ?></strong>
|
||||
<br/><br/>
|
||||
<?php if (! empty($key_url)): ?>
|
||||
<?= t('This QR code contains the key URI: ') ?><strong><?= $this->e($key_url) ?></strong>
|
||||
<br/><br/>
|
||||
<?php endif ?>
|
||||
<?= t('Save the secret key in your TOTP software (by example Google Authenticator or FreeOTP).') ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -12,34 +12,35 @@
|
||||
|
||||
<div class="form-column">
|
||||
<?= $this->form->label(t('Username'), 'username') ?>
|
||||
<?= $this->form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?><br/>
|
||||
<?= $this->form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
|
||||
|
||||
<?= $this->form->label(t('Name'), 'name') ?>
|
||||
<?= $this->form->text('name', $values, $errors) ?><br/>
|
||||
<?= $this->form->text('name', $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Email'), 'email') ?>
|
||||
<?= $this->form->email('email', $values, $errors) ?><br/>
|
||||
<?= $this->form->email('email', $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Password'), 'password') ?>
|
||||
<?= $this->form->password('password', $values, $errors, array('required')) ?><br/>
|
||||
<?= $this->form->password('password', $values, $errors, array('required')) ?>
|
||||
|
||||
<?= $this->form->label(t('Confirmation'), 'confirmation') ?>
|
||||
<?= $this->form->password('confirmation', $values, $errors, array('required')) ?><br/>
|
||||
<?= $this->form->password('confirmation', $values, $errors, array('required')) ?>
|
||||
</div>
|
||||
|
||||
<div class="form-column">
|
||||
<?= $this->form->label(t('Add project member'), 'project_id') ?>
|
||||
<?= $this->form->select('project_id', $projects, $values, $errors) ?><br/>
|
||||
<?= $this->form->select('project_id', $projects, $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Timezone'), 'timezone') ?>
|
||||
<?= $this->form->select('timezone', $timezones, $values, $errors) ?><br/>
|
||||
<?= $this->form->select('timezone', $timezones, $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Language'), 'language') ?>
|
||||
<?= $this->form->select('language', $languages, $values, $errors) ?><br/>
|
||||
<?= $this->form->select('language', $languages, $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Role'), 'role') ?>
|
||||
<?= $this->form->select('role', $roles, $values, $errors) ?>
|
||||
|
||||
<?= $this->form->checkbox('notifications_enabled', t('Enable email notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?>
|
||||
<?= $this->form->checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?>
|
||||
<?= $this->form->checkbox('is_project_admin', t('Project Administrator'), 1, isset($values['is_project_admin']) && $values['is_project_admin'] == 1 ? true : false) ?>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -12,37 +12,38 @@
|
||||
|
||||
<div class="form-column">
|
||||
<?= $this->form->label(t('Username'), 'username') ?>
|
||||
<?= $this->form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?><br/>
|
||||
<?= $this->form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
|
||||
|
||||
<?= $this->form->label(t('Name'), 'name') ?>
|
||||
<?= $this->form->text('name', $values, $errors) ?><br/>
|
||||
<?= $this->form->text('name', $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Email'), 'email') ?>
|
||||
<?= $this->form->email('email', $values, $errors) ?><br/>
|
||||
<?= $this->form->email('email', $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Google Id'), 'google_id') ?>
|
||||
<?= $this->form->text('google_id', $values, $errors) ?><br/>
|
||||
<?= $this->form->text('google_id', $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Github Id'), 'github_id') ?>
|
||||
<?= $this->form->text('github_id', $values, $errors) ?><br/>
|
||||
<?= $this->form->text('github_id', $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Gitlab Id'), 'gitlab_id') ?>
|
||||
<?= $this->form->text('gitlab_id', $values, $errors) ?><br/>
|
||||
<?= $this->form->text('gitlab_id', $values, $errors) ?>
|
||||
</div>
|
||||
|
||||
<div class="form-column">
|
||||
<?= $this->form->label(t('Add project member'), 'project_id') ?>
|
||||
<?= $this->form->select('project_id', $projects, $values, $errors) ?><br/>
|
||||
<?= $this->form->select('project_id', $projects, $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Timezone'), 'timezone') ?>
|
||||
<?= $this->form->select('timezone', $timezones, $values, $errors) ?><br/>
|
||||
<?= $this->form->select('timezone', $timezones, $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Language'), 'language') ?>
|
||||
<?= $this->form->select('language', $languages, $values, $errors) ?><br/>
|
||||
<?= $this->form->select('language', $languages, $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Role'), 'role') ?>
|
||||
<?= $this->form->select('role', $roles, $values, $errors) ?>
|
||||
|
||||
<?= $this->form->checkbox('notifications_enabled', t('Enable email notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?>
|
||||
<?= $this->form->checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?>
|
||||
<?= $this->form->checkbox('is_project_admin', t('Project Administrator'), 1, isset($values['is_project_admin']) && $values['is_project_admin'] == 1 ? true : false) ?>
|
||||
<?= $this->form->checkbox('disable_login_form', t('Disallow login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -8,23 +8,23 @@
|
||||
<?= $this->form->hidden('id', $values) ?>
|
||||
|
||||
<?= $this->form->label(t('Username'), 'username') ?>
|
||||
<?= $this->form->text('username', $values, $errors, array('required', $values['is_ldap_user'] == 1 ? 'readonly' : '', 'maxlength="50"')) ?><br/>
|
||||
<?= $this->form->text('username', $values, $errors, array('required', $values['is_ldap_user'] == 1 ? 'readonly' : '', 'maxlength="50"')) ?>
|
||||
|
||||
<?= $this->form->label(t('Name'), 'name') ?>
|
||||
<?= $this->form->text('name', $values, $errors) ?><br/>
|
||||
<?= $this->form->text('name', $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Email'), 'email') ?>
|
||||
<?= $this->form->email('email', $values, $errors) ?><br/>
|
||||
<?= $this->form->email('email', $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Timezone'), 'timezone') ?>
|
||||
<?= $this->form->select('timezone', $timezones, $values, $errors) ?><br/>
|
||||
<?= $this->form->select('timezone', $timezones, $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Language'), 'language') ?>
|
||||
<?= $this->form->select('language', $languages, $values, $errors) ?><br/>
|
||||
<?= $this->form->select('language', $languages, $values, $errors) ?>
|
||||
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<?= $this->form->checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1) ?>
|
||||
<?= $this->form->checkbox('is_project_admin', t('Project Administrator'), 1, isset($values['is_project_admin']) && $values['is_project_admin'] == 1) ?>
|
||||
<?= $this->form->label(t('Role'), 'role') ?>
|
||||
<?= $this->form->select('role', $roles, $values, $errors) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<?php if (empty($user['google_id'])): ?>
|
||||
<?= $this->url->link(t('Link my Google Account'), 'oauth', 'google', array(), true) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->url->link(t('Unlink my Google Account'), 'oauth', 'unlink', array('backend' => 'google'), true) ?>
|
||||
<?= $this->url->link(t('Unlink my Google Account'), 'oauth', 'unlink', array('backend' => 'Google'), true) ?>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
<?= empty($user['google_id']) ? t('No account linked.') : t('Account linked.') ?>
|
||||
@@ -26,7 +26,7 @@
|
||||
<?php if (empty($user['github_id'])): ?>
|
||||
<?= $this->url->link(t('Link my Github Account'), 'oauth', 'github', array(), true) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->url->link(t('Unlink my Github Account'), 'oauth', 'unlink', array('backend' => 'github'), true) ?>
|
||||
<?= $this->url->link(t('Unlink my Github Account'), 'oauth', 'unlink', array('backend' => 'Github'), true) ?>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
<?= empty($user['github_id']) ? t('No account linked.') : t('Account linked.') ?>
|
||||
@@ -42,7 +42,7 @@
|
||||
<?php if (empty($user['gitlab_id'])): ?>
|
||||
<?= $this->url->link(t('Link my Gitlab Account'), 'oauth', 'gitlab', array(), true) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->url->link(t('Unlink my Gitlab Account'), 'oauth', 'unlink', array('backend' => 'gitlab'), true) ?>
|
||||
<?= $this->url->link(t('Unlink my Gitlab Account'), 'oauth', 'unlink', array('backend' => 'Gitlab'), true) ?>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
<?= empty($user['gitlab_id']) ? t('No account linked.') : t('Account linked.') ?>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<?php if ($this->user->hasAccess('user', 'create')): ?>
|
||||
<ul>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'user', 'create') ?></li>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New remote user'), 'user', 'create', array('remote' => 1)) ?></li>
|
||||
@@ -18,8 +18,7 @@
|
||||
<th><?= $paginator->order(t('Username'), 'username') ?></th>
|
||||
<th><?= $paginator->order(t('Name'), 'name') ?></th>
|
||||
<th><?= $paginator->order(t('Email'), 'email') ?></th>
|
||||
<th><?= $paginator->order(t('Administrator'), 'is_admin') ?></th>
|
||||
<th><?= $paginator->order(t('Project Administrator'), 'is_project_admin') ?></th>
|
||||
<th><?= $paginator->order(t('Role'), 'role') ?></th>
|
||||
<th><?= $paginator->order(t('Two factor authentication'), 'twofactor_activated') ?></th>
|
||||
<th><?= $paginator->order(t('Notifications'), 'notifications_enabled') ?></th>
|
||||
<th><?= $paginator->order(t('Account type'), 'is_ldap_user') ?></th>
|
||||
@@ -39,10 +38,7 @@
|
||||
<a href="mailto:<?= $this->e($user['email']) ?>"><?= $this->e($user['email']) ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<?= $user['is_admin'] ? t('Yes') : t('No') ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $user['is_project_admin'] ? t('Yes') : t('No') ?>
|
||||
<?= $this->user->getRoleName($user['role']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $user['twofactor_activated'] ? t('Yes') : t('No') ?>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<?php if ($this->user->hasAccess('user', 'create')): ?>
|
||||
<ul>
|
||||
<li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'user', 'create') ?></li>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<td><?= dt('%B %e, %Y at %k:%M %p', $session['expiration']) ?></td>
|
||||
<td><?= $this->e($session['ip']) ?></td>
|
||||
<td><?= $this->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'), 'User', 'removeSession', array('user_id' => $user['id'], 'id' => $session['id']), true) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<h2><?= t('Security') ?></h2>
|
||||
</div>
|
||||
<ul class="listing">
|
||||
<li><?= t('Group:') ?> <strong><?= $user['is_admin'] ? t('Administrator') : ($user['is_project_admin'] ? t('Project Administrator') : t('Regular user')) ?></strong></li>
|
||||
<li><?= t('Role:') ?> <strong><?= $this->user->getRoleName($user['role']) ?></strong></li>
|
||||
<li><?= t('Account type:') ?> <strong><?= $user['is_ldap_user'] ? t('Remote') : t('Local') ?></strong></li>
|
||||
<li><?= $user['twofactor_activated'] == 1 ? t('Two factor authentication enabled') : t('Two factor authentication disabled') ?></li>
|
||||
</ul>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<li <?= $this->app->getRouterController() === 'twofactor' && $this->app->getRouterAction() === 'index' ? 'class="active"' : '' ?>>
|
||||
<?= $this->url->link(t('Two factor authentication'), 'twofactor', 'index', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php elseif ($this->user->isAdmin() && $user['twofactor_activated'] == 1): ?>
|
||||
<?php elseif ($this->user->hasAccess('twofactor', 'disable') && $user['twofactor_activated'] == 1): ?>
|
||||
<li <?= $this->app->getRouterController() === 'twofactor' && $this->app->getRouterAction() === 'disable' ? 'class="active"' : '' ?>>
|
||||
<?= $this->url->link(t('Two factor authentication'), 'twofactor', 'disable', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
@@ -61,7 +61,7 @@
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<?php if ($this->user->hasAccess('user', 'authentication')): ?>
|
||||
<li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'authentication' ? 'class="active"' : '' ?>>
|
||||
<?= $this->url->link(t('Edit Authentication'), 'user', 'authentication', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
<?= $this->hook->render('template:user:sidebar:actions', array('user' => $user)) ?>
|
||||
|
||||
<?php if ($this->user->isAdmin() && ! $this->user->isCurrentUser($user['id'])): ?>
|
||||
<?php if ($this->user->hasAccess('user', 'remove') && ! $this->user->isCurrentUser($user['id'])): ?>
|
||||
<li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'remove' ? 'class="active"' : '' ?>>
|
||||
<?= $this->url->link(t('Remove'), 'user', 'remove', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<?php if ($this->user->hasAccess('user', 'create')): ?>
|
||||
<ul>
|
||||
<li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'user', 'create') ?></li>
|
||||
|
||||
Reference in New Issue
Block a user