看板初始化提交
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<div class="table-list-header">
|
||||
<div class="table-list-header-count">
|
||||
<?php if ($paginator->getTotal() > 1): ?>
|
||||
<?= t('%d tasks', $paginator->getTotal()) ?>
|
||||
<?php else: ?>
|
||||
<?= t('%d task', $paginator->getTotal()) ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php if (isset($show_items_selection)): ?>
|
||||
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'save', $project['id'])): ?>
|
||||
<div class="list-item-links">
|
||||
<a href="#" data-list-item-selection="all"><?= t('Select All') ?></a> / <a href="#" data-list-item-selection="none"><?= t('Unselect All') ?></a>
|
||||
</div>
|
||||
<div class="list-item-actions list-item-action-hidden">
|
||||
-
|
||||
<div class="dropdown">
|
||||
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><strong><?= t('Apply action') ?> <i class="fa fa-caret-down"></i></strong></a>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="<?= $this->url->href('TaskBulkMoveColumnController', 'show', ['project_id' => $project['id']]) ?>" data-list-item-action="modal"><?= t('Move selected tasks to another column or swimlane') ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= $this->url->href('TaskBulkChangePropertyController', 'show', ['project_id' => $project['id']]) ?>" data-list-item-action="modal"><?= t('Edit tasks in bulk') ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<div class="table-list-header-menu">
|
||||
<?php if (isset($project)): ?>
|
||||
<?php if ($this->user->hasSubtaskListActivated()): ?>
|
||||
<?= $this->url->icon('tasks', t('Hide subtasks'), 'TaskListController', 'show', array('project_id' => $project['id'], 'hide_subtasks' => 1, 'csrf_token' => $this->app->getToken()->getReusableCSRFToken())) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->url->icon('tasks', t('Show subtasks'), 'TaskListController', 'show', array('project_id' => $project['id'], 'show_subtasks' => 1, 'csrf_token' => $this->app->getToken()->getReusableCSRFToken())) ?>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->render('task_list/sort_menu', array('paginator' => $paginator)) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?= $this->projectHeader->render($project, 'TaskListController', 'show') ?>
|
||||
|
||||
<?php if ($paginator->isEmpty()): ?>
|
||||
<p class="alert"><?= t('No tasks found.') ?></p>
|
||||
<?php elseif (! $paginator->isEmpty()): ?>
|
||||
<div class="table-list">
|
||||
<?= $this->render('task_list/header', array(
|
||||
'paginator' => $paginator,
|
||||
'project' => $project,
|
||||
'show_items_selection' => true,
|
||||
)) ?>
|
||||
|
||||
<?php foreach ($paginator->getCollection() as $task): ?>
|
||||
<div class="table-list-row color-<?= $task['color_id'] ?>">
|
||||
<?= $this->render('task_list/task_title', array(
|
||||
'task' => $task,
|
||||
'show_items_selection' => true,
|
||||
'redirect' => 'list',
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('task_list/task_details', array(
|
||||
'task' => $task,
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('task_list/task_avatars', array(
|
||||
'task' => $task,
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('task_list/task_icons', array(
|
||||
'task' => $task,
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('task_list/task_subtasks', array(
|
||||
'task' => $task,
|
||||
)) ?>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
<?= $paginator ?>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,41 @@
|
||||
<div class="dropdown">
|
||||
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><strong><?= t('Sort') ?> <i class="fa fa-caret-down"></i></strong></a>
|
||||
<ul>
|
||||
<li>
|
||||
<?= $paginator->order(t('Task ID'), \Kanboard\Model\TaskModel::TABLE.'.id') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Swimlane'), 'swimlane_name') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Column'), 'column_name') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Category'), 'category_name') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Priority'), \Kanboard\Model\TaskModel::TABLE.'.priority') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Position'), \Kanboard\Model\TaskModel::TABLE.'.position') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Title'), \Kanboard\Model\TaskModel::TABLE.'.title') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Assignee'), 'assignee_name') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Due date'), \Kanboard\Model\TaskModel::TABLE.'.date_due') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Start date'), \Kanboard\Model\TaskModel::TABLE.'.date_started') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Status'), \Kanboard\Model\TaskModel::TABLE.'.is_active') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Reference'), \Kanboard\Model\TaskModel::TABLE.'.reference') ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php if (! empty($task['owner_id'])): ?>
|
||||
<div class="task-list-avatars">
|
||||
<span
|
||||
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
|
||||
class="task-board-change-assignee"
|
||||
data-url="<?= $this->url->href('TaskModificationController', 'edit', array('task_id' => $task['id'])) ?>">
|
||||
<?php else: ?>
|
||||
class="task-board-assignee">
|
||||
<?php endif ?>
|
||||
<?= $this->avatar->small(
|
||||
$task['owner_id'],
|
||||
$task['assignee_username'],
|
||||
$task['assignee_name'],
|
||||
$task['assignee_email'],
|
||||
$task['assignee_avatar_path'],
|
||||
'avatar-inline'
|
||||
) ?><span class="task-avatar-assignee"><?= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,32 @@
|
||||
<div class="table-list-details">
|
||||
<?= $this->text->e($task['project_name']) ?> >
|
||||
<?= $this->text->e($task['swimlane_name']) ?> >
|
||||
<?= $this->text->e($task['column_name']) ?>
|
||||
|
||||
<?php if (! empty($task['category_id'])): ?>
|
||||
<span class="table-list-category <?= $task['category_color_id'] ? "color-{$task['category_color_id']}" : '' ?>">
|
||||
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
|
||||
<?= $this->url->link(
|
||||
$this->text->e($task['category_name']),
|
||||
'TaskModificationController',
|
||||
'edit',
|
||||
array('task_id' => $task['id']),
|
||||
false,
|
||||
'js-modal-medium' . (! empty($task['category_description']) ? ' tooltip' : ''),
|
||||
t('Change category')
|
||||
) ?>
|
||||
<?php if (! empty($task['category_description'])): ?>
|
||||
<?= $this->app->tooltipMarkdown($task['category_description']) ?>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
<?= $this->text->e($task['category_name']) ?>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php foreach ($task['tags'] as $tag): ?>
|
||||
<span class="table-list-category task-list-tag <?= $tag['color_id'] ? "color-{$tag['color_id']}" : '' ?>">
|
||||
<?= $this->text->e($tag['name']) ?>
|
||||
</span>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
@@ -0,0 +1,103 @@
|
||||
<div class="task-list-icons">
|
||||
<?php if ($task['reference']): ?>
|
||||
<span class="task-board-reference" title="<?= t('Reference') ?>">
|
||||
<span class="ui-helper-hidden-accessible"><?= t('Reference') ?> </span><?= $this->task->renderReference($task) ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($task['is_milestone'] == 1): ?>
|
||||
<span title="<?= t('Milestone') ?>">
|
||||
<i class="fa fa-flag flag-milestone" role="img" aria-label="<?= t('Milestone') ?>"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($task['score']): ?>
|
||||
<span class="task-score" title="<?= t('Complexity') ?>">
|
||||
<i class="fa fa-trophy" role="img" aria-label="<?= t('Complexity') ?>"></i>
|
||||
<?= $this->text->e($task['score']) ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['time_estimated']) || ! empty($task['time_spent'])): ?>
|
||||
<span class="task-time-estimated" title="<?= t('Time spent and estimated') ?>">
|
||||
<span class="ui-helper-hidden-accessible"><?= t('Time spent and estimated') ?> </span><?= $this->text->e($task['time_spent']) ?>/<?= $this->text->e($task['time_estimated']) ?>h
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['date_started'])): ?>
|
||||
<span title="<?= t('Start date') ?>" class="task-date">
|
||||
<i class="fa fa-clock-o" role="img" aria-label="<?= t('Start date') ?>"></i>
|
||||
<?= $this->dt->date($task['date_started']) ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['date_due'])): ?>
|
||||
<span title="<?= t('Due date') ?>" class="task-date
|
||||
<?php if (time() > $task['date_due']): ?>
|
||||
task-date-overdue
|
||||
<?php elseif (date('Y-m-d') == date('Y-m-d', $task['date_due'])): ?>
|
||||
task-date-today
|
||||
<?php endif ?>
|
||||
">
|
||||
<i class="fa fa-calendar" role="img" aria-label="<?= t('Due date') ?>"></i>
|
||||
<?= $this->dt->datetime($task['date_due']) ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PENDING): ?>
|
||||
<?= $this->app->tooltipLink('<i class="fa fa-refresh fa-rotate-90"></i>', $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id']))) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($task['recurrence_status'] == \Kanboard\Model\TaskModel::RECURRING_STATUS_PROCESSED): ?>
|
||||
<?= $this->app->tooltipLink('<i class="fa fa-refresh fa-rotate-90 fa-inverse"></i>', $this->url->href('BoardTooltipController', 'recurrence', array('task_id' => $task['id']))) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['nb_links'])): ?>
|
||||
<?= $this->app->tooltipLink('<i class="fa fa-code-fork fa-fw"></i>'.$task['nb_links'], $this->url->href('BoardTooltipController', 'tasklinks', array('task_id' => $task['id']))) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['nb_external_links'])): ?>
|
||||
<?= $this->app->tooltipLink('<i class="fa fa-external-link fa-fw"></i>'.$task['nb_external_links'], $this->url->href('BoardTooltipController', 'externallinks', array('task_id' => $task['id']))) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['nb_subtasks'])): ?>
|
||||
<?php $nb_subtasks = (int) $task['nb_subtasks']; $nb_completed = (int) $task['nb_completed_subtasks']; $percentage = $nb_subtasks > 0 ? round($nb_completed / $nb_subtasks * 100, 0) : 0; ?>
|
||||
<?= $this->app->tooltipLink('<i class="fa fa-bars fa-fw"></i>'.$percentage.'% ('.$nb_completed.'/'.$nb_subtasks.')', $this->url->href('BoardTooltipController', 'subtasks', array('task_id' => $task['id']))) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['nb_files'])): ?>
|
||||
<?= $this->app->tooltipLink('<i class="fa fa-paperclip fa-fw"></i>'.$task['nb_files'], $this->url->href('BoardTooltipController', 'attachments', array('task_id' => $task['id']))) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($task['nb_comments'] > 0): ?>
|
||||
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
|
||||
<?= $this->modal->medium(
|
||||
'comments-o',
|
||||
$task['nb_comments'],
|
||||
'CommentListController',
|
||||
'show',
|
||||
array('task_id' => $task['id']),
|
||||
$task['nb_comments'] == 1 ? t('%d comment', $task['nb_comments']) : t('%d comments', $task['nb_comments'])
|
||||
) ?>
|
||||
<?php else: ?>
|
||||
<?php $aria_label = $task['nb_comments'] == 1 ? t('%d comment', $task['nb_comments']) : t('%d comments', $task['nb_comments']); ?>
|
||||
<span title="<?= $aria_label ?>" role="img" aria-label="<?= $aria_label ?>"><i class="fa fa-comments-o"></i> <?= $task['nb_comments'] ?></span>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['description'])): ?>
|
||||
<?= $this->app->tooltipLink('<i class="fa fa-file-text-o"></i>', $this->url->href('BoardTooltipController', 'description', array('task_id' => $task['id']))) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<span title="<?= t('Position') ?>">(<span class="ui-helper-hidden-accessible"><?= t('Position') ?> </span><?= $task['position'] ?>)</span>
|
||||
|
||||
<?php if ($task['is_active'] == 1): ?>
|
||||
<div class="task-icon-age">
|
||||
<span title="<?= t('Task age in days')?>" class="task-icon-age-total"><span class="ui-helper-hidden-accessible"><?= t('Task age in days') ?> </span><?= $this->dt->age($task['date_creation']) ?></span>
|
||||
<span title="<?= t('Days in this column')?>" class="task-icon-age-column"><span class="ui-helper-hidden-accessible"><?= t('Days in this column') ?> </span><?= $this->dt->age($task['date_moved']) ?></span>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<span class="task-board-closed"><i class="fa fa-ban fa-fw"></i><?= t('Closed') ?></span>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->task->renderPriority($task['priority']) ?>
|
||||
</div>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php if (! empty($task['subtasks'])): ?>
|
||||
<div class="task-list-subtasks">
|
||||
<?php foreach ($task['subtasks'] as $subtask): ?>
|
||||
<div class="task-list-subtask">
|
||||
<span class="subtask-cell column-50">
|
||||
<?= $this->subtask->renderToggleStatus($task, $subtask, 'rows', isset($user_id) ? $user_id : 0) ?>
|
||||
</span>
|
||||
<span class="subtask-cell column-20 subtask-assignee">
|
||||
<?php if (! empty($subtask['username'])): ?>
|
||||
<?= $this->text->e($subtask['name'] ?: $subtask['username']) ?>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<span class="subtask-cell subtask-time-tracking-cell">
|
||||
<?= $this->render('subtask/timer', array(
|
||||
'task' => $task,
|
||||
'subtask' => $subtask,
|
||||
)) ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,14 @@
|
||||
<div>
|
||||
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
|
||||
<?php if (isset($show_items_selection)): ?>
|
||||
<input type="checkbox" data-list-item="selectable" name="tasks[]" value="<?= $task['id'] ?>">
|
||||
<?php endif ?>
|
||||
<?= $this->render('task/dropdown', array('task' => $task, 'redirect' => isset($redirect) ? $redirect : '')) ?>
|
||||
<?php else: ?>
|
||||
<strong><?= '#'.$task['id'] ?></strong>
|
||||
<?php endif ?>
|
||||
|
||||
<span class="table-list-title <?= $task['is_active'] == 0 ? 'status-closed' : '' ?>">
|
||||
<?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'])) ?>
|
||||
</span>
|
||||
</div>
|
||||
Reference in New Issue
Block a user