diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-01-17 17:11:51 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-01-17 17:11:51 -0500 |
commit | 84b0f0df90442775b9122457648f06c9485df1f1 (patch) | |
tree | 5f0fb91ed9280bbf10bb60d69f3523cafc928f5c /app/Template | |
parent | 4b45b2aa3533309898670f1b13756dfdfce355a7 (diff) |
Add project calendars (merge/refactoring of #490)
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/app/projects.php | 1 | ||||
-rw-r--r-- | app/Template/app/subtasks.php | 2 | ||||
-rw-r--r-- | app/Template/app/tasks.php | 2 | ||||
-rw-r--r-- | app/Template/board/filters.php | 8 | ||||
-rw-r--r-- | app/Template/board/task.php | 4 | ||||
-rw-r--r-- | app/Template/calendar/show.php | 29 | ||||
-rw-r--r-- | app/Template/calendar/sidebar.php | 40 | ||||
-rw-r--r-- | app/Template/layout.php | 1 | ||||
-rw-r--r-- | app/Template/task/details.php | 2 | ||||
-rw-r--r-- | app/Template/task/table.php | 2 |
10 files changed, 84 insertions, 7 deletions
diff --git a/app/Template/app/projects.php b/app/Template/app/projects.php index 409697ac..724a6a5d 100644 --- a/app/Template/app/projects.php +++ b/app/Template/app/projects.php @@ -17,6 +17,7 @@ <?php if ($this->isManager($project['id'])): ?> <?= $this->a('<i class="fa fa-cog"></i>', 'project', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Settings')) ?> <?php endif ?> + <?= $this->a('<i class="fa fa-calendar"></i>', 'calendar', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Calendar')) ?> <?= $this->a($this->e($project['name']), 'board', 'show', array('project_id' => $project['id'])) ?> </td> <td class="dashboard-project-stats"> diff --git a/app/Template/app/subtasks.php b/app/Template/app/subtasks.php index 7081b174..2ad343e5 100644 --- a/app/Template/app/subtasks.php +++ b/app/Template/app/subtasks.php @@ -11,7 +11,7 @@ </tr> <?php foreach ($subtasks as $subtask): ?> <tr> - <td class="task-table task-<?= $subtask['color_id'] ?>"> + <td class="task-table color-<?= $subtask['color_id'] ?>"> <?= $this->a('#'.$subtask['task_id'], 'task', 'show', array('task_id' => $subtask['task_id'], 'project_id' => $subtask['project_id'])) ?> </td> <td> diff --git a/app/Template/app/tasks.php b/app/Template/app/tasks.php index a3d78a9d..dc485d7b 100644 --- a/app/Template/app/tasks.php +++ b/app/Template/app/tasks.php @@ -11,7 +11,7 @@ </tr> <?php foreach ($tasks as $task): ?> <tr> - <td class="task-table task-<?= $task['color_id'] ?>"> + <td class="task-table color-<?= $task['color_id'] ?>"> <?= $this->a('#'.$task['id'], 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </td> <td> diff --git a/app/Template/board/filters.php b/app/Template/board/filters.php index 36259820..1f0afe9c 100644 --- a/app/Template/board/filters.php +++ b/app/Template/board/filters.php @@ -23,13 +23,19 @@ <i class="fa fa-dashboard fa-fw"></i> <?= $this->a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?> </li> + <li> + <i class="fa fa-calendar fa-fw"></i> + <?= $this->a(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?> + </li> <?php if ($this->acl->isManagerActionAllowed($project['id'])): ?> <li> <i class="fa fa-line-chart fa-fw"></i> <?= $this->a(t('Analytics'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?> </li> - <li><i class="fa fa-cog fa-fw"></i> + <li> + <i class="fa fa-cog fa-fw"></i> <?= $this->a(t('Configure'), 'project', 'show', array('project_id' => $project['id'])) ?> + </li> <?php endif ?> </ul> </div>
\ No newline at end of file diff --git a/app/Template/board/task.php b/app/Template/board/task.php index 6700b693..66ddee60 100644 --- a/app/Template/board/task.php +++ b/app/Template/board/task.php @@ -1,6 +1,6 @@ <?php if ($not_editable): ?> -<div class="task-board task-<?= $task['color_id'] ?> <?= $task['date_modification'] > time() - $board_highlight_period ? 'task-board-recent' : '' ?>"> +<div class="task-board color-<?= $task['color_id'] ?> <?= $task['date_modification'] > time() - $board_highlight_period ? 'task-board-recent' : '' ?>"> <?= $this->a('#'.$task['id'], 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?> @@ -30,7 +30,7 @@ <?php else: ?> -<div class="task-board draggable-item task-<?= $task['color_id'] ?> <?= $task['date_modification'] > time() - $board_highlight_period ? 'task-board-recent' : '' ?>" +<div class="task-board draggable-item color-<?= $task['color_id'] ?> <?= $task['date_modification'] > time() - $board_highlight_period ? 'task-board-recent' : '' ?>" data-task-id="<?= $task['id'] ?>" data-owner-id="<?= $task['owner_id'] ?>" data-category-id="<?= $task['category_id'] ?>" diff --git a/app/Template/calendar/show.php b/app/Template/calendar/show.php new file mode 100644 index 00000000..aae856f4 --- /dev/null +++ b/app/Template/calendar/show.php @@ -0,0 +1,29 @@ +<section id="main"> + <div class="page-header"> + <ul> + <li><i class="fa fa-table fa-fw"></i><?= $this->a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li> + </ul> + </div> + <section class="sidebar-container"> + + <?= $this->render('calendar/sidebar', array( + 'project' => $project, + 'users_list' => $users_list, + 'categories_list' => $categories_list, + 'columns_list' => $columns_list, + 'swimlanes_list' => $swimlanes_list, + 'colors_list' => $colors_list, + 'status_list' => $status_list + )) ?> + + <div class="sidebar-content"> + <div id="calendar" + data-save-url="<?= $this->u('calendar', 'save', array('project_id' => $project['id'])) ?>" + data-check-url="<?= $this->u('calendar', 'events', array('project_id' => $project['id'])) ?>" + data-check-interval="<?= $check_interval ?>" + data-translations='<?= $this->getCalendarTranslations() ?>' + > + </div> + </div> + </section> +</section> diff --git a/app/Template/calendar/sidebar.php b/app/Template/calendar/sidebar.php new file mode 100644 index 00000000..599b2912 --- /dev/null +++ b/app/Template/calendar/sidebar.php @@ -0,0 +1,40 @@ +<div class="sidebar"> + <ul class="no-bullet"> + <li> + <?= t('Filter by user') ?> + </li> + <li> + <?= $this->formSelect('owner_id', $users_list, array(), array(), 'calendar-filter') ?> + </li> + <li> + <?= t('Filter by category') ?> + </li> + <li> + <?= $this->formSelect('category_id', $categories_list, array(), array(), 'calendar-filter') ?> + </li> + <li> + <?= t('Filter by column') ?> + </li> + <li> + <?= $this->formSelect('column_id', $columns_list, array(), array(), 'calendar-filter') ?> + </li> + <li> + <?= t('Filter by swimlane') ?> + </li> + <li> + <?= $this->formSelect('swimlane_id', $swimlanes_list, array(), array(), 'calendar-filter') ?> + </li> + <li> + <?= t('Filter by color') ?> + </li> + <li> + <?= $this->formSelect('color_id', $colors_list, array(), array(), 'calendar-filter') ?> + </li> + <li> + <?= t('Filter by status') ?> + </li> + <li> + <?= $this->formSelect('is_active', $status_list, array(), array(), 'calendar-filter') ?> + </li> + </ul> +</div> diff --git a/app/Template/layout.php b/app/Template/layout.php index 9aa34905..283a85f8 100644 --- a/app/Template/layout.php +++ b/app/Template/layout.php @@ -14,6 +14,7 @@ <?= $this->js('assets/js/app.js') ?> <?php endif ?> + <?= $this->css($this->u('app', 'colors'), false) ?> <?= $this->css('assets/css/app.css') ?> <link rel="icon" type="image/png" href="assets/img/favicon.png"> diff --git a/app/Template/task/details.php b/app/Template/task/details.php index 50145da4..3205514c 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -1,4 +1,4 @@ -<div class="task-<?= $task['color_id'] ?> task-show-details"> +<div class="color-<?= $task['color_id'] ?> task-show-details"> <h2><?= $this->e('#'.$task['id'].' '.$task['title']) ?></h2> <?php if ($task['score']): ?> <span class="task-score"><?= $this->e($task['score']) ?></span> diff --git a/app/Template/task/table.php b/app/Template/task/table.php index 689cdcc4..e8ca7c51 100644 --- a/app/Template/task/table.php +++ b/app/Template/task/table.php @@ -12,7 +12,7 @@ </tr> <?php foreach ($tasks as $task): ?> <tr> - <td class="task-table task-<?= $task['color_id'] ?>"> + <td class="task-table color-<?= $task['color_id'] ?>"> <?= $this->a('#'.$this->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> </td> <td> |