Add icon to set automatically the start date
This commit is contained in:
parent
58297ca3b1
commit
4807f3e8a0
|
|
@ -619,4 +619,16 @@ class Task extends Base
|
|||
'transitions' => $this->transition->getAllByTask($task['id']),
|
||||
)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set automatically the start date
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function start()
|
||||
{
|
||||
$task = $this->getTask();
|
||||
$this->taskModification->update(array('id' => $task['id'], 'date_started' => time()));
|
||||
$this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
<form method="post" action="<?= $this->url->href('task', 'time', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" class="form-inline task-time-form" autocomplete="off">
|
||||
|
||||
<?php if (empty($values['date_started'])): ?>
|
||||
<?= $this->url->link('<i class="fa fa-play"></i>', 'task', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-show-start-link', t('Set automatically the start date')) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->form->csrf() ?>
|
||||
<?= $this->form->hidden('id', $values) ?>
|
||||
|
||||
|
|
|
|||
|
|
@ -1122,6 +1122,15 @@ span.task-board-date-overdue {
|
|||
.task-show-file-table {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.task-show-start-link {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.task-show-start-link:hover,
|
||||
.task-show-start-link:focus {
|
||||
color: red;
|
||||
}
|
||||
/* comments */
|
||||
.comment {
|
||||
margin-bottom: 20px;
|
||||
|
|
|
|||
|
|
@ -534,6 +534,15 @@ span.task-board-date-overdue {
|
|||
.task-show-file-table {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.task-show-start-link {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.task-show-start-link:hover,
|
||||
.task-show-start-link:focus {
|
||||
color: red;
|
||||
}
|
||||
/* comments */
|
||||
.comment {
|
||||
margin-bottom: 20px;
|
||||
|
|
|
|||
|
|
@ -288,3 +288,12 @@ span.task-board-date-overdue {
|
|||
.task-show-file-table {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.task-show-start-link {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.task-show-start-link:hover,
|
||||
.task-show-start-link:focus {
|
||||
color: red;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue