summaryrefslogtreecommitdiff
path: root/plugins/Bigboard/Template/board
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Bigboard/Template/board')
-rw-r--r--plugins/Bigboard/Template/board/dropdown.php32
-rw-r--r--plugins/Bigboard/Template/board/show.php5
-rw-r--r--plugins/Bigboard/Template/board/table_container.php58
-rw-r--r--plugins/Bigboard/Template/board/table_tasks.php38
-rw-r--r--plugins/Bigboard/Template/board/task_private.php66
-rw-r--r--plugins/Bigboard/Template/board/view.php20
6 files changed, 219 insertions, 0 deletions
diff --git a/plugins/Bigboard/Template/board/dropdown.php b/plugins/Bigboard/Template/board/dropdown.php
new file mode 100644
index 00000000..de64917d
--- /dev/null
+++ b/plugins/Bigboard/Template/board/dropdown.php
@@ -0,0 +1,32 @@
+<div class="project-header">
+ <div class="dropdown-component">
+ <div class="dropdown">
+ <a href="#" class="dropdown-menu action-menu"><?= t('Menu') ?> <i class="fa fa-caret-down"></i></a>
+ <ul>
+ <li>
+ <span class="filter-display-mode" <?= $bigboarddisplaymode ? '' : 'style="display: none;"' ?>>
+ <i class="fa fa-expand fa-fw"></i>
+ <?= $this->url->link(t('Expand tasks'), 'Bigboard', 'expandAll', array('plugin' => 'Bigboard'), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?>
+ </span>
+ <span class="filter-display-mode" <?= $bigboarddisplaymode ? 'style="display: none;"' : '' ?>>
+ <i class="fa fa-compress fa-fw"></i>
+ <?= $this->url->link(t('Collapse tasks'), 'Bigboard', 'collapseAll', array('plugin' => 'Bigboard'), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?>
+ </span>
+ </li>
+ <li>
+ <span class="filter-compact">
+ <i class="fa fa-th fa-fw"></i> <a href="#" class="filter-toggle-scrolling" title="<?= t('Keyboard shortcut: "%s"', 'c') ?>"><?= t('Compact view') ?></a>
+ </span>
+ <span class="filter-wide" style="display: none">
+ <i class="fa fa-arrows-h fa-fw"></i> <a href="#" class="filter-toggle-scrolling" title="<?= t('Keyboard shortcut: "%s"', 'c') ?>"><?= t('Horizontal scrolling') ?></a>
+ </span>
+ </li>
+
+ <li>
+ <i class="fa fa-folder fa-fw" aria-hidden="true"></i>
+ <?= $this->url->link(t('Manage projects'), 'ProjectListController', 'show') ?>
+ </li>
+ </ul>
+ </div>
+ </div>
+</div>
diff --git a/plugins/Bigboard/Template/board/show.php b/plugins/Bigboard/Template/board/show.php
new file mode 100644
index 00000000..dcc10e71
--- /dev/null
+++ b/plugins/Bigboard/Template/board/show.php
@@ -0,0 +1,5 @@
+<?
+
+// just an empty file by intent
+
+?>
diff --git a/plugins/Bigboard/Template/board/table_container.php b/plugins/Bigboard/Template/board/table_container.php
new file mode 100644
index 00000000..e7fc6116
--- /dev/null
+++ b/plugins/Bigboard/Template/board/table_container.php
@@ -0,0 +1,58 @@
+<div id="board-container" data-project-id='<?= $project['id'] ?>'>
+ <?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"
+ data-project-id="<?= $project['id'] ?>"
+ data-check-interval="<?= $board_private_refresh_interval ?>"
+ data-save-url="<?= $this->url->href('BoardAjaxController', 'save', array('plugin' => "Bigboard", 'project_id' => $project['id'])) ?>"
+ data-reload-url="<?= $this->url->href('BoardAjaxController', 'reload', array('plugin' => "Bigboard", 'project_id' => $project['id'])) ?>"
+ data-check-url="<?= $this->url->href('BoardAjaxController', 'check', array('plugin' => "Bigboard", 'project_id' => $project['id'], 'timestamp' => time())) ?>"
+ data-task-creation-url="<?= $this->url->href('TaskCreationController', 'show', array('plugin' => "Bigboard", '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(
+ 'swimlane' => $swimlane,
+ 'not_editable' => isset($not_editable),
+ )) ?>
+
+ <?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('bigboard: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>
diff --git a/plugins/Bigboard/Template/board/table_tasks.php b/plugins/Bigboard/Template/board/table_tasks.php
new file mode 100644
index 00000000..3d280489
--- /dev/null
+++ b/plugins/Bigboard/Template/board/table_tasks.php
@@ -0,0 +1,38 @@
+<!-- task row -->
+<tr class="board-swimlane board-swimlane-tasks-<?= $swimlane['id'] ?>">
+ <?php foreach ($swimlane['columns'] as $column): ?>
+ <td class="
+ board-column-<?= $column['id'] ?>
+ <?= $column['task_limit'] > 0 && $column['nb_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-project-id="<?= $project['id'] ?>"
+ 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' : 'bigboard: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">
+ <div class="board-rotation-wrapper">
+ <div class="board-column-title board-rotation board-toggle-column-view" data-column-id="<?= $column['id'] ?>" title="<?= t('Show this column') ?>">
+ <i class="fa fa-plus-square tooltip" title="<?= $this->text->e($column['title']) ?>"></i> <?= $this->text->e($column['title']) ?>
+ </div>
+ </div>
+ </div>
+ </td>
+ <?php endforeach ?>
+</tr>
diff --git a/plugins/Bigboard/Template/board/task_private.php b/plugins/Bigboard/Template/board/task_private.php
new file mode 100644
index 00000000..d97e0e2c
--- /dev/null
+++ b/plugins/Bigboard/Template/board/task_private.php
@@ -0,0 +1,66 @@
+<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-project-id="<?= $task['project_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'], 'project_id' => $task['project_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)) ?>
+ <?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'], 'project_id' => $task['project_id']), false, 'tooltip', $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)) ?>
+ <?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'], 'project_id' => $task['project_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>
diff --git a/plugins/Bigboard/Template/board/view.php b/plugins/Bigboard/Template/board/view.php
new file mode 100644
index 00000000..7987e7c2
--- /dev/null
+++ b/plugins/Bigboard/Template/board/view.php
@@ -0,0 +1,20 @@
+<section id="main">
+
+ <span class='header'><h1><?= $this->text->e($project['name']) ?>
+
+ <?php if (! empty($project['description'])): ?>
+ <?= $this->app->tooltipMarkdown($project['description']) ?>
+ <?php endif ?>
+
+ </span>
+ </h1></span>
+
+
+ <?= $this->render('bigboard:board/table_container', array(
+ 'project' => $project,
+ 'swimlanes' => $swimlanes,
+ 'board_private_refresh_interval' => $board_private_refresh_interval,
+ 'board_highlight_period' => $board_highlight_period,
+ )) ?>
+
+</section>