Remove time form on task summary page and move that to task edit form
This commit is contained in:
parent
a683c17fa7
commit
e2181612b9
|
|
@ -22,7 +22,8 @@ New features:
|
|||
|
||||
Improvements:
|
||||
|
||||
* Replace box shadow by larger border width when a task is recently modified
|
||||
* Remove time form on task summary page and move that to task edit form
|
||||
* Replace box shadow by a larger border width when a task is recently modified
|
||||
* Do not refresh the whole page when changing subtask status
|
||||
* Add dropdown menu with inline popup for all task actions
|
||||
* Change sidebar style
|
||||
|
|
|
|||
|
|
@ -22,27 +22,6 @@ class Taskmodification extends Base
|
|||
$this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update time tracking information
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function time()
|
||||
{
|
||||
$task = $this->getTask();
|
||||
$values = $this->request->getValues();
|
||||
|
||||
list($valid, ) = $this->taskValidator->validateTimeModification($values);
|
||||
|
||||
if ($valid && $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'])));
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit description form
|
||||
*
|
||||
|
|
@ -104,6 +83,7 @@ class Taskmodification extends Base
|
|||
}
|
||||
|
||||
$this->dateParser->format($values, array('date_due'));
|
||||
$this->dateParser->format($values, array('date_started'), 'Y-m-d H:i');
|
||||
|
||||
$this->response->html($this->helper->layout->task('task_modification/edit_task', array(
|
||||
'project' => $project,
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ class Task extends Base
|
|||
$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');
|
||||
$html .= $this->helper->form->text('date_started', $values, $errors, $attributes, 'form-datetime');
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@
|
|||
<div class="dropdown">
|
||||
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a>
|
||||
<ul>
|
||||
<?php if (empty($task['date_started'])): ?>
|
||||
<li>
|
||||
<i class="fa fa-play fa-fw"></i>
|
||||
<?= $this->url->link(t('Set automatically the start date'), 'taskmodification', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<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') ?>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,9 @@
|
|||
<?= $this->render('task/details', array(
|
||||
'task' => $task,
|
||||
'project' => $project,
|
||||
'recurrence_trigger_list' => $this->task->recurrenceTriggers(),
|
||||
'recurrence_timeframe_list' => $this->task->recurrenceTimeframes(),
|
||||
'recurrence_basedate_list' => $this->task->recurrenceBasedates(),
|
||||
'editable' => $this->user->hasProjectAccess('taskmodification', 'edit', $project['id']),
|
||||
)) ?>
|
||||
|
||||
<?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('subtask/show', array(
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
<div class="form-column">
|
||||
<?= $this->task->selectTimeEstimated($values, $errors) ?>
|
||||
<?= $this->task->selectTimeSpent($values, $errors) ?>
|
||||
<?= $this->task->selectStartDate($values, $errors) ?>
|
||||
<?= $this->task->selectDueDate($values, $errors) ?>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
<form method="post" action="<?= $this->url->href('taskmodification', '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>', 'taskmodification', '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) ?>
|
||||
|
||||
<?= $this->form->label(t('Start date'), 'date_started') ?>
|
||||
<?= $this->form->text('date_started', $values, array(), array('placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-datetime') ?>
|
||||
|
||||
<?= $this->form->label(t('Time estimated'), 'time_estimated') ?>
|
||||
<?= $this->form->numeric('time_estimated', $values, array(), array('placeholder="'.t('hours').'"')) ?>
|
||||
|
||||
<?= $this->form->label(t('Time spent'), 'time_spent') ?>
|
||||
<?= $this->form->numeric('time_spent', $values, array(), array('placeholder="'.t('hours').'"')) ?>
|
||||
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
</form>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -168,6 +168,10 @@ span.task-board-date-overdue {
|
|||
}
|
||||
|
||||
/* task view */
|
||||
#task-summary {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
#task-summary h2 {
|
||||
color: #666;
|
||||
font-size: 2.5em;
|
||||
|
|
@ -303,15 +307,6 @@ span.task-board-date-overdue {
|
|||
width: auto;
|
||||
}
|
||||
|
||||
.task-show-start-link {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.task-show-start-link:hover,
|
||||
.task-show-start-link:focus {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.flag-milestone {
|
||||
color: green;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue