看板初始化提交
This commit is contained in:
@@ -0,0 +1,127 @@
|
||||
<!-- column titles -->
|
||||
|
||||
<?= $this->hook->render('template:board:table:column:before-header-row', array('swimlane' => $swimlane)) ?>
|
||||
|
||||
<tr class="board-swimlane-columns-<?= $swimlane['id'] ?>">
|
||||
<?php foreach ($swimlane['columns'] as $column): ?>
|
||||
<th class="board-column-header board-column-header-<?= $column['id'] ?>" data-column-id="<?= $column['id'] ?>">
|
||||
|
||||
<!-- column in collapsed mode -->
|
||||
<div class="board-column-collapsed">
|
||||
<small class="board-column-header-task-count" title="<?= t('Task count') ?>">
|
||||
<span id="task-number-column-<?= $column['id'] ?>"><span class="ui-helper-hidden-accessible"><?= t('Task count') ?> </span><?= $column['nb_tasks'] ?></span>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<!-- column in expanded mode -->
|
||||
<div class="board-column-expanded board-column-expanded-header">
|
||||
<?php if (! $not_editable && $this->projectRole->canCreateTaskInColumn($column['project_id'], $column['id'])): ?>
|
||||
<?= $this->task->getNewBoardTaskButton($swimlane, $column) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<span class="board-column-title">
|
||||
<?php if ($not_editable): ?>
|
||||
<?= $this->text->e($column['title']) ?>
|
||||
<?php else: ?>
|
||||
<span class="dropdown">
|
||||
<a href="#" class="dropdown-menu"><?= $this->text->e($column['title']) ?> <i class="fa fa-caret-down"></i></a>
|
||||
<ul>
|
||||
<li>
|
||||
<i class="fa fa-minus-square fa-fw"></i>
|
||||
<a href="#" class="board-toggle-column-view" data-column-id="<?= $column['id'] ?>"><?= t('Hide this column') ?></a>
|
||||
</li>
|
||||
<?php if ($this->projectRole->canCreateTaskInColumn($column['project_id'], $column['id'])): ?>
|
||||
<li>
|
||||
<?= $this->modal->medium('align-justify', t('Create tasks in bulk'), 'TaskBulkController', 'show', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($column['nb_tasks'] > 0 && $this->projectRole->canChangeTaskStatusInColumn($column['project_id'], $column['id'])): ?>
|
||||
<li>
|
||||
<?= $this->modal->confirm('close', t('Close all tasks in this column and this swimlane'), 'BoardPopoverController', 'confirmCloseColumnTasks', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
<?php if ($column['nb_tasks'] > 0 && $this->user->hasProjectAccess('TaskModificationController', 'update', $column['project_id'])): ?>
|
||||
<span class="dropdown">
|
||||
<a href="#" class="dropdown-menu"><i class="fa fa-sort"></i></i></a>
|
||||
<ul>
|
||||
<li>
|
||||
<?= $this->url->icon('sort-numeric-asc', t('Reorder this column by id (ASC)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'id', 'direction' => 'asc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']], true) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->icon('sort-numeric-desc', t('Reorder this column by id (DESC)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'id', 'direction' => 'desc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']], true) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->icon('sort-numeric-asc', t('Reorder this column by priority (ASC)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'priority', 'direction' => 'asc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']], true) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->icon('sort-numeric-desc', t('Reorder this column by priority (DESC)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'priority', 'direction' => 'desc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']], true) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->icon('sort-amount-asc', t('Reorder this column by assignee and priority (ASC)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'assignee-priority', 'direction' => 'asc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']], true) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->icon('sort-amount-desc', t('Reorder this column by assignee and priority (DESC)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'assignee-priority', 'direction' => 'desc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']], true) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->icon('sort-alpha-asc', t('Reorder this column by assignee (A-Z)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'assignee', 'direction' => 'asc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']], true) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->icon('sort-alpha-desc', t('Reorder this column by assignee (Z-A)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'assignee', 'direction' => 'desc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']], true) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->icon('sort-numeric-asc', t('Reorder this column by due date (ASC)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'due-date', 'direction' => 'asc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']], true) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->icon('sort-numeric-desc', t('Reorder this column by due date (DESC)'), 'TaskReorderController', 'reorderColumn', ['sort' => 'due-date', 'direction' => 'desc', 'project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']], true) ?>
|
||||
</li>
|
||||
</ul>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->hook->render('template:board:column:dropdown', array('swimlane' => $swimlane, 'column' => $column)) ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
|
||||
<span class="pull-right board-column-header-task-count">
|
||||
<?php if (! empty($column['score'])): ?>
|
||||
<span title="<?= t('Score') ?>">
|
||||
<span class="ui-helper-hidden-accessible"><?= t('Score') ?> </span><?= $column['score'] ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($swimlane['nb_swimlanes'] > 1 && ! empty($column['cumulative_score_across_swimlane'])): ?>
|
||||
<span title="<?= t('Total score in this column across all swimlanes') ?>">
|
||||
(<span><span class="ui-helper-hidden-accessible"><?= t('Total score in this column across all swimlanes') ?> </span><?= $column['cumulative_score_across_swimlane'] ?></span>)
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! $not_editable && ! empty($column['description'])): ?>
|
||||
<?= $this->app->tooltipMarkdown($column['description']) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($column['nb_tasks'])): ?>
|
||||
<span title="<?= t('Number of visible tasks in this column and swimlane') ?>">
|
||||
<span><span class="ui-helper-hidden-accessible"><?= t('Task count') ?> </span><?= $column['nb_tasks'] ?></span>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($column['nb_unfiltered_tasks_across_swimlane'])): ?>
|
||||
<span title="<?= t('Total number of tasks in this column across all swimlanes') ?>">
|
||||
<?php if ($column['task_limit'] > 0): ?>
|
||||
(<span><span class="ui-helper-hidden-accessible"><?= t('Total number of tasks in this column across all swimlanes') ?> </span><?= $column['nb_unfiltered_tasks_across_swimlane'] ?></span>/<span title="<?= t('Task limit') ?>"><span class="ui-helper-hidden-accessible"><?= t('Task limit') ?> </span><?= $this->text->e($column['task_limit']) ?></span>)
|
||||
<?php else: ?>
|
||||
(<span><span class="ui-helper-hidden-accessible"><?= t('Total number of tasks in this column across all swimlanes') ?> </span><?= $column['nb_unfiltered_tasks_across_swimlane'] ?></span>)
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?= $this->hook->render('template:board:column:header', array('swimlane' => $swimlane, 'column' => $column)) ?>
|
||||
</div>
|
||||
</th>
|
||||
<?php endforeach ?>
|
||||
</tr>
|
||||
|
||||
<?= $this->hook->render('template:board:table:column:after-header-row', array('swimlane' => $swimlane)) ?>
|
||||
@@ -0,0 +1,20 @@
|
||||
<tr class="board-swimlane-columns-first">
|
||||
<?php foreach ($swimlane['columns'] as $column): ?>
|
||||
<th class="board-column-header board-column-header-first board-column-header-<?= $column['id'] ?>" data-column-id="<?= $column['id'] ?>">
|
||||
|
||||
<!-- column in collapsed mode -->
|
||||
<div class="board-column-collapsed">
|
||||
</div>
|
||||
|
||||
<!-- column in expanded mode -->
|
||||
<div class="board-column-expanded board-column-expanded-header">
|
||||
<span class="board-column-title">
|
||||
</span>
|
||||
|
||||
<span class="pull-right">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</th>
|
||||
<?php endforeach ?>
|
||||
</tr>
|
||||
@@ -0,0 +1,67 @@
|
||||
<div id="board-container"
|
||||
class="<?= ($project['task_limit'] && array_key_exists('nb_active_tasks', $project) && $project['nb_active_tasks'] > $project['task_limit']) ? 'board-task-list-limit' : '' ?>">
|
||||
<?php if (empty($swimlanes) || empty($swimlanes[0]['nb_columns'])): ?>
|
||||
<p class="alert alert-error"><?= t('There is no column or swimlane activated in your project!') ?></p>
|
||||
<?php else: ?>
|
||||
|
||||
<?php if (isset($not_editable)): ?>
|
||||
<table id="board" class="board-project-<?= $project['id'] ?>">
|
||||
<?php else: ?>
|
||||
<table id="board"
|
||||
class="board-project-<?= $project['id'] ?>"
|
||||
data-project-id="<?= $project['id'] ?>"
|
||||
data-check-interval="<?= $board_private_refresh_interval ?>"
|
||||
data-save-url="<?= $this->url->href('BoardAjaxController', 'save', array('project_id' => $project['id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken())) ?>"
|
||||
data-reload-url="<?= $this->url->href('BoardAjaxController', 'reload', array('project_id' => $project['id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken())) ?>"
|
||||
data-check-url="<?= $this->url->href('BoardAjaxController', 'check', array('project_id' => $project['id'], 'timestamp' => time(), 'csrf_token' => $this->app->getToken()->getReusableCSRFToken())) ?>"
|
||||
data-task-creation-url="<?= $this->url->href('TaskCreationController', 'show', array('project_id' => $project['id'])) ?>"
|
||||
>
|
||||
<?php endif ?>
|
||||
|
||||
<?php foreach ($swimlanes as $index => $swimlane): ?>
|
||||
<?php if (! ($swimlane['nb_tasks'] === 0 && isset($not_editable))): ?>
|
||||
|
||||
<?php if ($index === 0 && $swimlane['nb_swimlanes'] > 1): ?>
|
||||
<!-- Render empty columns to setup the "grid" for collapsing columns (Only once and only if more than 1 swimlane in project) -->
|
||||
<?= $this->render('board/table_column_first', array(
|
||||
'swimlane' => $swimlane,
|
||||
'not_editable' => isset($not_editable),
|
||||
)) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($index === 0 && $swimlane['nb_swimlanes'] > 1): ?>
|
||||
<!-- Only show first swimlane-header if project more than 1 swimlanes -->
|
||||
<?= $this->render('board/table_swimlane', array(
|
||||
'project' => $project,
|
||||
'swimlane' => $swimlane,
|
||||
'not_editable' => isset($not_editable),
|
||||
)) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($index > 0 && $swimlane['nb_swimlanes'] > 1): ?>
|
||||
<?= $this->render('board/table_swimlane', array(
|
||||
'project' => $project,
|
||||
'swimlane' => $swimlane,
|
||||
'not_editable' => isset($not_editable),
|
||||
)) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->render('board/table_column', array(
|
||||
'swimlane' => $swimlane,
|
||||
'not_editable' => isset($not_editable),
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('board/table_tasks', array(
|
||||
'project' => $project,
|
||||
'swimlane' => $swimlane,
|
||||
'not_editable' => isset($not_editable),
|
||||
'board_highlight_period' => $board_highlight_period,
|
||||
)) ?>
|
||||
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php endif ?>
|
||||
</div>
|
||||
@@ -0,0 +1,25 @@
|
||||
<!-- swimlane -->
|
||||
<tr id="swimlane-<?= $swimlane['id'] ?>">
|
||||
<th class="board-swimlane-header" colspan="<?= $swimlane['nb_columns'] ?>">
|
||||
<?php if (! $not_editable): ?>
|
||||
<a href="#" class="board-swimlane-toggle" data-swimlane-id="<?= $swimlane['id'] ?>">
|
||||
<i class="fa fa-chevron-circle-up hide-icon-swimlane-<?= $swimlane['id'] ?>" title="<?= t('Collapse swimlane') ?>" role="button" aria-label="<?= t('Collapse swimlane') ?>"></i>
|
||||
<i class="fa fa-chevron-circle-down show-icon-swimlane-<?= $swimlane['id'] ?>" title="<?= t('Expand swimlane') ?>" role="button" aria-label="<?= t('Expand swimlane') ?>" style="display: none"></i>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->text->e($swimlane['name']) ?>
|
||||
|
||||
<?php if (! $not_editable && ! empty($swimlane['description'])): ?>
|
||||
<?= $this->app->tooltipLink('<i class="fa fa-info-circle"></i>', $this->url->href('BoardTooltipController', 'swimlane', array('swimlane_id' => $swimlane['id'], 'project_id' => $project['id']))) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<span title="<?= t('Number of tasks in this swimlane') ?>" class="board-column-header-task-count swimlane-task-count-<?= $swimlane['id'] ?>">
|
||||
<?php if ($swimlane['task_limit']): ?>
|
||||
(<span><span class="ui-helper-hidden-accessible"><?= t('Number of tasks in this swimlane') ?> </span><?= $swimlane['nb_tasks'] ?>/<?= $swimlane['task_limit'] ?>)
|
||||
<?php else: ?>
|
||||
(<span><span class="ui-helper-hidden-accessible"><?= t('Number of tasks in this swimlane') ?> </span><?= $swimlane['nb_tasks'] ?>)
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
@@ -0,0 +1,40 @@
|
||||
<!-- task row -->
|
||||
<tr class="board-swimlane board-swimlane-tasks-<?= $swimlane['id'] ?><?= $swimlane['task_limit'] && $swimlane['nb_tasks'] > $swimlane['task_limit'] ? ' board-task-list-limit' : '' ?>">
|
||||
<?php foreach ($swimlane['columns'] as $column): ?>
|
||||
<td class="
|
||||
board-column-<?= $column['id'] ?>
|
||||
<?= $column['task_limit'] > 0 && $column['column_nb_open_tasks'] > $column['task_limit'] ? 'board-task-list-limit' : '' ?>
|
||||
"
|
||||
>
|
||||
|
||||
<!-- tasks list -->
|
||||
<div
|
||||
class="board-task-list board-column-expanded <?= $this->projectRole->isSortableColumn($column['project_id'], $column['id']) ? 'sortable-column' : '' ?>"
|
||||
data-column-id="<?= $column['id'] ?>"
|
||||
data-swimlane-id="<?= $swimlane['id'] ?>"
|
||||
data-task-limit="<?= $column['task_limit'] ?>">
|
||||
|
||||
<?php foreach ($column['tasks'] as $task): ?>
|
||||
<?= $this->render($not_editable ? 'board/task_public' : 'board/task_private', array(
|
||||
'project' => $project,
|
||||
'task' => $task,
|
||||
'board_highlight_period' => $board_highlight_period,
|
||||
'not_editable' => $not_editable,
|
||||
)) ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
<!-- column in collapsed mode (rotated text) -->
|
||||
<div class="board-column-collapsed board-task-list sortable-column"
|
||||
data-column-id="<?= $column['id'] ?>"
|
||||
data-swimlane-id="<?= $swimlane['id'] ?>"
|
||||
data-task-limit="<?= $column['task_limit'] ?>">
|
||||
<div class="board-rotation-wrapper">
|
||||
<div class="board-column-title board-rotation board-toggle-column-view" data-column-id="<?= $column['id'] ?>" title="<?= $this->text->e($column['title']) ?>">
|
||||
<i class="fa fa-plus-square" title="<?= t('Show this column') ?>" role="button" aria-label="<?= t('Show this column') ?>"></i> <?= $this->text->e($column['title']) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<?php endforeach ?>
|
||||
</tr>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php if (! empty($task['owner_id'])): ?>
|
||||
<div class="task-board-avatars">
|
||||
<span
|
||||
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
|
||||
class="task-board-assignee 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>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
@@ -0,0 +1,141 @@
|
||||
<?php if (! empty($task['category_id'])): ?>
|
||||
<div class="task-board-category-container task-board-category-container-color">
|
||||
<span class="task-board-category category-<?= $this->text->e($task['category_name']) ?> <?= $task['category_color_id'] ? "color-{$task['category_color_id']}" : '' ?>">
|
||||
<?php if ($not_editable): ?>
|
||||
<?= $this->text->e($task['category_name']) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->url->link(
|
||||
$this->text->e($task['category_name']),
|
||||
'TaskModificationController',
|
||||
'edit',
|
||||
array('task_id' => $task['id']),
|
||||
false,
|
||||
'js-modal-large' . (! empty($task['category_description']) ? ' tooltip' : ''),
|
||||
t('Change category')
|
||||
) ?>
|
||||
<?php if (! empty($task['category_description'])): ?>
|
||||
<?= $this->app->tooltipMarkdown($task['category_description']) ?>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['tags'])): ?>
|
||||
<div class="task-tags">
|
||||
<ul>
|
||||
<?php foreach ($task['tags'] as $tag): ?>
|
||||
<li class="task-tag <?= $tag['color_id'] ? "color-{$tag['color_id']}" : '' ?>"><?= $this->text->e($tag['name']) ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="task-board-icons">
|
||||
<div class="task-board-icons-row">
|
||||
<?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 ?>
|
||||
</div>
|
||||
<div class="task-board-icons-row">
|
||||
<?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_due'])): ?>
|
||||
<span 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"></i>
|
||||
<?php if (date('Hi', $task['date_due']) === '0000' ): ?>
|
||||
<?= $this->dt->date($task['date_due']) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->dt->datetime($task['date_due']) ?>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<div class="task-board-icons-row">
|
||||
|
||||
<?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 ($not_editable): ?>
|
||||
<?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 else: ?>
|
||||
<?= $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 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 ?>
|
||||
|
||||
<?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']) ?>
|
||||
|
||||
<?= $this->hook->render('template:board:task:icons', array('task' => $task)) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->hook->render('template:board:task:footer', array('task' => $task)) ?>
|
||||
@@ -0,0 +1,71 @@
|
||||
<div class="
|
||||
task-board
|
||||
<?= $task['is_draggable'] ? 'draggable-item ' : '' ?>
|
||||
<?= $task['is_active'] == 1 ? 'task-board-status-open '.($task['date_modification'] > (time() - $board_highlight_period) ? 'task-board-recent' : '') : 'task-board-status-closed' ?>
|
||||
color-<?= $task['color_id'] ?>"
|
||||
data-task-id="<?= $task['id'] ?>"
|
||||
data-column-id="<?= $task['column_id'] ?>"
|
||||
data-swimlane-id="<?= $task['swimlane_id'] ?>"
|
||||
data-position="<?= $task['position'] ?>"
|
||||
data-owner-id="<?= $task['owner_id'] ?>"
|
||||
data-category-id="<?= $task['category_id'] ?>"
|
||||
data-due-date="<?= $task['date_due'] ?>"
|
||||
data-task-url="<?= $this->url->href('TaskViewController', 'show', array('task_id' => $task['id'])) ?>">
|
||||
|
||||
<div class="task-board-sort-handle" style="display: none;"><i class="fa fa-arrows-alt"></i></div>
|
||||
|
||||
<?php if ($this->board->isCollapsed($task['project_id'])): ?>
|
||||
<div class="task-board-collapsed">
|
||||
<div class="task-board-saving-icon" style="display: none;"><i class="fa fa-spinner fa-pulse"></i></div>
|
||||
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
|
||||
<?= $this->render('task/dropdown', array('task' => $task, 'redirect' => 'board')) ?>
|
||||
<?php if ($this->projectRole->canUpdateTask($task)): ?>
|
||||
<?= $this->modal->large('edit', '', 'TaskModificationController', 'edit', array('task_id' => $task['id'])) ?>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
<strong><?= '#'.$task['id'] ?></strong>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['assignee_username'])): ?>
|
||||
<span title="<?= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?>">
|
||||
<?= $this->text->e($this->user->getInitials($task['assignee_name'] ?: $task['assignee_username'])) ?>
|
||||
</span> -
|
||||
<?php endif ?>
|
||||
<?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id']), false, '', $this->text->e($task['title'])) ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="task-board-expanded">
|
||||
<div class="task-board-saving-icon" style="display: none;"><i class="fa fa-spinner fa-pulse fa-2x"></i></div>
|
||||
<div class="task-board-header">
|
||||
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
|
||||
<?= $this->render('task/dropdown', array('task' => $task, 'redirect' => 'board')) ?>
|
||||
<?php if ($this->projectRole->canUpdateTask($task)): ?>
|
||||
<?= $this->modal->large('edit', '', 'TaskModificationController', 'edit', array('task_id' => $task['id'])) ?>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
<strong><?= '#'.$task['id'] ?></strong>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($task['owner_id'])): ?>
|
||||
<span class="task-board-assignee">
|
||||
<?= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->render('board/task_avatar', array('task' => $task)) ?>
|
||||
</div>
|
||||
|
||||
<?= $this->hook->render('template:board:private:task:before-title', array('task' => $task)) ?>
|
||||
<div class="task-board-title">
|
||||
<?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'])) ?>
|
||||
</div>
|
||||
<?= $this->hook->render('template:board:private:task:after-title', array('task' => $task)) ?>
|
||||
|
||||
<?= $this->render('board/task_footer', array(
|
||||
'task' => $task,
|
||||
'not_editable' => $not_editable,
|
||||
'project' => $project,
|
||||
)) ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
@@ -0,0 +1,25 @@
|
||||
<div class="task-board color-<?= $task['color_id'] ?> <?= $task['date_modification'] > time() - $board_highlight_period ? 'task-board-recent' : '' ?>">
|
||||
<div class="task-board-header">
|
||||
<?= $this->url->link('#'.$task['id'], 'TaskViewController', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
|
||||
|
||||
<?php if (! empty($task['owner_id'])): ?>
|
||||
<span class="task-board-assignee">
|
||||
<?= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->render('board/task_avatar', array('task' => $task)) ?>
|
||||
</div>
|
||||
|
||||
<?= $this->hook->render('template:board:public:task:before-title', array('task' => $task)) ?>
|
||||
<div class="task-board-title">
|
||||
<?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
|
||||
</div>
|
||||
<?= $this->hook->render('template:board:public:task:after-title', array('task' => $task)) ?>
|
||||
|
||||
<?= $this->render('board/task_footer', array(
|
||||
'task' => $task,
|
||||
'not_editable' => $not_editable,
|
||||
'project' => $project,
|
||||
)) ?>
|
||||
</div>
|
||||
@@ -0,0 +1,5 @@
|
||||
<section class="tooltip-large">
|
||||
<div class="markdown">
|
||||
<?= $this->text->markdown($task['description']) ?>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,22 @@
|
||||
<div class="tooltip-large">
|
||||
<table class="table-small">
|
||||
<tr>
|
||||
<th class="column-20"><?= t('Type') ?></th>
|
||||
<th class="column-70"><?= t('Title') ?></th>
|
||||
<th class="column-10"><?= t('Dependency') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($links as $link): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?= $link['type'] ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?= $this->text->e($link['url']) ?>" title="<?= $this->text->e($link['url']) ?>" target="_blank"><?= $this->text->e($link['title']) ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->text->e($link['dependency_label']) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
<div class="tooltip-large">
|
||||
<table class="table-small">
|
||||
<?php foreach ($files as $file): ?>
|
||||
<tr>
|
||||
<th>
|
||||
<i class="fa <?= $this->file->icon($file['name']) ?> fa-fw"></i>
|
||||
<?= $this->text->e($file['name']) ?>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'file_id' => $file['id'], 'etag' => $file['etag'])) ?>
|
||||
<?php if ($this->file->getPreviewType($file['name']) !== null || $file['is_image'] == 1): ?>
|
||||
<?= $this->modal->large('eye', t('View file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'file_id' => $file['id'], 'etag' => $file['etag'])) ?>
|
||||
<?= $this->url->icon('external-link', t('View file'), 'FileViewerController', ($file['is_image'] == 1 ? 'image' : 'show'), array('task_id' => $task['id'], 'file_id' => $file['id'], 'etag' => $file['etag']), false, '', '', true) ?>
|
||||
<?php elseif ($this->file->getBrowserViewType($file['name']) !== null): ?>
|
||||
<i class="fa fa-eye fa-fw"></i>
|
||||
<?= $this->url->link(t('View file'), 'FileViewerController', 'browser', array('task_id' => $task['id'], 'file_id' => $file['id']), false, '', '', true) ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
<div class="tooltip-large">
|
||||
<table class="table-small">
|
||||
<tr>
|
||||
<th class="column-70"><?= t('Subtask') ?></th>
|
||||
<?= $this->hook->render('template:board:tooltip:subtasks:header:before-assignee') ?>
|
||||
<th><?= t('Assignee') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($subtasks as $subtask): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?= $this->subtask->renderToggleStatus($task, $subtask) ?>
|
||||
</td>
|
||||
<?= $this->hook->render('template:board:tooltip:subtasks:rows', array('subtask' => $subtask)) ?>
|
||||
<td>
|
||||
<?php if (! empty($subtask['username'])): ?>
|
||||
<?= $this->text->e($subtask['name'] ?: $subtask['username']) ?>
|
||||
<?php else: ?>
|
||||
<?= t('Not assigned') ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,34 @@
|
||||
<div class="tooltip-large">
|
||||
<table class="table-small">
|
||||
<?php foreach ($links as $label => $grouped_links): ?>
|
||||
<tr>
|
||||
<th colspan="4"><?= t($label) ?></th>
|
||||
</tr>
|
||||
<?php foreach ($grouped_links as $link): ?>
|
||||
<tr>
|
||||
<td class="column-10">
|
||||
<?= $this->task->getProgress($link).'%' ?>
|
||||
</td>
|
||||
<td class="column-60">
|
||||
<?= $this->url->link(
|
||||
$this->text->e('#'.$link['task_id'].' '.$link['title']),
|
||||
'TaskViewController', 'show', array('task_id' => $link['task_id']),
|
||||
false,
|
||||
$link['is_active'] ? '' : 'task-link-closed'
|
||||
) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if (! empty($link['task_assignee_username'])): ?>
|
||||
<?= $this->text->e($link['task_assignee_name'] ?: $link['task_assignee_username']) ?>
|
||||
<?php else: ?>
|
||||
<?= t('Not assigned') ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $link['project_name'] ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
<section id="main">
|
||||
|
||||
<?= $this->projectHeader->render($project, 'BoardViewController', 'show', true) ?>
|
||||
|
||||
<?= $this->render('board/table_container', array(
|
||||
'project' => $project,
|
||||
'swimlanes' => $swimlanes,
|
||||
'board_private_refresh_interval' => $board_private_refresh_interval,
|
||||
'board_highlight_period' => $board_highlight_period,
|
||||
)) ?>
|
||||
|
||||
</section>
|
||||
@@ -0,0 +1,11 @@
|
||||
<section id="main" class="public-board">
|
||||
|
||||
<?= $this->render('board/table_container', array(
|
||||
'project' => $project,
|
||||
'swimlanes' => $swimlanes,
|
||||
'board_private_refresh_interval' => $board_private_refresh_interval,
|
||||
'board_highlight_period' => $board_highlight_period,
|
||||
'not_editable' => true,
|
||||
)) ?>
|
||||
|
||||
</section>
|
||||
Reference in New Issue
Block a user