Repeat column headers for each swimlane
This commit is contained in:
@@ -1,13 +1,12 @@
|
|||||||
<!-- column titles -->
|
<!-- column titles -->
|
||||||
<?php ?>
|
<tr class="board-swimlane-columns-<?= $swimlane['id'] ?>">
|
||||||
<tr>
|
|
||||||
<?php foreach ($swimlane['columns'] as $column): ?>
|
<?php foreach ($swimlane['columns'] as $column): ?>
|
||||||
<th class="board-column-header board-column-header-<?= $column['id'] ?>" data-column-id="<?= $column['id'] ?>">
|
<th class="board-column-header board-column-header-<?= $column['id'] ?>" data-column-id="<?= $column['id'] ?>">
|
||||||
|
|
||||||
<!-- column in collapsed mode -->
|
<!-- column in collapsed mode -->
|
||||||
<div class="board-column-collapsed">
|
<div class="board-column-collapsed">
|
||||||
<span title="<?= t('Task count') ?>" class="board-column-header-task-count" title="<?= t('Show this column') ?>">
|
<span title="<?= t('Task count') ?>" class="board-column-header-task-count" title="<?= t('Show this column') ?>">
|
||||||
<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_column_tasks'] ?></span>
|
<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -19,6 +18,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?php if ($swimlane['nb_swimlanes'] > 1 && ! empty($column['nb_column_tasks'])): ?>
|
||||||
|
<span title="<?= t('Total number of tasks in this column across all swimlanes') ?>" class="board-column-header-task-count">
|
||||||
|
(<span><?= $column['nb_column_tasks'] ?></span>)
|
||||||
|
</span>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
<span class="board-column-title" data-column-id="<?= $column['id'] ?>" title="<?= t('Hide this column') ?>">
|
<span class="board-column-title" data-column-id="<?= $column['id'] ?>" title="<?= t('Hide this column') ?>">
|
||||||
<?= $this->e($column['title']) ?>
|
<?= $this->e($column['title']) ?>
|
||||||
</span>
|
</span>
|
||||||
@@ -31,17 +36,17 @@
|
|||||||
|
|
||||||
<?php if (! empty($column['score'])): ?>
|
<?php if (! empty($column['score'])): ?>
|
||||||
<span class="pull-right" title="<?= t('Score') ?>">
|
<span class="pull-right" title="<?= t('Score') ?>">
|
||||||
<?= $column['total_score'] ?>
|
<?= $column['score'] ?>
|
||||||
</span>
|
</span>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<span title="<?= t('Total number of tasks in this column across all swimlanes') ?>" class="board-column-header-task-count">
|
|
||||||
(<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_column_tasks'] ?></span>)
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<?php if ($column['task_limit']): ?>
|
<?php if ($column['task_limit']): ?>
|
||||||
<span title="<?= t('Task limit') ?>">
|
<span title="<?= t('Task limit') ?>">
|
||||||
(<span id="task-number-column-<?= $column['id'] ?>"><?= $this->e($column['task_limit']) ?></span>)
|
(<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>/<?= $this->e($column['task_limit']) ?>)
|
||||||
|
</span>
|
||||||
|
<?php else: ?>
|
||||||
|
<span title="<?= t('Task count') ?>" class="board-column-header-task-count">
|
||||||
|
(<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>)
|
||||||
</span>
|
</span>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,33 +1,40 @@
|
|||||||
<div id="board-container">
|
<div id="board-container">
|
||||||
<?php if (isset($not_editable)): ?>
|
<?php if (empty($swimlanes) || empty($swimlanes[0]['nb_columns'])): ?>
|
||||||
<table id="board" class="board-project-<?= $project['id'] ?>">
|
<p class="alert alert-error"><?= t('There is no column in your project!') ?></p>
|
||||||
<?php else: ?>
|
<?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('board', 'save', array('project_id' => $project['id'])) ?>"
|
|
||||||
data-reload-url="<?= $this->url->href('board', 'reload', array('project_id' => $project['id'])) ?>"
|
|
||||||
data-check-url="<?= $this->url->href('board', 'check', array('project_id' => $project['id'], 'timestamp' => time())) ?>"
|
|
||||||
data-task-creation-url="<?= $this->url->href('taskcreation', 'create', array('project_id' => $project['id'])) ?>"
|
|
||||||
>
|
|
||||||
<?php endif ?>
|
|
||||||
|
|
||||||
<?php foreach ($swimlanes as $index => $swimlane): ?>
|
<?php if (isset($not_editable)): ?>
|
||||||
<?php if (empty($swimlane['columns'])): ?>
|
<table id="board" class="board-project-<?= $project['id'] ?>">
|
||||||
<p class="alert alert-error"><?= t('There is no column in your project!') ?></p>
|
|
||||||
<?php break ?>
|
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php if ($index === 0): ?>
|
<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('board', 'save', array('project_id' => $project['id'])) ?>"
|
||||||
|
data-reload-url="<?= $this->url->href('board', 'reload', array('project_id' => $project['id'])) ?>"
|
||||||
|
data-check-url="<?= $this->url->href('board', 'check', array('project_id' => $project['id'], 'timestamp' => time())) ?>"
|
||||||
|
data-task-creation-url="<?= $this->url->href('taskcreation', 'create', array('project_id' => $project['id'])) ?>"
|
||||||
|
>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?php foreach ($swimlanes as $index => $swimlane): ?>
|
||||||
|
<?php if (! ($swimlane['nb_tasks'] === 0 && isset($not_editable))): ?>
|
||||||
|
|
||||||
|
<!-- Note: Do not show swimlane row on the top otherwise we can't collapse columns -->
|
||||||
|
<?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(
|
<?= $this->render('board/table_column', array(
|
||||||
'swimlane' => $swimlane,
|
'swimlane' => $swimlane,
|
||||||
'not_editable' => isset($not_editable),
|
'not_editable' => isset($not_editable),
|
||||||
)) ?>
|
)) ?>
|
||||||
<?php endif ?>
|
|
||||||
|
|
||||||
<?php if (! ($swimlane['nb_tasks'] === 0 && isset($not_editable))): ?>
|
<?php if ($index === 0 && $swimlane['nb_swimlanes'] > 1): ?>
|
||||||
|
|
||||||
<?php if ($swimlane['nb_swimlanes'] > 1): ?>
|
|
||||||
<?= $this->render('board/table_swimlane', array(
|
<?= $this->render('board/table_swimlane', array(
|
||||||
'project' => $project,
|
'project' => $project,
|
||||||
'swimlane' => $swimlane,
|
'swimlane' => $swimlane,
|
||||||
@@ -43,8 +50,9 @@
|
|||||||
)) ?>
|
)) ?>
|
||||||
|
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
|
||||||
<?php endif ?>
|
</table>
|
||||||
<?php endforeach ?>
|
|
||||||
</table>
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<!-- task row -->
|
<!-- task row -->
|
||||||
<tr class="board-swimlane swimlane-row-<?= $swimlane['id'] ?>">
|
<tr class="board-swimlane board-swimlane-tasks-<?= $swimlane['id'] ?>">
|
||||||
<?php foreach ($swimlane['columns'] as $column): ?>
|
<?php foreach ($swimlane['columns'] as $column): ?>
|
||||||
<td class="
|
<td class="
|
||||||
board-column-<?= $column['id'] ?>
|
board-column-<?= $column['id'] ?>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
|||||||
/* task inside the board */
|
/* task inside the board */
|
||||||
.task-board {
|
.task-board {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 2px;
|
margin-bottom: 4px;
|
||||||
border: 1px solid #000;
|
border: 1px solid #000;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
font-size: 0.85em;
|
font-size: 0.85em;
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
div.task-board-recent {
|
div.task-board-recent {
|
||||||
box-shadow: 2px 2px 5px rgba(0,0,0,0.25);
|
box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
div.task-board-status-closed {
|
div.task-board-status-closed {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -231,7 +231,7 @@ Board.prototype.toggleCollapsedMode = function() {
|
|||||||
Board.prototype.restoreColumnViewMode = function() {
|
Board.prototype.restoreColumnViewMode = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
$("tr:first th").each(function() {
|
$(".board-column-header").each(function() {
|
||||||
var columnId = $(this).data('column-id');
|
var columnId = $(this).data('column-id');
|
||||||
if (localStorage.getItem("hidden_column_" + columnId)) {
|
if (localStorage.getItem("hidden_column_" + columnId)) {
|
||||||
self.hideColumn(columnId);
|
self.hideColumn(columnId);
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ Swimlane.prototype.expand = function(swimlaneId) {
|
|||||||
|
|
||||||
localStorage.setItem(this.getStorageKey(), JSON.stringify(swimlaneIds));
|
localStorage.setItem(this.getStorageKey(), JSON.stringify(swimlaneIds));
|
||||||
|
|
||||||
$('.swimlane-row-' + swimlaneId).css('display', 'table-row');
|
$('.board-swimlane-columns-' + swimlaneId).css('display', 'table-row');
|
||||||
|
$('.board-swimlane-tasks-' + swimlaneId).css('display', 'table-row');
|
||||||
$('.hide-icon-swimlane-' + swimlaneId).css('display', 'inline');
|
$('.hide-icon-swimlane-' + swimlaneId).css('display', 'inline');
|
||||||
$('.show-icon-swimlane-' + swimlaneId).css('display', 'none');
|
$('.show-icon-swimlane-' + swimlaneId).css('display', 'none');
|
||||||
};
|
};
|
||||||
@@ -28,7 +29,8 @@ Swimlane.prototype.collapse = function(swimlaneId) {
|
|||||||
localStorage.setItem(this.getStorageKey(), JSON.stringify(swimlaneIds));
|
localStorage.setItem(this.getStorageKey(), JSON.stringify(swimlaneIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.swimlane-row-' + swimlaneId).css('display', 'none');
|
$('.board-swimlane-columns-' + swimlaneId + ':not(:first-child)').css('display', 'none');
|
||||||
|
$('.board-swimlane-tasks-' + swimlaneId).css('display', 'none');
|
||||||
$('.hide-icon-swimlane-' + swimlaneId).css('display', 'none');
|
$('.hide-icon-swimlane-' + swimlaneId).css('display', 'none');
|
||||||
$('.show-icon-swimlane-' + swimlaneId).css('display', 'inline');
|
$('.show-icon-swimlane-' + swimlaneId).css('display', 'inline');
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user