Add project calendars (merge/refactoring of #490)
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
@@ -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'] ?>"
|
||||
|
||||
29
app/Template/calendar/show.php
Normal file
29
app/Template/calendar/show.php
Normal file
@@ -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>
|
||||
40
app/Template/calendar/sidebar.php
Normal file
40
app/Template/calendar/sidebar.php
Normal file
@@ -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>
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user