summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-02-05 19:00:40 -0500
committerFrederic Guillot <fred@kanboard.net>2016-02-05 19:00:40 -0500
commite2181612b984489e479f52f748c3199c693d986c (patch)
treed4da9f131be6d020137e7862f5f1d9fa1f4963ca /app/Template
parenta683c17fa7828fabc1b107265a87b07a91322c8f (diff)
Remove time form on task summary page and move that to task edit form
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/task/menu.php6
-rw-r--r--app/Template/task/show.php7
-rw-r--r--app/Template/task_modification/edit_task.php1
-rw-r--r--app/Template/task_modification/edit_time.php20
4 files changed, 7 insertions, 27 deletions
diff --git a/app/Template/task/menu.php b/app/Template/task/menu.php
index 426cfb3d..20fca22b 100644
--- a/app/Template/task/menu.php
+++ b/app/Template/task/menu.php
@@ -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') ?>
diff --git a/app/Template/task/show.php b/app/Template/task/show.php
index e18b47fc..277c99c0 100644
--- a/app/Template/task/show.php
+++ b/app/Template/task/show.php
@@ -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(
diff --git a/app/Template/task_modification/edit_task.php b/app/Template/task_modification/edit_task.php
index 7365648b..9e98ad5e 100644
--- a/app/Template/task_modification/edit_task.php
+++ b/app/Template/task_modification/edit_task.php
@@ -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>
diff --git a/app/Template/task_modification/edit_time.php b/app/Template/task_modification/edit_time.php
deleted file mode 100644
index 8e7f9b42..00000000
--- a/app/Template/task_modification/edit_time.php
+++ /dev/null
@@ -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> \ No newline at end of file