diff options
-rw-r--r-- | app/Template/subtask/menu.php | 2 | ||||
-rw-r--r-- | app/Template/subtask/table.php | 54 |
2 files changed, 22 insertions, 34 deletions
diff --git a/app/Template/subtask/menu.php b/app/Template/subtask/menu.php index a0743a70..159b030c 100644 --- a/app/Template/subtask/menu.php +++ b/app/Template/subtask/menu.php @@ -1,5 +1,5 @@ <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> + <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></a> <ul> <li> <?= $this->modal->medium('edit', t('Edit'), 'SubtaskController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?> diff --git a/app/Template/subtask/table.php b/app/Template/subtask/table.php index 156e08c1..bfb42e75 100644 --- a/app/Template/subtask/table.php +++ b/app/Template/subtask/table.php @@ -5,13 +5,10 @@ > <thead> <tr> - <th class="column-40"><?= t('Title') ?></th> - <th><?= t('Assignee') ?></th> + <th class="column-45"><?= t('Title') ?></th> + <th class="column-15"><?= t('Assignee') ?></th> <?= $this->hook->render('template:subtask:table:header:before-timetracking') ?> <th><?= t('Time tracking') ?></th> - <?php if ($editable): ?> - <th class="column-5"></th> - <?php endif ?> </tr> </thead> <tbody> @@ -19,7 +16,11 @@ <tr data-subtask-id="<?= $subtask['id'] ?>"> <td> <?php if ($editable): ?> - <i class="fa fa-arrows-alt draggable-row-handle" title="<?= t('Change subtask position') ?>"></i> + <i class="fa fa-arrows-alt draggable-row-handle" title="<?= t('Change subtask position') ?>"></i> + <?= $this->render('subtask/menu', array( + 'task' => $task, + 'subtask' => $subtask, + )) ?> <?= $this->subtask->toggleStatus($subtask, $task['project_id'], true) ?> <?php else: ?> <?= $this->subtask->getTitle($subtask) ?> @@ -32,36 +33,23 @@ </td> <?= $this->hook->render('template:subtask:table:rows', array('subtask' => $subtask)) ?> <td> - <ul class="no-bullet"> - <li> - <?php if (! empty($subtask['time_spent'])): ?> - <strong><?= $this->text->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?> - <?php endif ?> + <?php if (! empty($subtask['time_spent'])): ?> + <strong><?= $this->text->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?> + <?php endif ?> + + <?php if (! empty($subtask['time_estimated'])): ?> + <strong><?= $this->text->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?> + <?php endif ?> - <?php if (! empty($subtask['time_estimated'])): ?> - <strong><?= $this->text->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']): ?> - <?= $this->url->icon('pause', t('Stop timer'), 'SubtaskStatusController', 'timer', array('timer' => 'stop', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id']), false, 'subtask-toggle-timer') ?> - (<?= $this->dt->age($subtask['timer_start_date']) ?>) - <?php else: ?> - <?= $this->url->icon('play-circle-o', t('Start timer'), 'SubtaskStatusController', 'timer', array('timer' => 'start', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id']), false, 'subtask-toggle-timer') ?> - <?php endif ?> - </li> + <?php if ($editable && $subtask['user_id'] == $this->user->getId()): ?> + <?php if ($subtask['is_timer_started']): ?> + <?= $this->url->icon('pause', t('Stop timer'), 'SubtaskStatusController', 'timer', array('timer' => 'stop', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id']), false, 'subtask-toggle-timer') ?> + (<?= $this->dt->age($subtask['timer_start_date']) ?>) + <?php else: ?> + <?= $this->url->icon('play-circle-o', t('Start timer'), 'SubtaskStatusController', 'timer', array('timer' => 'start', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id']), false, 'subtask-toggle-timer') ?> <?php endif ?> - </ul> + <?php endif ?> </td> - <?php if ($editable): ?> - <td> - <?= $this->render('subtask/menu', array( - 'task' => $task, - 'subtask' => $subtask, - )) ?> - </td> - <?php endif ?> </tr> <?php endforeach ?> </tbody> |