diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-02-15 18:25:54 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-02-15 18:25:54 -0500 |
commit | 794f7f7645f7949705f47b95e88fc5d292bb0a7d (patch) | |
tree | f4d0187e0701cd143859f5ef5fe6647b7f6df77e /app | |
parent | 2fd2fe6e884ad912da088340f413f3477f54b505 (diff) |
Add board horizontal scrolling
Diffstat (limited to 'app')
-rw-r--r-- | app/Template/board/filters.php | 5 | ||||
-rw-r--r-- | app/Template/board/show.php | 52 | ||||
-rw-r--r-- | app/Template/board/swimlane.php | 4 | ||||
-rw-r--r-- | app/Template/board/task.php | 2 |
4 files changed, 35 insertions, 28 deletions
diff --git a/app/Template/board/filters.php b/app/Template/board/filters.php index 272b0b73..64a01b8f 100644 --- a/app/Template/board/filters.php +++ b/app/Template/board/filters.php @@ -29,6 +29,11 @@ <i class="fa fa-calendar fa-fw"></i> <?= $this->a(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?> </li> + <?php if ($project['is_public']): ?> + <li> + <i class="fa fa-share-alt fa-fw"></i> <?= $this->a(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?> + </li> + <?php endif ?> <?php if ($this->acl->isManagerActionAllowed($project['id'])): ?> <li> <i class="fa fa-line-chart fa-fw"></i> diff --git a/app/Template/board/show.php b/app/Template/board/show.php index dc524737..9fa95dbd 100644 --- a/app/Template/board/show.php +++ b/app/Template/board/show.php @@ -1,27 +1,29 @@ -<?php if (isset($not_editable)): ?> - <table id="board"> -<?php else: ?> - <table id="board" - data-project-id="<?= $project['id'] ?>" - data-check-interval="<?= $board_private_refresh_interval ?>" - data-save-url="<?= $this->u('board', 'save', array('project_id' => $project['id'])) ?>" - data-check-url="<?= $this->u('board', 'check', array('project_id' => $project['id'], 'timestamp' => time())) ?>" - > -<?php endif ?> - -<?php foreach ($swimlanes as $swimlane): ?> - <?php if (empty($swimlane['columns'])): ?> - <p class="alert alert-error"><?= t('There is no column in your project!') ?></p> - <?php break ?> +<div id="board-container"> + <?php if (isset($not_editable)): ?> + <table id="board"> <?php else: ?> - <?= $this->render('board/swimlane', array( - 'project' => $project, - 'swimlane' => $swimlane, - 'board_highlight_period' => $board_highlight_period, - 'categories' => $categories, - 'hide_swimlane' => count($swimlanes) === 1, - 'not_editable' => isset($not_editable), - )) ?> + <table id="board" + data-project-id="<?= $project['id'] ?>" + data-check-interval="<?= $board_private_refresh_interval ?>" + data-save-url="<?= $this->u('board', 'save', array('project_id' => $project['id'])) ?>" + data-check-url="<?= $this->u('board', 'check', array('project_id' => $project['id'], 'timestamp' => time())) ?>" + > <?php endif ?> -<?php endforeach ?> -</table>
\ No newline at end of file + + <?php foreach ($swimlanes as $swimlane): ?> + <?php if (empty($swimlane['columns'])): ?> + <p class="alert alert-error"><?= t('There is no column in your project!') ?></p> + <?php break ?> + <?php else: ?> + <?= $this->render('board/swimlane', array( + 'project' => $project, + 'swimlane' => $swimlane, + 'board_highlight_period' => $board_highlight_period, + 'categories' => $categories, + 'hide_swimlane' => count($swimlanes) === 1, + 'not_editable' => isset($not_editable), + )) ?> + <?php endif ?> + <?php endforeach ?> + </table> +</div>
\ No newline at end of file diff --git a/app/Template/board/swimlane.php b/app/Template/board/swimlane.php index ec5272f3..331b5ac2 100644 --- a/app/Template/board/swimlane.php +++ b/app/Template/board/swimlane.php @@ -2,7 +2,7 @@ <?php if (! $hide_swimlane): ?> <th> - <?php if ($swimlane['nb_tasks'] > 0): ?> + <?php if (! $not_editable && $swimlane['nb_tasks'] > 0): ?> <a href="#" class="board-swimlane-toggle" data-swimlane-id="<?= $swimlane['id'] ?>"> <i class="fa fa-minus-circle hide-icon-swimlane-<?= $swimlane['id'] ?>"></i> <i class="fa fa-plus-circle show-icon-swimlane-<?= $swimlane['id'] ?>" style="display: none"></i> @@ -18,7 +18,7 @@ <?php endif ?> <?php foreach ($swimlane['columns'] as $column): ?> - <th> + <th class="board-column"> <?php if (! $not_editable): ?> <div class="board-add-icon"> <?= $this->a('+', 'task', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'task-creation-popover', t('Add a new task')) ?> diff --git a/app/Template/board/task.php b/app/Template/board/task.php index 5f73a5c2..8b9fca6b 100644 --- a/app/Template/board/task.php +++ b/app/Template/board/task.php @@ -22,7 +22,7 @@ <li><i class="fa fa-align-left"></i> <?= $this->a(t('Change description'), 'task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-description-popover') ?></li> <li><i class="fa fa-pencil-square-o"></i> <?= $this->a(t('Edit this task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-edit-popover') ?></li> <li><i class="fa fa-close"></i> <?= $this->a(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes', 'redirect' => 'board'), true) ?></li> - </li> + </ul> </li> </ul> |