summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Controller/Base.php20
-rw-r--r--app/Controller/Comment.php4
-rw-r--r--app/Controller/File.php2
-rw-r--r--app/Controller/Subtask.php111
-rw-r--r--app/Controller/SubtaskRestriction.php61
-rw-r--r--app/Controller/SubtaskStatus.php28
-rw-r--r--app/Controller/TaskRecurrence.php61
-rw-r--r--app/Controller/Taskcreation.php2
-rw-r--r--app/Controller/Taskduplication.php2
-rw-r--r--app/Controller/Taskmodification.php41
-rw-r--r--app/Helper/Layout.php2
-rw-r--r--app/Helper/Subtask.php38
-rw-r--r--app/Helper/Task.php15
-rw-r--r--app/Locale/de_DE/translations.php2
-rw-r--r--app/Locale/ru_RU/translations.php102
-rw-r--r--app/Model/Subtask.php7
-rw-r--r--app/ServiceProvider/AuthenticationProvider.php3
-rw-r--r--app/ServiceProvider/RouteProvider.php25
-rw-r--r--app/Template/analytic/layout.php3
-rw-r--r--app/Template/analytic/sidebar.php2
-rw-r--r--app/Template/app/sidebar.php2
-rw-r--r--app/Template/app/subtasks.php2
-rw-r--r--app/Template/board/tooltip_subtasks.php15
-rw-r--r--app/Template/comment/edit.php6
-rw-r--r--app/Template/comment/remove.php2
-rw-r--r--app/Template/comment/show.php4
-rw-r--r--app/Template/config/sidebar.php2
-rw-r--r--app/Template/export/sidebar.php2
-rw-r--r--app/Template/file/new.php4
-rw-r--r--app/Template/project/sidebar.php2
-rw-r--r--app/Template/subtask/icons.php7
-rw-r--r--app/Template/subtask/menu.php21
-rw-r--r--app/Template/subtask/show.php88
-rw-r--r--app/Template/subtask/table.php69
-rw-r--r--app/Template/subtask_restriction/popover.php (renamed from app/Template/subtask/restriction_change_status.php)6
-rw-r--r--app/Template/task/layout.php5
-rw-r--r--app/Template/task/menu.php72
-rw-r--r--app/Template/task/remove.php2
-rw-r--r--app/Template/task/show.php5
-rw-r--r--app/Template/task/sidebar.php80
-rw-r--r--app/Template/task_duplication/copy.php6
-rw-r--r--app/Template/task_duplication/duplicate.php2
-rw-r--r--app/Template/task_duplication/move.php6
-rw-r--r--app/Template/task_external_link/remove.php2
-rw-r--r--app/Template/task_external_link/show.php4
-rw-r--r--app/Template/task_modification/edit_task.php46
-rw-r--r--app/Template/task_recurrence/edit.php (renamed from app/Template/task_modification/edit_recurrence.php)6
-rw-r--r--app/Template/user/sidebar.php2
48 files changed, 491 insertions, 510 deletions
diff --git a/app/Controller/Base.php b/app/Controller/Base.php
index a80b3528..c55ad9ad 100644
--- a/app/Controller/Base.php
+++ b/app/Controller/Base.php
@@ -214,8 +214,7 @@ abstract class Base extends \Kanboard\Core\Base
$project = $this->project->getByIdWithOwner($project_id);
if (empty($project)) {
- $this->flash->failure(t('Project not found.'));
- $this->response->redirect($this->helper->url->to('project', 'index'));
+ $this->notfound();
}
return $project;
@@ -243,6 +242,23 @@ abstract class Base extends \Kanboard\Core\Base
}
/**
+ * Get the current subtask
+ *
+ * @access protected
+ * @return array
+ */
+ protected function getSubtask()
+ {
+ $subtask = $this->subtask->getById($this->request->getIntegerParam('subtask_id'));
+
+ if (empty($subtask)) {
+ $this->notfound();
+ }
+
+ return $subtask;
+ }
+
+ /**
* Common method to get project filters
*
* @access protected
diff --git a/app/Controller/Comment.php b/app/Controller/Comment.php
index 1e94779f..da3213e0 100644
--- a/app/Controller/Comment.php
+++ b/app/Controller/Comment.php
@@ -107,7 +107,7 @@ class Comment extends Base
public function update()
{
$task = $this->getTask();
- $comment = $this->getComment();
+ $this->getComment();
$values = $this->request->getValues();
list($valid, $errors) = $this->commentValidator->validateModification($values);
@@ -119,7 +119,7 @@ class Comment extends Base
$this->flash->failure(t('Unable to update your comment.'));
}
- return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'comment-'.$comment['id']));
+ return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), false);
}
$this->edit($values, $errors);
diff --git a/app/Controller/File.php b/app/Controller/File.php
index b347f67f..50db3865 100644
--- a/app/Controller/File.php
+++ b/app/Controller/File.php
@@ -59,7 +59,7 @@ class File extends Base
$this->flash->failure(t('Unable to upload the file.'));
}
- $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])));
+ $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true);
}
/**
diff --git a/app/Controller/Subtask.php b/app/Controller/Subtask.php
index 9fe15c9d..f8798906 100644
--- a/app/Controller/Subtask.php
+++ b/app/Controller/Subtask.php
@@ -2,8 +2,6 @@
namespace Kanboard\Controller;
-use Kanboard\Model\Subtask as SubtaskModel;
-
/**
* Subtask controller
*
@@ -13,23 +11,6 @@ use Kanboard\Model\Subtask as SubtaskModel;
class Subtask extends Base
{
/**
- * Get the current subtask
- *
- * @access private
- * @return array
- */
- private function getSubtask()
- {
- $subtask = $this->subtask->getById($this->request->getIntegerParam('subtask_id'));
-
- if (empty($subtask)) {
- $this->notfound();
- }
-
- return $subtask;
- }
-
- /**
* Show list of subtasks
*/
public function show()
@@ -182,98 +163,6 @@ class Subtask extends Base
}
/**
- * Change status to the next status: Toto -> In Progress -> Done
- *
- * @access public
- */
- public function toggleStatus()
- {
- $task = $this->getTask();
- $subtask = $this->getSubtask();
- $redirect = $this->request->getStringParam('redirect', 'task');
-
- $this->subtask->toggleStatus($subtask['id']);
-
- if ($redirect === 'board') {
- $this->sessionStorage->hasSubtaskInProgress = $this->subtask->hasSubtaskInProgress($this->userSession->getId());
-
- $this->response->html($this->template->render('board/tooltip_subtasks', array(
- 'subtasks' => $this->subtask->getAll($task['id']),
- 'task' => $task,
- )));
- }
-
- $this->toggleRedirect($task, $redirect);
- }
-
- /**
- * Handle subtask restriction (popover)
- *
- * @access public
- */
- public function subtaskRestriction()
- {
- $task = $this->getTask();
- $subtask = $this->getSubtask();
-
- $this->response->html($this->template->render('subtask/restriction_change_status', array(
- 'status_list' => array(
- SubtaskModel::STATUS_TODO => t('Todo'),
- SubtaskModel::STATUS_DONE => t('Done'),
- ),
- 'subtask_inprogress' => $this->subtask->getSubtaskInProgress($this->userSession->getId()),
- 'subtask' => $subtask,
- 'task' => $task,
- 'redirect' => $this->request->getStringParam('redirect'),
- )));
- }
-
- /**
- * Change status of the in progress subtask and the other subtask
- *
- * @access public
- */
- public function changeRestrictionStatus()
- {
- $task = $this->getTask();
- $subtask = $this->getSubtask();
- $values = $this->request->getValues();
-
- // Change status of the previous in progress subtask
- $this->subtask->update(array(
- 'id' => $values['id'],
- 'status' => $values['status'],
- ));
-
- // Set the current subtask to in pogress
- $this->subtask->update(array(
- 'id' => $subtask['id'],
- 'status' => SubtaskModel::STATUS_INPROGRESS,
- ));
-
- $this->toggleRedirect($task, $values['redirect']);
- }
-
- /**
- * Redirect to the right page
- *
- * @access private
- */
- private function toggleRedirect(array $task, $redirect)
- {
- switch ($redirect) {
- case 'board':
- $this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $task['project_id'])));
- case 'dashboard':
- $this->response->redirect($this->helper->url->to('app', 'index'));
- case 'subtask':
- $this->response->redirect($this->helper->url->to('subtask', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])));
- default:
- $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), 'subtasks'));
- }
- }
-
- /**
* Move subtask position
*
* @access public
diff --git a/app/Controller/SubtaskRestriction.php b/app/Controller/SubtaskRestriction.php
new file mode 100644
index 00000000..56024867
--- /dev/null
+++ b/app/Controller/SubtaskRestriction.php
@@ -0,0 +1,61 @@
+<?php
+
+namespace Kanboard\Controller;
+
+use Kanboard\Model\Subtask as SubtaskModel;
+
+/**
+ * Subtask Restriction
+ *
+ * @package controller
+ * @author Frederic Guillot
+ */
+class SubtaskRestriction extends Base
+{
+ /**
+ * Show popup
+ *
+ * @access public
+ */
+ public function popover()
+ {
+ $task = $this->getTask();
+ $subtask = $this->getSubtask();
+
+ $this->response->html($this->template->render('subtask_restriction/popover', array(
+ 'status_list' => array(
+ SubtaskModel::STATUS_TODO => t('Todo'),
+ SubtaskModel::STATUS_DONE => t('Done'),
+ ),
+ 'subtask_inprogress' => $this->subtask->getSubtaskInProgress($this->userSession->getId()),
+ 'subtask' => $subtask,
+ 'task' => $task,
+ )));
+ }
+
+ /**
+ * Change status of the in progress subtask and the other subtask
+ *
+ * @access public
+ */
+ public function update()
+ {
+ $task = $this->getTask();
+ $subtask = $this->getSubtask();
+ $values = $this->request->getValues();
+
+ // Change status of the previous "in progress" subtask
+ $this->subtask->update(array(
+ 'id' => $values['id'],
+ 'status' => $values['status'],
+ ));
+
+ // Set the current subtask to "in progress"
+ $this->subtask->update(array(
+ 'id' => $subtask['id'],
+ 'status' => SubtaskModel::STATUS_INPROGRESS,
+ ));
+
+ $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true);
+ }
+}
diff --git a/app/Controller/SubtaskStatus.php b/app/Controller/SubtaskStatus.php
new file mode 100644
index 00000000..efe8a974
--- /dev/null
+++ b/app/Controller/SubtaskStatus.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Kanboard\Controller;
+
+/**
+ * Subtask Status
+ *
+ * @package controller
+ * @author Frederic Guillot
+ */
+class SubtaskStatus extends Base
+{
+ /**
+ * Change status to the next status: Toto -> In Progress -> Done
+ *
+ * @access public
+ */
+ public function change()
+ {
+ $task = $this->getTask();
+ $subtask = $this->getSubtask();
+
+ $status = $this->subtask->toggleStatus($subtask['id']);
+ $subtask['status'] = $status;
+
+ $this->response->html($this->helper->subtask->toggleStatus($subtask, $task['project_id']));
+ }
+}
diff --git a/app/Controller/TaskRecurrence.php b/app/Controller/TaskRecurrence.php
new file mode 100644
index 00000000..f02f3cdc
--- /dev/null
+++ b/app/Controller/TaskRecurrence.php
@@ -0,0 +1,61 @@
+<?php
+
+namespace Kanboard\Controller;
+
+/**
+ * Task Recurrence controller
+ *
+ * @package controller
+ * @author Frederic Guillot
+ */
+class TaskRecurrence extends Base
+{
+ /**
+ * Edit recurrence form
+ *
+ * @access public
+ */
+ public function edit(array $values = array(), array $errors = array())
+ {
+ $task = $this->getTask();
+
+ if (empty($values)) {
+ $values = $task;
+ }
+
+ $this->response->html($this->helper->layout->task('task_recurrence/edit', array(
+ 'values' => $values,
+ 'errors' => $errors,
+ 'task' => $task,
+ 'recurrence_status_list' => $this->task->getRecurrenceStatusList(),
+ 'recurrence_trigger_list' => $this->task->getRecurrenceTriggerList(),
+ 'recurrence_timeframe_list' => $this->task->getRecurrenceTimeframeList(),
+ 'recurrence_basedate_list' => $this->task->getRecurrenceBasedateList(),
+ )));
+ }
+
+ /**
+ * Update recurrence form
+ *
+ * @access public
+ */
+ public function update()
+ {
+ $task = $this->getTask();
+ $values = $this->request->getValues();
+
+ list($valid, $errors) = $this->taskValidator->validateEditRecurrence($values);
+
+ if ($valid) {
+ if ($this->taskModification->update($values)) {
+ $this->flash->success(t('Task updated successfully.'));
+ } else {
+ $this->flash->failure(t('Unable to update your task.'));
+ }
+
+ $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true);
+ }
+
+ $this->edit($values, $errors);
+ }
+}
diff --git a/app/Controller/Taskcreation.php b/app/Controller/Taskcreation.php
index 6f5253eb..e661587c 100644
--- a/app/Controller/Taskcreation.php
+++ b/app/Controller/Taskcreation.php
@@ -71,7 +71,7 @@ class Taskcreation extends Base
return $this->create(array(
'owner_id' => $values['owner_id'],
'color_id' => $values['color_id'],
- 'category_id' => $values['category_id'],
+ 'category_id' => isset($values['category_id']) ? $values['category_id'] : 0,
'column_id' => $values['column_id'],
'swimlane_id' => isset($values['swimlane_id']) ? $values['swimlane_id'] : 0,
'another_task' => 1,
diff --git a/app/Controller/Taskduplication.php b/app/Controller/Taskduplication.php
index f940eee3..7e7fccd6 100644
--- a/app/Controller/Taskduplication.php
+++ b/app/Controller/Taskduplication.php
@@ -28,7 +28,7 @@ class Taskduplication extends Base
$this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task_id)));
} else {
$this->flash->failure(t('Unable to create this task.'));
- $this->response->redirect($this->helper->url->to('taskduplication', 'duplicate', array('project_id' => $task['project_id'], 'task_id' => $task['id'])));
+ $this->response->redirect($this->helper->url->to('taskduplication', 'duplicate', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true);
}
}
diff --git a/app/Controller/Taskmodification.php b/app/Controller/Taskmodification.php
index cae1d8ee..0e9316b2 100644
--- a/app/Controller/Taskmodification.php
+++ b/app/Controller/Taskmodification.php
@@ -138,45 +138,4 @@ class Taskmodification extends Base
$this->edit($values, $errors);
}
}
-
- /**
- * Edit recurrence form
- *
- * @access public
- */
- public function recurrence()
- {
- $task = $this->getTask();
-
- if ($this->request->isPost()) {
- $values = $this->request->getValues();
-
- list($valid, $errors) = $this->taskValidator->validateEditRecurrence($values);
-
- if ($valid) {
- if ($this->taskModification->update($values)) {
- $this->flash->success(t('Task updated successfully.'));
- } else {
- $this->flash->failure(t('Unable to update your task.'));
- }
-
- $this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])));
- }
- } else {
- $values = $task;
- $errors = array();
- }
-
- $params = array(
- 'values' => $values,
- 'errors' => $errors,
- 'task' => $task,
- 'recurrence_status_list' => $this->task->getRecurrenceStatusList(),
- 'recurrence_trigger_list' => $this->task->getRecurrenceTriggerList(),
- 'recurrence_timeframe_list' => $this->task->getRecurrenceTimeframeList(),
- 'recurrence_basedate_list' => $this->task->getRecurrenceBasedateList(),
- );
-
- $this->response->html($this->helper->layout->task('task_modification/edit_recurrence', $params));
- }
}
diff --git a/app/Helper/Layout.php b/app/Helper/Layout.php
index 8c00a311..3db23920 100644
--- a/app/Helper/Layout.php
+++ b/app/Helper/Layout.php
@@ -60,7 +60,7 @@ class Layout extends Base
*/
public function task($template, array $params)
{
- $params['title'] = '#'.$params['task']['id'].' '.$params['task']['title'];
+ $params['title'] = $params['task']['title'];
return $this->subLayout('task/layout', 'task/sidebar', $template, $params);
}
diff --git a/app/Helper/Subtask.php b/app/Helper/Subtask.php
index 5b8d7d90..38074b78 100644
--- a/app/Helper/Subtask.php
+++ b/app/Helper/Subtask.php
@@ -10,38 +10,40 @@ namespace Kanboard\Helper;
*/
class Subtask extends \Kanboard\Core\Base
{
+ public function getTitle(array $subtask)
+ {
+ if ($subtask['status'] == 0) {
+ $html = '<i class="fa fa-square-o fa-fw"></i>';
+ } elseif ($subtask['status'] == 1) {
+ $html = '<i class="fa fa-gears fa-fw"></i>';
+ } else {
+ $html = '<i class="fa fa-check-square-o fa-fw"></i>';
+ }
+
+ return $html.$this->helper->e($subtask['title']);
+ }
+
/**
* Get the link to toggle subtask status
*
* @access public
* @param array $subtask
- * @param string $redirect
* @param integer $project_id
* @return string
*/
- public function toggleStatus(array $subtask, $redirect, $project_id = 0)
+ public function toggleStatus(array $subtask, $project_id)
{
- if ($project_id > 0 && ! $this->helper->user->hasProjectAccess('subtask', 'edit', $project_id)) {
- return trim($this->template->render('subtask/icons', array('subtask' => $subtask))) . $this->helper->e($subtask['title']);
+ if (! $this->helper->user->hasProjectAccess('subtask', 'edit', $project_id)) {
+ return $this->getTitle($subtask);
}
+ $params = array('task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id']);
+
if ($subtask['status'] == 0 && isset($this->sessionStorage->hasSubtaskInProgress) && $this->sessionStorage->hasSubtaskInProgress) {
- return $this->helper->url->link(
- trim($this->template->render('subtask/icons', array('subtask' => $subtask))) . $this->helper->e($subtask['title']),
- 'subtask',
- 'subtaskRestriction',
- array('task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'redirect' => $redirect),
- false,
- 'popover task-board-popover'
- );
+ return $this->helper->url->link($this->getTitle($subtask), 'SubtaskRestriction', 'popover', $params, false, 'popover');
}
- return $this->helper->url->link(
- trim($this->template->render('subtask/icons', array('subtask' => $subtask))) . $this->helper->e($subtask['title']),
- 'subtask',
- 'toggleStatus',
- array('task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'redirect' => $redirect)
- );
+ return $this->helper->url->link($this->getTitle($subtask), 'SubtaskStatus', 'change', $params, false, 'ajax-replace');
}
public function selectTitle(array $values, array $errors = array(), array $attributes = array())
diff --git a/app/Helper/Task.php b/app/Helper/Task.php
index 192cce49..1cb36b86 100644
--- a/app/Helper/Task.php
+++ b/app/Helper/Task.php
@@ -129,10 +129,21 @@ class Task extends Base
return $html;
}
+ public function selectTimeSpent(array $values, array $errors = array(), array $attributes = array())
+ {
+ $attributes = array_merge(array('tabindex="10"'), $attributes);
+
+ $html = $this->helper->form->label(t('Time spent'), 'time_spent');
+ $html .= $this->helper->form->numeric('time_spent', $values, $errors, $attributes);
+ $html .= ' '.t('hours');
+
+ return $html;
+ }
+
public function selectStartDate(array $values, array $errors = array(), array $attributes = array())
{
$placeholder = $this->helper->text->in($this->config->get('application_date_format'), $this->dateParser->getAvailableFormats());
- $attributes = array_merge(array('tabindex="10"', 'placeholder="'.$placeholder.'"'), $attributes);
+ $attributes = array_merge(array('tabindex="11"', 'placeholder="'.$placeholder.'"'), $attributes);
$html = $this->helper->form->label(t('Start Date'), 'date_started');
$html .= $this->helper->form->text('date_started', $values, $errors, $attributes, 'form-date');
@@ -143,7 +154,7 @@ class Task extends Base
public function selectDueDate(array $values, array $errors = array(), array $attributes = array())
{
$placeholder = $this->helper->text->in($this->config->get('application_date_format'), $this->dateParser->getAvailableFormats());
- $attributes = array_merge(array('tabindex="11"', 'placeholder="'.$placeholder.'"'), $attributes);
+ $attributes = array_merge(array('tabindex="12"', 'placeholder="'.$placeholder.'"'), $attributes);
$html = $this->helper->form->label(t('Due Date'), 'date_due');
$html .= $this->helper->form->text('date_due', $values, $errors, $attributes, 'form-date');
diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php
index 34aa69e6..a6e5f969 100644
--- a/app/Locale/de_DE/translations.php
+++ b/app/Locale/de_DE/translations.php
@@ -26,7 +26,7 @@ return array(
'Pink' => 'Pink',
'Teal' => 'Türkis',
'Cyan' => 'Cyan',
- 'Lime' => 'Giftgrün',
+ 'Lime' => 'Limette',
'Light Green' => 'Hellgrün',
'Amber' => 'Bernstein',
'Save' => 'Speichern',
diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php
index 6832a8f5..36155b5d 100644
--- a/app/Locale/ru_RU/translations.php
+++ b/app/Locale/ru_RU/translations.php
@@ -120,7 +120,7 @@ return array(
'The user id is required' => 'Необходим ID пользователя',
'Passwords don\'t match' => 'Пароли не совпадают',
'The confirmation is required' => 'Необходимо подтверждение',
- 'The project is required' => 'Необъодимо указать проект',
+ 'The project is required' => 'Необходимо указать проект',
'The id is required' => 'Необходим ID',
'The project id is required' => 'Необходим ID проекта',
'The project name is required' => 'Необходимо имя проекта',
@@ -177,7 +177,7 @@ return array(
'User' => 'Пользователь',
'Comments' => 'Комментарии',
'Write your text in Markdown' => 'Справка по синтаксису Markdown',
- 'Leave a comment' => 'Оставить комментарий 2',
+ 'Leave a comment' => 'Оставить комментарий',
'Comment is required' => 'Нужен комментарий',
'Leave a description' => 'Напишите описание',
'Comment added successfully.' => 'Комментарий успешно добавлен.',
@@ -189,7 +189,7 @@ return array(
'%B %e, %Y' => '%B, %e, %Y',
'%b %e, %Y' => '%b %e, %Y',
'Automatic actions' => 'Автоматические действия',
- 'Your automatic action have been created successfully.' => 'Автоматика успешно настроена.',
+ 'Your automatic action have been created successfully.' => 'Автоматизированное действие успешно настроено.',
'Unable to create your automatic action.' => 'Не удалось создать автоматизированное действие.',
'Remove an action' => 'Удалить действие',
'Unable to remove this action.' => 'Не удалось удалить действие',
@@ -852,8 +852,8 @@ return array(
'New remote user' => 'Новый удаленный пользователь',
'New local user' => 'Новый локальный пользователь',
'Default task color' => 'Стандартные цвета задач',
- 'Hide sidebar' => 'Свернуть сайдбар',
- 'Expand sidebar' => 'Показать сайдбар',
+ 'Hide sidebar' => 'Свернуть боковое меню',
+ 'Expand sidebar' => 'Показать боковое меню',
'This feature does not work with all browsers.' => 'Эта функция доступна не во всех браузерах.',
'There is no destination project available.' => 'Нет доступного для назначения проекта.',
'Trigger automatically subtask time tracking' => 'Триггер автоматического отслеживания времени подзадач',
@@ -862,14 +862,14 @@ return array(
'Current column: %s' => 'Текущая колонка: %s',
'Current category: %s' => 'Текущая категория: %s',
'no category' => 'без категории',
- 'Current assignee: %s' => 'Current assignee: %s',
+ 'Current assignee: %s' => 'Текущее назначенное лицо: %s',
'not assigned' => 'не назначен',
'Author:' => 'Автор:',
'contributors' => 'соавторы',
'License:' => 'Лицензия:',
'License' => 'Лицензия',
'Enter the text below' => 'Введите текст ниже',
- 'Gantt chart for %s' => 'Диаграмма Гантта для %s',
+ 'Gantt chart for %s' => 'Диаграмма Ганта для %s',
'Sort by position' => 'Сортировать по позиции',
'Sort by date' => 'Сортировать по дате',
'Add task' => 'Добавить задачу',
@@ -878,7 +878,7 @@ return array(
'There is no start date or due date for this task.' => 'Для этой задачи нет даты начала или завершения.',
'Moving or resizing a task will change the start and due date of the task.' => 'Изменение или перемещение задачи повлечет изменение даты начала завершения задачи.',
'There is no task in your project.' => 'В Вашем проекте задач нет.',
- 'Gantt chart' => 'Диаграмма Гантта',
+ 'Gantt chart' => 'Диаграмма Ганта',
'People who are project managers' => 'Люди, которые менеджеры проекта',
'People who are project members' => 'Люди, которые участники проекта',
'NOK - Norwegian Krone' => 'НК - Норвежская крона',
@@ -891,13 +891,13 @@ return array(
'Members' => 'Участники',
'Shared project' => 'Общие/публичные проекты',
'Project managers' => 'Менеджер проекта',
- 'Gantt chart for all projects' => 'Диаграмма Гантта для всех проектов',
+ 'Gantt chart for all projects' => 'Диаграмма Ганта для всех проектов',
'Projects list' => 'Список проектов',
- 'Gantt chart for this project' => 'Диаграмма Гантта для этого проекта',
+ 'Gantt chart for this project' => 'Диаграмма Ганта для этого проекта',
'Project board' => 'Доска проекта',
'End date:' => 'Дата завершения:',
'There is no start date or end date for this project.' => 'В проекте не указаны дата начала или завершения.',
- 'Projects Gantt chart' => 'Диаграмма Гантта проектов',
+ 'Projects Gantt chart' => 'Диаграмма Ганта проектов',
'Start date: %s' => 'Дата начала: %s',
'End date: %s' => 'Дата завершения: %s',
'Link type' => 'Тип ссылки',
@@ -905,11 +905,11 @@ return array(
'Task link creation or modification' => 'Ссылка на создание или модификацию задачи',
'Milestone' => 'Веха',
'Documentation: %s' => 'Документация: %s',
- 'Switch to the Gantt chart view' => 'Переключиться в режим диаграммы Гантта',
+ 'Switch to the Gantt chart view' => 'Переключиться в режим диаграммы Ганта',
'Reset the search/filter box' => 'Сбросить поиск/фильтр',
'Documentation' => 'Документация',
'Table of contents' => 'Содержание',
- 'Gantt' => 'Гантт',
+ 'Gantt' => 'Гант',
'Author' => 'Автор',
'Version' => 'Версия',
'Plugins' => 'Плагины',
@@ -1019,8 +1019,8 @@ return array(
'Your account is locked for %d minutes' => 'Ваш аккаунт заблокирован на %d минут',
'Invalid captcha' => 'Неверный код подтверждения',
'The name must be unique' => 'Имя должно быть уникальным',
- 'View all groups' => 'Просмотр всех группы',
- 'View group members' => 'Просмотр всех группы участников группы',
+ 'View all groups' => 'Просмотр всех групп',
+ 'View group members' => 'Просмотр участников группы',
'There is no user available.' => 'Нет доступных пользователей.',
'Do you really want to remove the user "%s" from the group "%s"?' => 'Вы действительно хотите удалить пользователя "%s" из группы "%s"?',
'There is no group.' => 'Нет созданных групп.',
@@ -1058,7 +1058,7 @@ return array(
'RUB - Russian Ruble' => 'Руб - Российский рубль',
'Assign the task to the person who does the action when the column is changed' => 'Назначить задачу пользователю, который произвел изменение в колонке',
'Close a task in a specific column' => 'Закрыть задачу в выбранной колонке',
- 'Time-based One-time Password Algorithm' => 'Времязависиммый, одноразовый алгоритм пароля',
+ 'Time-based One-time Password Algorithm' => 'Зависимый от времени, одноразовый алгоритм пароля',
'Two-Factor Provider: ' => 'Провайдер двух-факторной авторизации: ',
'Disable two-factor authentication' => 'Отключить двух-факторную авторизацию',
'Enable two-factor authentication' => 'Включить двух-факторную авторизацию',
@@ -1094,40 +1094,42 @@ return array(
'Dates' => 'Даты',
'Default priority' => 'Приоритет по-умолчанию',
'Lowest priority' => 'Наименьший приоритет',
- 'Highest priority' => 'Нивысший приоритет',
+ 'Highest priority' => 'Наивысший приоритет',
'If you put zero to the low and high priority, this feature will be disabled.' => 'Если Вы введете 0 для наименьшего и наивысшего приоритета, этот функционал будет отключен.',
'Priority: %d' => 'Приоритет: %d',
- // 'Close a task when there is no activity' => '',
- // 'Duration in days' => '',
- // 'Send email when there is no activity on a task' => '',
- // 'List of external links' => '',
- // 'Unable to fetch link information.' => '',
- // 'Daily background job for tasks' => '',
- // 'Auto' => '',
- // 'Related' => '',
- // 'Attachment' => '',
- // 'Title not found' => '',
- // 'Web Link' => '',
- // 'External links' => '',
- // 'Add external link' => '',
- // 'Type' => '',
- // 'Dependency' => '',
- // 'View internal links' => '',
- // 'View external links' => '',
- // 'Add internal link' => '',
- // 'Add a new external link' => '',
- // 'Edit external link' => '',
- // 'External link' => '',
- // 'Copy and paste your link here...' => '',
- // 'URL' => '',
- // 'There is no external link for the moment.' => '',
- // 'Internal links' => '',
- // 'There is no internal link for the moment.' => '',
- // 'Assign to me' => '',
- // 'Me' => '',
- // 'Do not duplicate anything' => '',
- // 'Projects management' => '',
- // 'Users management' => '',
- // 'Groups management' => '',
- // 'Create from another project' => '',
+ 'Close a task when there is no activity' => 'Закрывать задачу, когда нет активности',
+ 'Duration in days' => 'Длительность в днях',
+ 'Send email when there is no activity on a task' => 'Отправлять email, когда активность по задаче отсутствует',
+ 'List of external links' => 'Список внешних ссылок',
+ 'Unable to fetch link information.' => 'Не удалось получить информацию о ссылке',
+ 'Daily background job for tasks' => 'Ежедневные фоновые работы для задач',
+ 'Auto' => 'Авто',
+ 'Related' => 'Связано',
+ 'Attachment' => 'Вложение',
+ 'Title not found' => 'Заголовок не найден',
+ 'Web Link' => 'Web-ссылка',
+ 'External links' => 'Внешние ссылки',
+ 'Add external link' => 'Добавить внешнюю ссылку',
+ 'Type' => 'Тип',
+ 'Dependency' => 'Зависимость',
+ 'View internal links' => 'Просмотр внутренних ссылок',
+ 'View external links' => 'Просмотр внешних ссылок',
+ 'Add internal link' => 'Добавить внутреннюю ссылку',
+ 'Add a new external link' => 'Добавить новую внешнюю ссылку',
+ 'Edit external link' => 'Изменить внешнюю ссылку',
+ 'External link' => 'Внешняя ссылка',
+ 'Copy and paste your link here...' => 'Скопируйте и вставьте вашу ссылку здесь',
+ 'URL' => 'URL',
+ 'There is no external link for the moment.' => 'На данный момент внешние ссылки отсутствуют',
+ 'Internal links' => 'Внутренние ссылки',
+ 'There is no internal link for the moment.' => 'На данные момент внутреннии ссылки отсутствуют',
+ 'Assign to me' => 'Связать со мной',
+ 'Me' => 'Мне',
+ 'Do not duplicate anything' => 'Не дублировать ничего',
+ 'Projects management' => 'Управление проектами',
+ 'Users management' => 'Управление пользователями',
+ 'Groups management' => 'Управление группами',
+ 'Create from another project' => 'Создать из другого проекта',
+ 'View all sub-tasks' => 'Просмотр всех подзадач'
+
);
diff --git a/app/Model/Subtask.php b/app/Model/Subtask.php
index 1e989ad5..14853941 100644
--- a/app/Model/Subtask.php
+++ b/app/Model/Subtask.php
@@ -353,15 +353,16 @@ class Subtask extends Base
*
* @access public
* @param integer $subtask_id
- * @return bool
+ * @return boolean|integer
*/
public function toggleStatus($subtask_id)
{
$subtask = $this->getById($subtask_id);
+ $status = ($subtask['status'] + 1) % 3;
$values = array(
'id' => $subtask['id'],
- 'status' => ($subtask['status'] + 1) % 3,
+ 'status' => $status,
'task_id' => $subtask['task_id'],
);
@@ -369,7 +370,7 @@ class Subtask extends Base
$values['user_id'] = $this->userSession->getId();
}
- return $this->update($values);
+ return $this->update($values) ? $status : false;
}
/**
diff --git a/app/ServiceProvider/AuthenticationProvider.php b/app/ServiceProvider/AuthenticationProvider.php
index aaf23083..4196a470 100644
--- a/app/ServiceProvider/AuthenticationProvider.php
+++ b/app/ServiceProvider/AuthenticationProvider.php
@@ -83,10 +83,13 @@ class AuthenticationProvider implements ServiceProviderInterface
$acl->add('ProjectEdit', '*', Role::PROJECT_MANAGER);
$acl->add('Projectuser', '*', Role::PROJECT_MANAGER);
$acl->add('Subtask', '*', Role::PROJECT_MEMBER);
+ $acl->add('SubtaskRestriction', '*', Role::PROJECT_MEMBER);
+ $acl->add('SubtaskStatus', '*', Role::PROJECT_MEMBER);
$acl->add('Swimlane', '*', Role::PROJECT_MANAGER);
$acl->add('Task', 'remove', Role::PROJECT_MEMBER);
$acl->add('Taskcreation', '*', Role::PROJECT_MEMBER);
$acl->add('Taskduplication', '*', Role::PROJECT_MEMBER);
+ $acl->add('TaskRecurrence', '*', Role::PROJECT_MEMBER);
$acl->add('TaskImport', '*', Role::PROJECT_MANAGER);
$acl->add('Tasklink', '*', Role::PROJECT_MEMBER);
$acl->add('Tasklink', array('show'), Role::PROJECT_VIEWER);
diff --git a/app/ServiceProvider/RouteProvider.php b/app/ServiceProvider/RouteProvider.php
index 78c46bc4..7064884e 100644
--- a/app/ServiceProvider/RouteProvider.php
+++ b/app/ServiceProvider/RouteProvider.php
@@ -107,31 +107,10 @@ class RouteProvider implements ServiceProviderInterface
$container['route']->addRoute('project/:project_id/task/:task_id/activity', 'activity', 'task');
$container['route']->addRoute('project/:project_id/task/:task_id/screenshot', 'file', 'screenshot');
$container['route']->addRoute('project/:project_id/task/:task_id/upload', 'file', 'create');
- $container['route']->addRoute('project/:project_id/task/:task_id/comment', 'comment', 'create');
- $container['route']->addRoute('project/:project_id/task/:task_id/links', 'tasklink', 'show');
- $container['route']->addRoute('project/:project_id/task/:task_id/link', 'tasklink', 'create');
$container['route']->addRoute('project/:project_id/task/:task_id/transitions', 'task', 'transitions');
$container['route']->addRoute('project/:project_id/task/:task_id/analytics', 'task', 'analytics');
- $container['route']->addRoute('project/:project_id/task/:task_id/remove', 'task', 'remove');
-
- $container['route']->addRoute('project/:project_id/task/:task_id/links/external', 'TaskExternalLink', 'show');
- $container['route']->addRoute('project/:project_id/task/:task_id/link/external/new', 'TaskExternalLink', 'find');
- $container['route']->addRoute('project/:project_id/task/:task_id/link/external/save', 'TaskExternalLink', 'create');
- $container['route']->addRoute('project/:project_id/task/:task_id/link/external/:link_id', 'TaskExternalLink', 'edit');
- $container['route']->addRoute('project/:project_id/task/:task_id/link/external/:link_id/remove', 'TaskExternalLink', 'confirm');
-
- $container['route']->addRoute('project/:project_id/task/:task_id/edit', 'taskmodification', 'edit');
- $container['route']->addRoute('project/:project_id/task/:task_id/description', 'taskmodification', 'description');
- $container['route']->addRoute('project/:project_id/task/:task_id/recurrence', 'taskmodification', 'recurrence');
-
- $container['route']->addRoute('project/:project_id/task/:task_id/close', 'taskstatus', 'close');
- $container['route']->addRoute('project/:project_id/task/:task_id/open', 'taskstatus', 'open');
-
- $container['route']->addRoute('project/:project_id/task/:task_id/duplicate', 'taskduplication', 'duplicate');
- $container['route']->addRoute('project/:project_id/task/:task_id/copy', 'taskduplication', 'copy');
- $container['route']->addRoute('project/:project_id/task/:task_id/copy/:dst_project_id', 'taskduplication', 'copy');
- $container['route']->addRoute('project/:project_id/task/:task_id/move', 'taskduplication', 'move');
- $container['route']->addRoute('project/:project_id/task/:task_id/move/:dst_project_id', 'taskduplication', 'move');
+ $container['route']->addRoute('project/:project_id/task/:task_id/internal/links', 'tasklink', 'show');
+ $container['route']->addRoute('project/:project_id/task/:task_id/external/links', 'TaskExternalLink', 'show');
// Exports
$container['route']->addRoute('export/tasks/:project_id', 'export', 'tasks');
diff --git a/app/Template/analytic/layout.php b/app/Template/analytic/layout.php
index 4f22db10..f1dba552 100644
--- a/app/Template/analytic/layout.php
+++ b/app/Template/analytic/layout.php
@@ -31,8 +31,7 @@
</li>
</ul>
</div>
- <section class="sidebar-container" id="analytic-section">
-
+ <section class="sidebar-container">
<?= $this->render($sidebar_template, array('project' => $project)) ?>
<div class="sidebar-content">
diff --git a/app/Template/analytic/sidebar.php b/app/Template/analytic/sidebar.php
index e809863a..76289b9f 100644
--- a/app/Template/analytic/sidebar.php
+++ b/app/Template/analytic/sidebar.php
@@ -26,6 +26,4 @@
<?= $this->hook->render('template:analytic:sidebar', array('project' => $project)) ?>
</ul>
- <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>
diff --git a/app/Template/app/sidebar.php b/app/Template/app/sidebar.php
index b5e14aaf..3f0d988b 100644
--- a/app/Template/app/sidebar.php
+++ b/app/Template/app/sidebar.php
@@ -24,6 +24,4 @@
</li>
<?= $this->hook->render('template:dashboard:sidebar') ?>
</ul>
- <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> \ No newline at end of file
diff --git a/app/Template/app/subtasks.php b/app/Template/app/subtasks.php
index b4c87bab..f72f21fb 100644
--- a/app/Template/app/subtasks.php
+++ b/app/Template/app/subtasks.php
@@ -24,7 +24,7 @@
<?= $this->url->link($this->e($subtask['task_name']), 'task', 'show', array('task_id' => $subtask['task_id'], 'project_id' => $subtask['project_id'])) ?>
</td>
<td>
- <?= $this->subtask->toggleStatus($subtask, 'dashboard') ?>
+ <?= $this->subtask->toggleStatus($subtask, $subtask['project_id']) ?>
</td>
<td>
<?php if (! empty($subtask['time_spent'])): ?>
diff --git a/app/Template/board/tooltip_subtasks.php b/app/Template/board/tooltip_subtasks.php
index 5e48fcf4..65b7ce4d 100644
--- a/app/Template/board/tooltip_subtasks.php
+++ b/app/Template/board/tooltip_subtasks.php
@@ -1,7 +1,12 @@
-<section id="tooltip-subtasks">
+<table class="table-stripped">
<?php foreach ($subtasks as $subtask): ?>
- <?= $this->subtask->toggleStatus($subtask, 'board', $task['project_id']) ?>
- <?= $this->e(empty($subtask['username']) ? '' : ' ['.$this->user->getFullname($subtask).']') ?>
- <br>
+ <tr>
+ <td class="column-80">
+ <?= $this->subtask->toggleStatus($subtask, $task['project_id']) ?>
+ </td>
+ <td>
+ <?= $this->e($subtask['username'] ?: $this->user->getFullname($subtask)) ?>
+ </td>
+ </tr>
<?php endforeach ?>
-</section>
+</table>
diff --git a/app/Template/comment/edit.php b/app/Template/comment/edit.php
index e01f3da4..6db952cc 100644
--- a/app/Template/comment/edit.php
+++ b/app/Template/comment/edit.php
@@ -2,7 +2,7 @@
<h2><?= t('Edit a comment') ?></h2>
</div>
-<form method="post" action="<?= $this->url->href('comment', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>" autocomplete="off">
+<form class="popover-form" method="post" action="<?= $this->url->href('comment', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->hidden('id', $values) ?>
@@ -29,8 +29,8 @@
<div class="form-help"><?= $this->url->doc(t('Write your text in Markdown'), 'syntax-guide') ?></div>
<div class="form-actions">
- <input type="submit" value="<?= t('Update') ?>" class="btn btn-blue"/>
+ <input type="submit" value="<?= t('Update') ?>" class="btn btn-blue">
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
</div>
</form>
diff --git a/app/Template/comment/remove.php b/app/Template/comment/remove.php
index afc3346f..1b5004f4 100644
--- a/app/Template/comment/remove.php
+++ b/app/Template/comment/remove.php
@@ -12,6 +12,6 @@
<div class="form-actions">
<?= $this->url->link(t('Yes'), 'comment', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/comment/show.php b/app/Template/comment/show.php
index 44457653..26b300e8 100644
--- a/app/Template/comment/show.php
+++ b/app/Template/comment/show.php
@@ -18,10 +18,10 @@
<li><a href="#comment-<?= $comment['id'] ?>"><?= t('link') ?></a></li>
<?php if ($editable && ($this->user->isAdmin() || $this->user->isCurrentUser($comment['user_id']))): ?>
<li>
- <?= $this->url->link(t('remove'), 'comment', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>
+ <?= $this->url->link(t('remove'), 'comment', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), false, 'popover') ?>
</li>
<li>
- <?= $this->url->link(t('edit'), 'comment', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>
+ <?= $this->url->link(t('edit'), 'comment', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), false, 'popover') ?>
</li>
<?php endif ?>
</ul>
diff --git a/app/Template/config/sidebar.php b/app/Template/config/sidebar.php
index 1b42bcc1..dd51bc74 100644
--- a/app/Template/config/sidebar.php
+++ b/app/Template/config/sidebar.php
@@ -36,6 +36,4 @@
</li>
<?= $this->hook->render('template:config:sidebar') ?>
</ul>
- <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> \ No newline at end of file
diff --git a/app/Template/export/sidebar.php b/app/Template/export/sidebar.php
index 44448520..6a1de7e9 100644
--- a/app/Template/export/sidebar.php
+++ b/app/Template/export/sidebar.php
@@ -15,6 +15,4 @@
</li>
<?= $this->hook->render('template:export:sidebar') ?>
</ul>
- <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> \ No newline at end of file
diff --git a/app/Template/file/new.php b/app/Template/file/new.php
index a1a59eae..1702638d 100644
--- a/app/Template/file/new.php
+++ b/app/Template/file/new.php
@@ -7,8 +7,8 @@
<input type="file" name="files[]" multiple />
<div class="form-help"><?= t('Maximum size: ') ?><?= is_integer($max_size) ? $this->text->bytes($max_size) : $max_size ?></div>
<div class="form-actions">
- <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue">
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
</div>
</form> \ No newline at end of file
diff --git a/app/Template/project/sidebar.php b/app/Template/project/sidebar.php
index 2f2ce3ce..304b4aee 100644
--- a/app/Template/project/sidebar.php
+++ b/app/Template/project/sidebar.php
@@ -63,6 +63,4 @@
<?= $this->hook->render('template:project:sidebar', array('project' => $project)) ?>
</ul>
- <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>
diff --git a/app/Template/subtask/icons.php b/app/Template/subtask/icons.php
deleted file mode 100644
index 1f31d51f..00000000
--- a/app/Template/subtask/icons.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php if ($subtask['status'] == 0): ?>
- <i class="fa fa-square-o fa-fw"></i>
-<?php elseif ($subtask['status'] == 1): ?>
- <i class="fa fa-gears fa-fw"></i>
-<?php else: ?>
- <i class="fa fa-check-square-o fa-fw"></i>
-<?php endif ?> \ No newline at end of file
diff --git a/app/Template/subtask/menu.php b/app/Template/subtask/menu.php
new file mode 100644
index 00000000..878ad68c
--- /dev/null
+++ b/app/Template/subtask/menu.php
@@ -0,0 +1,21 @@
+<div class="dropdown">
+ <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog fa-fw"></i><i class="fa fa-caret-down"></i></a>
+ <ul>
+ <?php if ($subtask['position'] != $first_position): ?>
+ <li>
+ <?= $this->url->link(t('Move Up'), 'subtask', 'movePosition', array('project_id' => $task['id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'direction' => 'up'), true) ?>
+ </li>
+ <?php endif ?>
+ <?php if ($subtask['position'] != $last_position): ?>
+ <li>
+ <?= $this->url->link(t('Move Down'), 'subtask', 'movePosition', array('project_id' => $task['id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'direction' => 'down'), true) ?>
+ </li>
+ <?php endif ?>
+ <li>
+ <?= $this->url->link(t('Edit'), 'subtask', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), false, 'popover') ?>
+ </li>
+ <li>
+ <?= $this->url->link(t('Remove'), 'subtask', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), false, 'popover') ?>
+ </li>
+ </ul>
+</div>
diff --git a/app/Template/subtask/show.php b/app/Template/subtask/show.php
index 027e9495..b0326c48 100644
--- a/app/Template/subtask/show.php
+++ b/app/Template/subtask/show.php
@@ -2,93 +2,9 @@
<h2><?= t('Sub-Tasks') ?></h2>
</div>
-<div id="subtasks" class="task-show-section">
+<div id="subtasks">
- <?php if (! empty($subtasks)): ?>
-
- <?php $first_position = $subtasks[0]['position']; ?>
- <?php $last_position = $subtasks[count($subtasks) - 1]['position']; ?>
- <table class="subtasks-table">
- <tr>
- <th class="column-40"><?= t('Title') ?></th>
- <th><?= t('Assignee') ?></th>
- <th><?= t('Time tracking') ?></th>
- <?php if ($editable): ?>
- <th class="column-5"></th>
- <?php endif ?>
- </tr>
- <?php foreach ($subtasks as $subtask): ?>
- <tr>
- <td>
- <?php if ($editable): ?>
- <?= $this->subtask->toggleStatus($subtask, $redirect) ?>
- <?php else: ?>
- <?= $this->render('subtask/icons', array('subtask' => $subtask)) . $this->e($subtask['title']) ?>
- <?php endif ?>
- </td>
- <td>
- <?php if (! empty($subtask['username'])): ?>
- <?php if ($editable): ?>
- <?= $this->url->link($this->e($subtask['name'] ?: $subtask['username']), 'user', 'show', array('user_id' => $subtask['user_id'])) ?>
- <?php else: ?>
- <?= $this->e($subtask['name'] ?: $subtask['username']) ?>
- <?php endif ?>
- <?php endif ?>
- </td>
- <td>
- <ul class="no-bullet">
- <li>
- <?php if (! empty($subtask['time_spent'])): ?>
- <strong><?= $this->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?>
- <?php endif ?>
-
- <?php if (! empty($subtask['time_estimated'])): ?>
- <strong><?= $this->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
- <?php endif ?>
- </li>
- <?php if ($editable && $subtask['user_id'] == $this->user->getId()): ?>
- <li>
- <?php if ($subtask['is_timer_started']): ?>
- <i class="fa fa-pause"></i>
- <?= $this->url->link(t('Stop timer'), 'timer', 'subtask', array('timer' => 'stop', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'])) ?>
- (<?= $this->dt->age($subtask['timer_start_date']) ?>)
- <?php else: ?>
- <i class="fa fa-play-circle-o"></i>
- <?= $this->url->link(t('Start timer'), 'timer', 'subtask', array('timer' => 'start', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'])) ?>
- <?php endif ?>
- </li>
- <?php endif ?>
- </ul>
- </td>
- <?php if ($editable): ?>
- <td>
- <div class="dropdown">
- <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog fa-fw"></i><i class="fa fa-caret-down"></i></a>
- <ul>
- <?php if ($subtask['position'] != $first_position): ?>
- <li>
- <?= $this->url->link(t('Move Up'), 'subtask', 'movePosition', array('project_id' => $project['id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'direction' => 'up', 'redirect' => $redirect), true) ?>
- </li>
- <?php endif ?>
- <?php if ($subtask['position'] != $last_position): ?>
- <li>
- <?= $this->url->link(t('Move Down'), 'subtask', 'movePosition', array('project_id' => $project['id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'direction' => 'down', 'redirect' => $redirect), true) ?>
- </li>
- <?php endif ?>
- <li>
- <?= $this->url->link(t('Edit'), 'subtask', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), false, 'popover') ?>
- </li>
- <li>
- <?= $this->url->link(t('Remove'), 'subtask', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), false, 'popover') ?>
- </li>
- </ul>
- </div>
- </td>
- <?php endif ?>
- </tr>
- <?php endforeach ?>
- </table>
- <?php endif ?>
+ <?= $this->render('subtask/table', array('subtasks' => $subtasks, 'task' => $task, 'editable' => $editable)) ?>
<?php if ($editable && $this->user->hasProjectAccess('subtask', 'save', $task['project_id'])): ?>
<form method="post" action="<?= $this->url->href('subtask', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
diff --git a/app/Template/subtask/table.php b/app/Template/subtask/table.php
new file mode 100644
index 00000000..13f7ada6
--- /dev/null
+++ b/app/Template/subtask/table.php
@@ -0,0 +1,69 @@
+<?php if (! empty($subtasks)): ?>
+
+ <?php $first_position = $subtasks[0]['position']; ?>
+ <?php $last_position = $subtasks[count($subtasks) - 1]['position']; ?>
+
+ <table class="subtasks-table">
+ <tr>
+ <th class="column-40"><?= t('Title') ?></th>
+ <th><?= t('Assignee') ?></th>
+ <th><?= t('Time tracking') ?></th>
+ <?php if ($editable): ?>
+ <th class="column-5"></th>
+ <?php endif ?>
+ </tr>
+ <?php foreach ($subtasks as $subtask): ?>
+ <tr>
+ <td>
+ <?php if ($editable): ?>
+ <?= $this->subtask->toggleStatus($subtask, $task['project_id']) ?>
+ <?php else: ?>
+ <?= $this->subtask->getTitle($subtask) ?>
+ <?php endif ?>
+ </td>
+ <td>
+ <?php if (! empty($subtask['username'])): ?>
+ <?= $this->e($subtask['name'] ?: $subtask['username']) ?>
+ <?php endif ?>
+ </td>
+ <td>
+ <ul class="no-bullet">
+ <li>
+ <?php if (! empty($subtask['time_spent'])): ?>
+ <strong><?= $this->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?>
+ <?php endif ?>
+
+ <?php if (! empty($subtask['time_estimated'])): ?>
+ <strong><?= $this->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
+ <?php endif ?>
+ </li>
+ <?php if ($editable && $subtask['user_id'] == $this->user->getId()): ?>
+ <li>
+ <?php if ($subtask['is_timer_started']): ?>
+ <i class="fa fa-pause"></i>
+ <?= $this->url->link(t('Stop timer'), 'timer', 'subtask', array('timer' => 'stop', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'])) ?>
+ (<?= $this->dt->age($subtask['timer_start_date']) ?>)
+ <?php else: ?>
+ <i class="fa fa-play-circle-o"></i>
+ <?= $this->url->link(t('Start timer'), 'timer', 'subtask', array('timer' => 'start', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'])) ?>
+ <?php endif ?>
+ </li>
+ <?php endif ?>
+ </ul>
+ </td>
+ <?php if ($editable): ?>
+ <td>
+ <?= $this->render('subtask/menu', array(
+ 'task' => $task,
+ 'subtask' => $subtask,
+ 'first_position' => $first_position,
+ 'last_position' => $last_position,
+ )) ?>
+ </td>
+ <?php endif ?>
+ </tr>
+ <?php endforeach ?>
+ </table>
+<?php else: ?>
+ <p class="alert"><?= t('There is no subtask at the moment.') ?></p>
+<?php endif ?>
diff --git a/app/Template/subtask/restriction_change_status.php b/app/Template/subtask_restriction/popover.php
index 88e91d82..e80d6b6d 100644
--- a/app/Template/subtask/restriction_change_status.php
+++ b/app/Template/subtask_restriction/popover.php
@@ -1,18 +1,16 @@
<div class="page-header">
<h2><?= t('You already have one subtask in progress') ?></h2>
</div>
-
- <form action="<?= $this->url->href('subtask', 'changeRestrictionStatus', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>" method="post">
+<form class="popover-form" action="<?= $this->url->href('SubtaskRestriction', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>" method="post">
<?= $this->form->csrf() ?>
- <?= $this->form->hidden('redirect', array('redirect' => $redirect)) ?>
<p><?= t('Select the new status of the subtask: "%s"', $subtask_inprogress['title']) ?></p>
<?= $this->form->radios('status', $status_list) ?>
<?= $this->form->hidden('id', $subtask_inprogress) ?>
<div class="form-actions">
- <input type="submit" value="<?= t('Save') ?>" class="btn btn-red"/>
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-red">
<?= t('or') ?>
<a href="#" class="close-popover"><?= t('cancel') ?></a>
</div>
diff --git a/app/Template/task/layout.php b/app/Template/task/layout.php
index 09dbb2ea..9cbbfec9 100644
--- a/app/Template/task/layout.php
+++ b/app/Template/task/layout.php
@@ -2,6 +2,9 @@
<div class="page-header">
<ul>
<li>
+ <?= $this->render('task/menu', array('task' => $task)) ?>
+ </li>
+ <li>
<i class="fa fa-th fa-fw"></i>
<?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $task['project_id']), false, '', '', false, $task['swimlane_id'] != 0 ? 'swimlane-'.$task['swimlane_id'] : '') ?>
</li>
@@ -17,7 +20,7 @@
<?php endif ?>
</ul>
</div>
- <section class="sidebar-container" id="task-section">
+ <section class="sidebar-container">
<?= $this->render($sidebar_template, array('task' => $task)) ?>
diff --git a/app/Template/task/menu.php b/app/Template/task/menu.php
new file mode 100644
index 00000000..426cfb3d
--- /dev/null
+++ b/app/Template/task/menu.php
@@ -0,0 +1,72 @@
+<?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?>
+<div class="dropdown">
+ <i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a>
+ <ul>
+ <li>
+ <i class="fa fa-pencil-square-o fa-fw"></i>
+ <?= $this->url->link(t('Edit the task'), 'taskmodification', 'edit', 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('Edit the description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-clock-o fa-fw"></i>
+ <?= $this->url->link(t('Edit recurrence'), 'TaskRecurrence', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-plus fa-fw"></i>
+ <?= $this->url->link(t('Add a sub-task'), 'subtask', '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 internal link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-external-link fa-fw"></i>
+ <?= $this->url->link(t('Add external link'), 'TaskExternalLink', 'find', 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-file fa-fw"></i>
+ <?= $this->url->link(t('Attach a document'), 'file', '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'), 'file', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-files-o fa-fw"></i>
+ <?= $this->url->link(t('Duplicate'), 'taskduplication', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-clipboard fa-fw"></i>
+ <?= $this->url->link(t('Duplicate to another project'), 'taskduplication', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-clone fa-fw"></i>
+ <?= $this->url->link(t('Move to another project'), 'taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <?php if ($task['is_active'] == 1): ?>
+ <i class="fa fa-times fa-fw"></i>
+ <?= $this->url->link(t('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ <?php else: ?>
+ <i class="fa fa-check-square-o fa-fw"></i>
+ <?= $this->url->link(t('Open this task'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ <?php endif ?>
+ </li>
+ <?php if ($this->task->canRemove($task)): ?>
+ <li>
+ <i class="fa fa-trash-o fa-fw"></i>
+ <?= $this->url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <?php endif ?>
+
+ <?= $this->hook->render('template:task:menu:actions') ?>
+ </ul>
+</div>
+<?php endif ?>
diff --git a/app/Template/task/remove.php b/app/Template/task/remove.php
index 2f6edc22..e0d655fe 100644
--- a/app/Template/task/remove.php
+++ b/app/Template/task/remove.php
@@ -10,6 +10,6 @@
<div class="form-actions">
<?= $this->url->link(t('Yes'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/task/show.php b/app/Template/task/show.php
index 246c8f33..e18b47fc 100644
--- a/app/Template/task/show.php
+++ b/app/Template/task/show.php
@@ -18,15 +18,14 @@
'subtasks' => $subtasks,
'project' => $project,
'users_list' => isset($users_list) ? $users_list : array(),
- 'editable' => $this->user->hasProjectAccess('subtask', 'edit', $project['id']),
- 'redirect' => 'task',
+ 'editable' => true,
)) ?>
<?= $this->render('tasklink/show', array(
'task' => $task,
'links' => $links,
'link_label_list' => $link_label_list,
- 'editable' => $this->user->hasProjectAccess('tasklink', 'edit', $project['id']),
+ 'editable' => true,
'is_public' => false,
)) ?>
diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php
index 81cd3434..c60a1810 100644
--- a/app/Template/task/sidebar.php
+++ b/app/Template/task/sidebar.php
@@ -1,5 +1,5 @@
<div class="sidebar">
- <h2><?= t('Information') ?></h2>
+ <h2><?= t('Task #%d', $task['id']) ?></h2>
<ul>
<li <?= $this->app->checkMenuSelection('task', 'show') ?>>
<?= $this->url->link(t('Summary'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
@@ -18,86 +18,16 @@
<?= $this->url->link(t('Time tracking'), 'task', 'timetracking', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
<?php endif ?>
-
- <?= $this->hook->render('template:task:sidebar:information') ?>
- </ul>
-
- <h2><?= t('Sub-Tasks') ?></h2>
- <ul>
<li <?= $this->app->checkMenuSelection('subtask', 'show') ?>>
- <?= $this->url->link(t('View all sub-tasks'), 'subtask', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <?php if ($this->user->hasProjectAccess('subtask', 'create', $task['project_id'])): ?>
- <li <?= $this->app->checkMenuSelection('subtask', 'create') ?>>
- <?= $this->url->link(t('Add a sub-task'), 'subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ <?= $this->url->link(t('Sub-tasks'), 'subtask', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
- <?php endif ?>
- </ul>
-
- <h2><?= t('Links') ?></h2>
- <ul>
<li <?= $this->app->checkMenuSelection('tasklink', 'show') ?>>
- <?= $this->url->link(t('View internal links'), 'tasklink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link(t('Internal links'), 'tasklink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
<li <?= $this->app->checkMenuSelection('TaskExternalLink', 'show') ?>>
- <?= $this->url->link(t('View external links'), 'TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <?php if ($this->user->hasProjectAccess('tasklink', 'create', $task['project_id'])): ?>
- <li <?= $this->app->checkMenuSelection('tasklink', 'create') ?>>
- <?= $this->url->link(t('Add internal link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('TaskExternalLink', 'find') ?>>
- <?= $this->url->link(t('Add external link'), 'TaskExternalLink', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link(t('External links'), 'TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
- <?php endif ?>
- </ul>
- <?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?>
- <h2><?= t('Actions') ?></h2>
- <ul>
- <li <?= $this->app->checkMenuSelection('taskmodification', 'edit') ?>>
- <?= $this->url->link(t('Edit the task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('taskmodification', 'description') ?>>
- <?= $this->url->link(t('Edit the description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('taskmodification', 'recurrence') ?>>
- <?= $this->url->link(t('Edit recurrence'), 'taskmodification', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('comment', 'create') ?>>
- <?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('file', 'create') ?>>
- <?= $this->url->link(t('Attach a document'), 'file', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('file', 'screenshot') ?>>
- <?= $this->url->link(t('Add a screenshot'), 'file', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('taskduplication', 'duplicate') ?>>
- <?= $this->url->link(t('Duplicate'), 'taskduplication', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('taskduplication', 'copy') ?>>
- <?= $this->url->link(t('Duplicate to another project'), 'taskduplication', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('taskduplication', 'move') ?>>
- <?= $this->url->link(t('Move to another project'), 'taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li <?= $this->app->checkMenuSelection('taskstatus') ?>>
- <?php if ($task['is_active'] == 1): ?>
- <?= $this->url->link(t('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- <?php else: ?>
- <?= $this->url->link(t('Open this task'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- <?php endif ?>
- </li>
- <?php if ($this->task->canRemove($task)): ?>
- <li <?= $this->app->checkMenuSelection('task', 'remove') ?>>
- <?= $this->url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <?php endif ?>
-
- <?= $this->hook->render('template:task:sidebar:actions') ?>
+ <?= $this->hook->render('template:task:sidebar:information') ?>
</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>
diff --git a/app/Template/task_duplication/copy.php b/app/Template/task_duplication/copy.php
index 415b8610..fe2c599a 100644
--- a/app/Template/task_duplication/copy.php
+++ b/app/Template/task_duplication/copy.php
@@ -6,7 +6,7 @@
<p class="alert"><?= t('There is no destination project available.') ?></p>
<?php else: ?>
- <form method="post" action="<?= $this->url->href('taskduplication', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
+ <form class="popover-form" method="post" action="<?= $this->url->href('taskduplication', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->hidden('id', $values) ?>
@@ -39,9 +39,9 @@
<p class="form-help"><?= t('Current assignee: %s', ($task['assignee_name'] ?: $task['assignee_username']) ?: e('not assigned')) ?></p>
<div class="form-actions">
- <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue">
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
</div>
</form>
diff --git a/app/Template/task_duplication/duplicate.php b/app/Template/task_duplication/duplicate.php
index 4b50d9ca..376f6b3b 100644
--- a/app/Template/task_duplication/duplicate.php
+++ b/app/Template/task_duplication/duplicate.php
@@ -10,6 +10,6 @@
<div class="form-actions">
<?= $this->url->link(t('Yes'), 'taskduplication', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/task_duplication/move.php b/app/Template/task_duplication/move.php
index d8d1ba05..8ab81f5b 100644
--- a/app/Template/task_duplication/move.php
+++ b/app/Template/task_duplication/move.php
@@ -6,7 +6,7 @@
<p class="alert"><?= t('There is no destination project available.') ?></p>
<?php else: ?>
- <form method="post" action="<?= $this->url->href('taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
+ <form class="popover-form" method="post" action="<?= $this->url->href('taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->hidden('id', $values) ?>
@@ -39,9 +39,9 @@
<p class="form-help"><?= t('Current assignee: %s', ($task['assignee_name'] ?: $task['assignee_username']) ?: e('not assigned')) ?></p>
<div class="form-actions">
- <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue">
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
</div>
</form>
diff --git a/app/Template/task_external_link/remove.php b/app/Template/task_external_link/remove.php
index f55e751c..01535255 100644
--- a/app/Template/task_external_link/remove.php
+++ b/app/Template/task_external_link/remove.php
@@ -10,6 +10,6 @@
<div class="form-actions">
<?= $this->url->link(t('Yes'), 'TaskExternalLink', 'remove', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link(t('cancel'), 'TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/task_external_link/show.php b/app/Template/task_external_link/show.php
index 7e8b1948..2dc3d1dd 100644
--- a/app/Template/task_external_link/show.php
+++ b/app/Template/task_external_link/show.php
@@ -38,8 +38,8 @@
<div class="dropdown">
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog fa-fw"></i><i class="fa fa-caret-down"></i></a>
<ul>
- <li><?= $this->url->link(t('Edit'), 'TaskExternalLink', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?></li>
- <li><?= $this->url->link(t('Remove'), 'TaskExternalLink', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?></li>
+ <li><?= $this->url->link(t('Edit'), 'TaskExternalLink', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
+ <li><?= $this->url->link(t('Remove'), 'TaskExternalLink', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
</ul>
</div>
</td>
diff --git a/app/Template/task_modification/edit_task.php b/app/Template/task_modification/edit_task.php
index fe7fb009..7365648b 100644
--- a/app/Template/task_modification/edit_task.php
+++ b/app/Template/task_modification/edit_task.php
@@ -4,52 +4,28 @@
<form class="popover-form" method="post" action="<?= $this->url->href('taskmodification', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
+ <?= $this->form->hidden('id', $values) ?>
+ <?= $this->form->hidden('project_id', $values) ?>
<div class="form-column">
-
<?= $this->form->label(t('Title'), 'title') ?>
<?= $this->form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"', 'tabindex="1"')) ?>
-
- <?= $this->form->label(t('Description'), 'description') ?>
- <div class="form-tabs">
- <div class="write-area">
- <?= $this->form->textarea(
- 'description',
- $values,
- $errors,
- array(
- 'placeholder="'.t('Leave a description').'"',
- 'tabindex="2"',
- 'data-mention-search-url="'.$this->url->href('UserHelper', 'mention', array('project_id' => $task['project_id'])).'"'
- )
- ) ?>
- </div>
- <div class="preview-area">
- <div class="markdown"></div>
- </div>
- <ul class="form-tabs-nav">
- <li class="form-tab form-tab-selected">
- <i class="fa fa-pencil-square-o fa-fw"></i><a id="markdown-write" href="#"><?= t('Write') ?></a>
- </li>
- <li class="form-tab">
- <a id="markdown-preview" href="#"><i class="fa fa-eye fa-fw"></i><?= t('Preview') ?></a>
- </li>
- </ul>
- </div>
-
- <?= $this->render('task/color_picker', array('colors_list' => $colors_list, 'values' => $values)) ?>
- </div>
-
- <div class="form-column">
- <?= $this->form->hidden('id', $values) ?>
- <?= $this->form->hidden('project_id', $values) ?>
<?= $this->task->selectAssignee($users_list, $values, $errors) ?>
<?= $this->task->selectCategory($categories_list, $values, $errors) ?>
<?= $this->task->selectPriority($project, $values) ?>
<?= $this->task->selectScore($values, $errors) ?>
+ </div>
+
+ <div class="form-column">
+ <?= $this->task->selectTimeEstimated($values, $errors) ?>
+ <?= $this->task->selectTimeSpent($values, $errors) ?>
<?= $this->task->selectDueDate($values, $errors) ?>
</div>
+ <div class="form-clear">
+ <?= $this->render('task/color_picker', array('colors_list' => $colors_list, 'values' => $values)) ?>
+ </div>
+
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue" tabindex="10">
<?= t('or') ?>
diff --git a/app/Template/task_modification/edit_recurrence.php b/app/Template/task_recurrence/edit.php
index dc4faa7a..3c7f2318 100644
--- a/app/Template/task_modification/edit_recurrence.php
+++ b/app/Template/task_recurrence/edit.php
@@ -15,7 +15,7 @@
<?php if ($task['recurrence_status'] != \Kanboard\Model\Task::RECURRING_STATUS_PROCESSED): ?>
- <form method="post" action="<?= $this->url->href('taskmodification', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
+ <form class="popover-form" method="post" action="<?= $this->url->href('TaskRecurrence', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
@@ -38,9 +38,9 @@
<?= $this->form->select('recurrence_basedate', $recurrence_basedate_list, $values, $errors) ?>
<div class="form-actions">
- <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue">
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
</div>
</form>
diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php
index 9f745568..7e367443 100644
--- a/app/Template/user/sidebar.php
+++ b/app/Template/user/sidebar.php
@@ -78,6 +78,4 @@
</li>
<?php endif ?>
</ul>
- <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> \ No newline at end of file