看板初始化提交
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Add a sub-task') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php if (isset($values['subtasks_added']) && $values['subtasks_added'] > 0): ?>
|
||||
<p class="alert alert-success">
|
||||
<?php if ($values['subtasks_added'] == 1): ?>
|
||||
<?= t('Subtask added successfully.') ?>
|
||||
<?php else: ?>
|
||||
<?= t('%d subtasks added successfully.', $values['subtasks_added']) ?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
|
||||
<form method="post" action="<?= $this->url->href('SubtaskController', 'save', array('task_id' => $task['id'])) ?>" autocomplete="off">
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
<?= $this->subtask->renderBulkTitleField($values, $errors, array('autofocus')) ?>
|
||||
<?= $this->subtask->renderAssigneeField($users_list, $values, $errors) ?>
|
||||
<?= $this->subtask->renderTimeEstimatedField($values, $errors) ?>
|
||||
|
||||
<?= $this->hook->render('template:subtask:form:create', array('values' => $values, 'errors' => $errors)) ?>
|
||||
|
||||
<?= $this->form->checkbox('another_subtask', t('Create another sub-task'), 1, isset($values['another_subtask']) && $values['another_subtask'] == 1) ?>
|
||||
|
||||
<?= $this->modal->submitButtons() ?>
|
||||
</form>
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Edit a sub-task') ?></h2>
|
||||
</div>
|
||||
|
||||
<form method="post" action="<?= $this->url->href('SubtaskController', 'update', array('task_id' => $task['id'], 'subtask_id' => $subtask['id'])) ?>" autocomplete="off">
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
<?= $this->subtask->renderTitleField($values, $errors, array('autofocus')) ?>
|
||||
<?= $this->subtask->renderAssigneeField($users_list, $values, $errors) ?>
|
||||
<?= $this->subtask->renderTimeEstimatedField($values, $errors) ?>
|
||||
<?= $this->subtask->renderTimeSpentField($values, $errors) ?>
|
||||
|
||||
<?= $this->hook->render('template:subtask:form:edit', array('values' => $values, 'errors' => $errors)) ?>
|
||||
|
||||
<?= $this->modal->submitButtons() ?>
|
||||
</form>
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="dropdown">
|
||||
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><div class="subtask-submenu"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></div></a>
|
||||
<ul>
|
||||
<li>
|
||||
<?= $this->modal->medium('edit', t('Edit'), 'SubtaskController', 'edit', array('task_id' => $task['id'], 'subtask_id' => $subtask['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->modal->confirm('trash-o', t('Remove'), 'SubtaskController', 'confirm', array('task_id' => $task['id'], 'subtask_id' => $subtask['id'])) ?>
|
||||
</li>
|
||||
<?php if ($this->projectRole->canCreateTaskInColumn($task['project_id'], $task['column_id'])): ?>
|
||||
<li>
|
||||
<?= $this->modal->confirm('clone', t('Convert to task'), 'SubtaskConverterController', 'show', array('task_id' => $task['id'], 'subtask_id' => $subtask['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,20 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Remove a sub-task') ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="confirm">
|
||||
<div class="alert alert-info">
|
||||
<?= t('Do you really want to remove this sub-task?') ?>
|
||||
<ul>
|
||||
<li>
|
||||
<strong><?= $this->text->e($subtask['title']) ?></strong>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?= $this->modal->confirmButtons(
|
||||
'SubtaskController',
|
||||
'remove',
|
||||
array('task_id' => $task['id'], 'subtask_id' => $subtask['id'])
|
||||
) ?>
|
||||
</div>
|
||||
@@ -0,0 +1,10 @@
|
||||
<details class="accordion-section" <?= empty($subtasks) ? '' : 'open' ?>>
|
||||
<summary class="accordion-title"><?= t('Sub-Tasks') ?></summary>
|
||||
<div class="accordion-content">
|
||||
<?= $this->render('subtask/table', array(
|
||||
'subtasks' => $subtasks,
|
||||
'task' => $task,
|
||||
'editable' => $editable
|
||||
)) ?>
|
||||
</div>
|
||||
</details>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php if (! empty($subtasks)): ?>
|
||||
<table
|
||||
class="subtasks-table table-striped table-scrolling"
|
||||
data-save-position-url="<?= $this->url->href('SubtaskController', 'movePosition', array('task_id' => $task['id'])) ?>"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= t('Title') ?></th>
|
||||
<th class="column-10"><?= t('Assignee') ?></th>
|
||||
<?= $this->hook->render('template:subtask:table:header:before-timetracking') ?>
|
||||
<th class="column-30"><?= t('Time tracking') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($subtasks as $subtask): ?>
|
||||
<tr data-subtask-id="<?= $subtask['id'] ?>">
|
||||
<td>
|
||||
<div class="subtask-table-td">
|
||||
<?php if ($editable): ?>
|
||||
<i class="fa fa-arrows-alt draggable-row-handle" title="<?= t('Change subtask position') ?>" role="button" aria-label="<?= t('Change subtask position') ?>"></i>
|
||||
<?= $this->render('subtask/menu', array(
|
||||
'task' => $task,
|
||||
'subtask' => $subtask,
|
||||
)) ?>
|
||||
<?= $this->subtask->renderToggleStatus($task, $subtask, 'table') ?>
|
||||
<?php else: ?>
|
||||
<?= $this->subtask->renderTitle($subtask) ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<?php if (! empty($subtask['username'])): ?>
|
||||
<?= $this->text->e($subtask['name'] ?: $subtask['username']) ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<?= $this->hook->render('template:subtask:table:rows', array('subtask' => $subtask)) ?>
|
||||
<td>
|
||||
<?= $this->render('subtask/timer', array(
|
||||
'task' => $task,
|
||||
'subtask' => $subtask,
|
||||
)) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,15 @@
|
||||
<span class="subtask-time-tracking">
|
||||
<?php if (! empty($subtask['time_spent'])): ?>
|
||||
<?= t('%sh spent', n($subtask['time_spent'])) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($subtask['time_spent']) && ! empty($subtask['time_estimated'])): ?>/<?php endif ?>
|
||||
|
||||
<?php if (! empty($subtask['time_estimated'])): ?>
|
||||
<?= t('%sh estimated', n($subtask['time_estimated'])) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($this->user->hasProjectAccess('SubtaskController', 'edit', $task['project_id']) && $subtask['user_id'] == $this->user->getId()): ?>
|
||||
<?= $this->subtask->renderTimer($task, $subtask) ?>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
Reference in New Issue
Block a user