summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/board/filters.php16
-rw-r--r--app/Template/board/show.php54
-rw-r--r--app/Template/board/swimlane.php14
-rw-r--r--app/Template/board/task.php161
-rw-r--r--app/Template/board/task_footer.php45
-rw-r--r--app/Template/board/task_public.php30
-rw-r--r--app/Template/board/tasklinks.php15
-rw-r--r--app/Template/calendar/show.php2
-rw-r--r--app/Template/config/about.php25
-rw-r--r--app/Template/config/sidebar.php3
-rw-r--r--app/Template/file/show.php2
-rw-r--r--app/Template/layout.php4
-rw-r--r--app/Template/link/create.php18
-rw-r--r--app/Template/link/edit.php21
-rw-r--r--app/Template/link/index.php33
-rw-r--r--app/Template/link/remove.php15
-rw-r--r--app/Template/task/close.php4
-rw-r--r--app/Template/task/details.php1
-rw-r--r--app/Template/task/public.php7
-rw-r--r--app/Template/task/show.php3
-rw-r--r--app/Template/task/sidebar.php3
-rw-r--r--app/Template/tasklink/create.php27
-rw-r--r--app/Template/tasklink/remove.php15
-rw-r--r--app/Template/tasklink/show.php41
24 files changed, 397 insertions, 162 deletions
diff --git a/app/Template/board/filters.php b/app/Template/board/filters.php
index 0e9c4d5f..a5697f3f 100644
--- a/app/Template/board/filters.php
+++ b/app/Template/board/filters.php
@@ -6,6 +6,14 @@
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a>
<ul>
<li>
+ <span class="filter-collapse">
+ <i class="fa fa-compress fa-fw"></i> <a href="#" class="filter-collapse-link"><?= t('Collapse tasks') ?></a>
+ </span>
+ <span class="filter-expand" style="display: none">
+ <i class="fa fa-expand fa-fw"></i> <a href="#" class="filter-expand-link"><?= t('Expand tasks') ?></a>
+ </span>
+ </li>
+ <li>
<i class="fa fa-search fa-fw"></i>
<?= $this->a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
</li>
@@ -21,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>
@@ -46,5 +59,8 @@
<li>
<a href="#" id="filter-due-date"><?= t('Filter by due date') ?></a>
</li>
+ <li>
+ <a href="#" id="filter-recent"><?= t('Filter recently updated') ?></a>
+ </li>
</ul>
</div> \ No newline at end of file
diff --git a/app/Template/board/show.php b/app/Template/board/show.php
index 5fbb576c..f1607d26 100644
--- a/app/Template/board/show.php
+++ b/app/Template/board/show.php
@@ -1,28 +1,30 @@
-
-<?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())) ?>"
+ data-task-creation-url="<?= $this->u('task', 'create', array('project_id' => $project['id'])) ?>"
+ >
<?php endif ?>
-<?php endforeach ?>
-</table>
+
+ <?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 f0a00fc1..08efdd11 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,21 +18,21 @@
<?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')) ?>
+ <?= $this->a('+', 'task', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'task-board-popover', t('Add a new task')) ?>
</div>
<?php endif ?>
<?= $this->e($column['title']) ?>
-
+
<?php if (! empty($column['description'])): ?>
- <span class="column-tooltip pull-right" title="<?= $this->markdown($column['description']) ?>">
+ <span class="column-tooltip pull-right" title="<?= $this->markdown($column['description']) ?>">
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
-
+
<?php if ($column['task_limit']): ?>
<span title="<?= t('Task limit') ?>" class="task-limit">
(<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>/<?= $this->e($column['task_limit']) ?>)
@@ -65,7 +65,7 @@
<?php endif ?>
<?php foreach ($column['tasks'] as $task): ?>
- <?= $this->render('board/task', array(
+ <?= $this->render($not_editable ? 'board/task_public' : 'board/task', array(
'project' => $project,
'task' => $task,
'categories' => $categories,
diff --git a/app/Template/board/task.php b/app/Template/board/task.php
index 5cad4004..a2a617a6 100644
--- a/app/Template/board/task.php
+++ b/app/Template/board/task.php
@@ -1,35 +1,3 @@
-<?php if ($not_editable): ?>
-
-<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'])) ?>
-
- <?php if ($task['reference']): ?>
- <span class="task-board-reference" title="<?= t('Reference') ?>">
- (<?= $task['reference'] ?>)
- </span>
- <?php endif ?>
-
- &nbsp;-&nbsp;
-
- <span class="task-board-user">
- <?php if (! empty($task['owner_id'])): ?>
- <?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?>
- <?php else: ?>
- <span class="task-board-nobody"><?= t('Nobody assigned') ?></span>
- <?php endif ?>
- </span>
-
- <?php if ($task['score']): ?>
- <span class="task-score"><?= $this->e($task['score']) ?></span>
- <?php endif ?>
-
- <div class="task-board-title">
- <?= $this->a($this->e($task['title']), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
- </div>
-
-<?php else: ?>
-
<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'] ?>"
@@ -38,98 +6,57 @@
data-task-url="<?= $this->u('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"
title="<?= t('View this task') ?>">
- <ul class="dropdown">
- <li>
- <a href="#" class="dropdown-menu"><?= '#'.$task['id'] ?></a>
- <ul>
- <li><i class="fa fa-user"></i> <?= $this->a(t('Change assignee'), 'board', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'assignee-popover') ?></li>
- <li><i class="fa fa-tag"></i> <?= $this->a(t('Change category'), 'board', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'category-popover') ?></li>
- <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>
- </li>
- </ul>
-
- <?php if ($task['reference']): ?>
- <span class="task-board-reference" title="<?= t('Reference') ?>">
- (<?= $task['reference'] ?>)
- </span>
- <?php endif ?>
-
- <span class="task-board-user <?= $this->userSession->isCurrentUser($task['owner_id']) ? 'task-board-current-user' : '' ?>">
- <?= $this->a(
- (! empty($task['owner_id']) ? t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) : t('Nobody assigned')),
- 'board',
- 'changeAssignee',
- array('task_id' => $task['id'], 'project_id' => $task['project_id']),
- false,
- 'assignee-popover',
- t('Change assignee')
- ) ?>
- </span>
-
- <span title="<?= t('Task age in days')?>" class="task-days-age"><?= t('%dd', floor(time()/86400) - floor($task['date_creation']/86400)) ?></span>
- <span title="<?= t('Days in this column')?>" class="task-days-incolumn"><?= t('%dd', floor(time()/86400) - floor($task['date_moved']/86400)) ?></span>
-
- <?php if ($task['score']): ?>
- <span class="task-score"><?= $this->e($task['score']) ?></span>
- <?php endif ?>
-
- <div class="task-board-title">
- <?= $this->a($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
+ <div class="task-board-collapsed" style="display: none">
+ <?= $this->a('#'.$task['id'], 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-id') ?>
+ <?= $this->a($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-title') ?>
</div>
-<?php endif ?>
-
-
-<?php if ($task['category_id']): ?>
-<div class="task-board-category-container">
- <span class="task-board-category">
- <?= $this->a(
- $this->inList($task['category_id'], $categories),
- 'board',
- 'changeCategory',
- array('task_id' => $task['id'], 'project_id' => $task['project_id']),
- false,
- 'category-popover',
- t('Change category')
- ) ?>
- </span>
-</div>
-<?php endif ?>
-
-
-<?php if (! empty($task['date_due']) || ! empty($task['nb_files']) || ! empty($task['nb_comments']) || ! empty($task['description']) || ! empty($task['nb_subtasks'])): ?>
-<div class="task-board-footer">
-
- <?php if (! empty($task['date_due'])): ?>
- <div class="task-board-date <?= time() > $task['date_due'] ? 'task-board-date-overdue' : '' ?>">
- <i class="fa fa-calendar"></i>&nbsp;<?= dt('%b %e, %Y', $task['date_due']) ?>
- </div>
- <?php endif ?>
-
- <div class="task-board-icons">
+ <div class="task-board-expanded">
+
+ <ul class="dropdown">
+ <li>
+ <a href="#" class="dropdown-menu"><?= '#'.$task['id'] ?></a>
+ <ul>
+ <li><i class="fa fa-user"></i> <?= $this->a(t('Change assignee'), 'board', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
+ <li><i class="fa fa-tag"></i> <?= $this->a(t('Change category'), 'board', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
+ <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-board-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-board-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'], 'redirect' => 'board'), false, 'task-board-popover') ?></li>
+ </ul>
+ </li>
+ </ul>
- <?php if (! empty($task['nb_subtasks'])): ?>
- <span title="<?= t('Sub-Tasks') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'subtasks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= round($task['nb_completed_subtasks']/$task['nb_subtasks']*100, 0).'%' ?> <i class="fa fa-bars"></i></span>
+ <?php if ($task['reference']): ?>
+ <span class="task-board-reference" title="<?= t('Reference') ?>">
+ (<?= $task['reference'] ?>)
+ </span>
<?php endif ?>
- <?php if (! empty($task['nb_files'])): ?>
- <span title="<?= t('Attachments') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= $task['nb_files'] ?> <i class="fa fa-paperclip"></i></span>
+ <span class="task-board-user <?= $this->userSession->isCurrentUser($task['owner_id']) ? 'task-board-current-user' : '' ?>">
+ <?= $this->a(
+ (! empty($task['owner_id']) ? ($task['assignee_name'] ?: $task['assignee_username']) : t('Nobody assigned')),
+ 'board',
+ 'changeAssignee',
+ array('task_id' => $task['id'], 'project_id' => $task['project_id']),
+ false,
+ 'task-board-popover',
+ t('Change assignee')
+ ) ?>
+ </span>
+
+ <?php if ($task['score']): ?>
+ <span class="task-score"><?= $this->e($task['score']) ?></span>
<?php endif ?>
- <?php if (! empty($task['nb_comments'])): ?>
- <span title="<?= p($task['nb_comments'], t('%d comment', $task['nb_comments']), t('%d comments', $task['nb_comments'])) ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'comments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= $task['nb_comments'] ?> <i class="fa fa-comment-o"></i></span>
- <?php endif ?>
+ <div class="task-board-days">
+ <span title="<?= t('Task age in days')?>" class="task-days-age"><?= $this->getTaskAge($task['date_creation']) ?></span>
+ <span title="<?= t('Days in this column')?>" class="task-days-incolumn"><?= $this->getTaskAge($task['date_moved']) ?></span>
+ </div>
- <?php if (! empty($task['description'])): ?>
- <span title="<?= t('Description') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>">
- <i class="fa fa-file-text-o"></i>
- </span>
- <?php endif ?>
+ <div class="task-board-title">
+ <?= $this->a($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
+ </div>
+
+ <?= $this->render('board/task_footer', array('task' => $task, 'categories' => $categories)) ?>
</div>
</div>
-<?php endif ?>
-
-</div> \ No newline at end of file
diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php
new file mode 100644
index 00000000..d413692c
--- /dev/null
+++ b/app/Template/board/task_footer.php
@@ -0,0 +1,45 @@
+<?php if ($task['category_id']): ?>
+<div class="task-board-category-container">
+ <span class="task-board-category">
+ <?= $this->a(
+ $this->inList($task['category_id'], $categories),
+ 'board',
+ 'changeCategory',
+ array('task_id' => $task['id'], 'project_id' => $task['project_id']),
+ false,
+ 'task-board-popover',
+ t('Change category')
+ ) ?>
+ </span>
+</div>
+<?php endif ?>
+
+<div class="task-board-icons">
+ <?php if (! empty($task['date_due'])): ?>
+ <span class="task-board-date <?= time() > $task['date_due'] ? 'task-board-date-overdue' : '' ?>">
+ <i class="fa fa-calendar"></i>&nbsp;<?= dt('%b %e', $task['date_due']) ?>
+ </span>
+ <?php endif ?>
+
+ <?php if (! empty($task['nb_links'])): ?>
+ <span title="<?= t('Links') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'tasklinks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= $task['nb_links'] ?> <i class="fa fa-code-fork"></i></span>
+ <?php endif ?>
+
+ <?php if (! empty($task['nb_subtasks'])): ?>
+ <span title="<?= t('Sub-Tasks') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'subtasks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= round($task['nb_completed_subtasks']/$task['nb_subtasks']*100, 0).'%' ?> <i class="fa fa-bars"></i></span>
+ <?php endif ?>
+
+ <?php if (! empty($task['nb_files'])): ?>
+ <span title="<?= t('Attachments') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= $task['nb_files'] ?> <i class="fa fa-paperclip"></i></span>
+ <?php endif ?>
+
+ <?php if (! empty($task['nb_comments'])): ?>
+ <span title="<?= p($task['nb_comments'], t('%d comment', $task['nb_comments']), t('%d comments', $task['nb_comments'])) ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'comments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= $task['nb_comments'] ?> <i class="fa fa-comment-o"></i></span>
+ <?php endif ?>
+
+ <?php if (! empty($task['description'])): ?>
+ <span title="<?= t('Description') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>">
+ <i class="fa fa-file-text-o"></i>
+ </span>
+ <?php endif ?>
+</div> \ No newline at end of file
diff --git a/app/Template/board/task_public.php b/app/Template/board/task_public.php
new file mode 100644
index 00000000..650b956d
--- /dev/null
+++ b/app/Template/board/task_public.php
@@ -0,0 +1,30 @@
+<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'])) ?>
+
+ <?php if ($task['reference']): ?>
+ <span class="task-board-reference" title="<?= t('Reference') ?>">
+ (<?= $task['reference'] ?>)
+ </span>
+ <?php endif ?>
+
+ &nbsp;-&nbsp;
+
+ <span class="task-board-user">
+ <?php if (! empty($task['owner_id'])): ?>
+ <?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?>
+ <?php else: ?>
+ <span class="task-board-nobody"><?= t('Nobody assigned') ?></span>
+ <?php endif ?>
+ </span>
+
+ <?php if ($task['score']): ?>
+ <span class="task-score"><?= $this->e($task['score']) ?></span>
+ <?php endif ?>
+
+ <div class="task-board-title">
+ <?= $this->a($this->e($task['title']), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
+ </div>
+
+ <?= $this->render('board/task_footer', array('task' => $task, 'categories' => $categories)) ?>
+</div> \ No newline at end of file
diff --git a/app/Template/board/tasklinks.php b/app/Template/board/tasklinks.php
new file mode 100644
index 00000000..9c4f52ca
--- /dev/null
+++ b/app/Template/board/tasklinks.php
@@ -0,0 +1,15 @@
+<div class="tooltip-tasklinks">
+ <ul>
+ <?php foreach($links as $link): ?>
+ <li>
+ <strong><?= t($link['label']) ?></strong>
+ <?= $this->a(
+ $this->e('#'.$link['task_id'].' - '.$link['title']),
+ 'task', 'show', array('task_id' => $link['task_id'], 'project_id' => $link['project_id']),
+ false,
+ $link['is_active'] ? '' : 'task-link-closed'
+ ) ?>
+ </li>
+ <?php endforeach ?>
+ </ul>
+</div> \ No newline at end of file
diff --git a/app/Template/calendar/show.php b/app/Template/calendar/show.php
index b258e391..cb5a1109 100644
--- a/app/Template/calendar/show.php
+++ b/app/Template/calendar/show.php
@@ -35,7 +35,7 @@
<div id="calendar"
data-project-id="<?= $project['id'] ?>"
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-url="<?= $this->u('calendar', 'project', array('project_id' => $project['id'])) ?>"
data-check-interval="<?= $check_interval ?>"
>
</div>
diff --git a/app/Template/config/about.php b/app/Template/config/about.php
index d96e6bdd..f6474e21 100644
--- a/app/Template/config/about.php
+++ b/app/Template/config/about.php
@@ -1,7 +1,7 @@
<div class="page-header">
<h2><?= t('About') ?></h2>
</div>
-<section class="listing">
+<div class="listing">
<ul>
<li>
<?= t('Official website:') ?>
@@ -12,12 +12,11 @@
<strong><?= APP_VERSION ?></strong>
</li>
</ul>
-</section>
-
+</div>
<div class="page-header">
<h2><?= t('Database') ?></h2>
</div>
-<section class="listing">
+<div class="listing">
<ul>
<li>
<?= t('Database driver:') ?>
@@ -38,4 +37,20 @@
</li>
<?php endif ?>
</ul>
-</section> \ No newline at end of file
+</div>
+<div class="page-header">
+ <h2><?= t('Keyboard shortcuts') ?></h2>
+</div>
+<div class="listing">
+ <h3><?= t('Board view') ?></h3>
+ <ul>
+ <li><?= t('New task') ?> = <strong>n</strong></li>
+ <li><?= t('Expand/collapse tasks') ?> = <strong>s</strong></li>
+ </ul>
+ <h3><?= t('Application') ?></h3>
+ <ul>
+ <li><?= t('Open board switcher') ?> = <strong>b</strong></li>
+ <li><?= t('Close dialog box') ?> = <strong>ESC</strong></li>
+ <li><?= t('Submit a form') ?> = <strong>CTRL+ENTER</strong> <?= t('or') ?> <strong>⌘+ENTER</strong></li>
+ </ul>
+</div> \ No newline at end of file
diff --git a/app/Template/config/sidebar.php b/app/Template/config/sidebar.php
index 8e6fa379..89f2c203 100644
--- a/app/Template/config/sidebar.php
+++ b/app/Template/config/sidebar.php
@@ -11,6 +11,9 @@
<?= $this->a(t('Board settings'), 'config', 'board') ?>
</li>
<li>
+ <?= $this->a(t('Link settings'), 'link', 'index') ?>
+ </li>
+ <li>
<?= $this->a(t('Webhooks'), 'config', 'webhook') ?>
</li>
<li>
diff --git a/app/Template/file/show.php b/app/Template/file/show.php
index 179f5744..298976f6 100644
--- a/app/Template/file/show.php
+++ b/app/Template/file/show.php
@@ -11,7 +11,7 @@
<?= $this->a($this->e($file['name']), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
<span class="task-show-file-actions">
<?php if ($file['is_image']): ?>
- <?= $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'file-popover') ?>,
+ <?= $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?>,
<?php endif ?>
<?= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
</span>
diff --git a/app/Template/layout.php b/app/Template/layout.php
index 9e85e9ae..ad4c4084 100644
--- a/app/Template/layout.php
+++ b/app/Template/layout.php
@@ -29,13 +29,13 @@
data-login-url="<?= $this->u('user', 'login') ?>"
data-timezone="<?= $this->getTimezone() ?>"
data-js-lang="<?= $this->jsLang() ?>">
-
+
<?php if (isset($no_layout) && $no_layout): ?>
<?= $content_for_layout ?>
<?php else: ?>
<header>
<nav>
- <h1><?= $this->a('<i class="fa fa-home fa-fw"></i>', 'app', 'index', array(), false, 'home-link', t('Dashboard')).' '.$this->summary($this->e($title)) ?></h1>
+ <h1><?= $this->a('K<span>B</span>', 'app', 'index', array(), false, 'logo', t('Dashboard')).' '.$this->summary($this->e($title)) ?></h1>
<ul>
<?php if (isset($board_selector) && ! empty($board_selector)): ?>
<li>
diff --git a/app/Template/link/create.php b/app/Template/link/create.php
new file mode 100644
index 00000000..12589574
--- /dev/null
+++ b/app/Template/link/create.php
@@ -0,0 +1,18 @@
+<div class="page-header">
+ <h2><?= t('Add a new link') ?></h2>
+</div>
+
+<form action="<?= $this->u('link', 'save') ?>" method="post" autocomplete="off">
+
+ <?= $this->formCsrf() ?>
+
+ <?= $this->formLabel(t('Label'), 'label') ?>
+ <?= $this->formText('label', $values, $errors, array('required')) ?>
+
+ <?= $this->formLabel(t('Opposite label'), 'opposite_label') ?>
+ <?= $this->formText('opposite_label', $values, $errors) ?>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ </div>
+</form> \ No newline at end of file
diff --git a/app/Template/link/edit.php b/app/Template/link/edit.php
new file mode 100644
index 00000000..d9ce280c
--- /dev/null
+++ b/app/Template/link/edit.php
@@ -0,0 +1,21 @@
+<div class="page-header">
+ <h2><?= t('Link modification') ?></h2>
+</div>
+
+<form action="<?= $this->u('link', 'update', array('link_id' => $link['id'])) ?>" method="post" autocomplete="off">
+
+ <?= $this->formCsrf() ?>
+ <?= $this->formHidden('id', $values) ?>
+
+ <?= $this->formLabel(t('Label'), 'label') ?>
+ <?= $this->formText('label', $values, $errors, array('required')) ?>
+
+ <?= $this->formLabel(t('Opposite label'), 'opposite_id') ?>
+ <?= $this->formSelect('opposite_id', $labels, $values, $errors) ?>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <?= t('or') ?>
+ <?= $this->a(t('cancel'), 'link', 'index') ?>
+ </div>
+</form> \ No newline at end of file
diff --git a/app/Template/link/index.php b/app/Template/link/index.php
new file mode 100644
index 00000000..90d1c357
--- /dev/null
+++ b/app/Template/link/index.php
@@ -0,0 +1,33 @@
+<div class="page-header">
+ <h2><?= t('Link labels') ?></h2>
+</div>
+<?php if (! empty($links)): ?>
+<table>
+ <tr>
+ <th class="column-70"><?= t('Link labels') ?></th>
+ <th><?= t('Actions') ?></th>
+ </tr>
+ <?php foreach ($links as $link): ?>
+ <tr>
+ <td>
+ <strong><?= t($link['label']) ?></strong>
+
+ <?php if (! empty($link['opposite_label'])): ?>
+ | <?= t($link['opposite_label']) ?>
+ <?php endif ?>
+ </td>
+ <td>
+ <ul>
+ <?= $this->a(t('Edit'), 'link', 'edit', array('link_id' => $link['id'])) ?>
+ <?= t('or') ?>
+ <?= $this->a(t('Remove'), 'link', 'confirm', array('link_id' => $link['id'])) ?>
+ </ul>
+ </td>
+ </tr>
+ <?php endforeach ?>
+</table>
+<?php else: ?>
+ <?= t('There is no link.') ?>
+<?php endif ?>
+
+<?= $this->render('link/create', array('values' => $values, 'errors' => $errors)) ?> \ No newline at end of file
diff --git a/app/Template/link/remove.php b/app/Template/link/remove.php
new file mode 100644
index 00000000..a802feb0
--- /dev/null
+++ b/app/Template/link/remove.php
@@ -0,0 +1,15 @@
+<div class="page-header">
+ <h2><?= t('Remove a link') ?></h2>
+</div>
+
+<div class="confirm">
+ <p class="alert alert-info">
+ <?= t('Do you really want to remove this link: "%s"?', $link['label']) ?>
+ </p>
+
+ <div class="form-actions">
+ <?= $this->a(t('Yes'), 'link', 'remove', array('link_id' => $link['id']), true, 'btn btn-red') ?>
+ <?= t('or') ?>
+ <?= $this->a(t('cancel'), 'link', 'index') ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/app/Template/task/close.php b/app/Template/task/close.php
index 316d58eb..a0a95787 100644
--- a/app/Template/task/close.php
+++ b/app/Template/task/close.php
@@ -8,8 +8,8 @@
</p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
+ <?= $this->a(t('Yes'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes', 'redirect' => $redirect), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/task/details.php b/app/Template/task/details.php
index 3205514c..76241acf 100644
--- a/app/Template/task/details.php
+++ b/app/Template/task/details.php
@@ -60,6 +60,7 @@
<?= t('Column on the board:') ?>
<strong><?= $this->e($task['column_title']) ?></strong>
(<?= $this->e($task['project_name']) ?>)
+ <?= dt('since %B %e, %Y at %k:%M %p', $task['date_moved']) ?>
</li>
<li><?= t('Task position:').' '.$this->e($task['position']) ?></li>
<?php if ($task['category_name']): ?>
diff --git a/app/Template/task/public.php b/app/Template/task/public.php
index 2d95e6db..d7acef9f 100644
--- a/app/Template/task/public.php
+++ b/app/Template/task/public.php
@@ -10,6 +10,13 @@
'is_public' => true
)) ?>
+ <?= $this->render('tasklink/show', array(
+ 'task' => $task,
+ 'links' => $links,
+ 'project' => $project,
+ 'not_editable' => true
+ )) ?>
+
<?= $this->render('subtask/show', array(
'task' => $task,
'subtasks' => $subtasks,
diff --git a/app/Template/task/show.php b/app/Template/task/show.php
index b8243cc6..1ff2ef43 100644
--- a/app/Template/task/show.php
+++ b/app/Template/task/show.php
@@ -1,7 +1,8 @@
<?= $this->render('task/details', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task/time', array('task' => $task, 'values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?>
<?= $this->render('task/show_description', array('task' => $task)) ?>
+<?= $this->render('tasklink/show', array('task' => $task, 'links' => $links)) ?>
<?= $this->render('subtask/show', array('task' => $task, 'subtasks' => $subtasks)) ?>
<?= $this->render('task/timesheet', array('task' => $task)) ?>
<?= $this->render('file/show', array('task' => $task, 'files' => $files)) ?>
-<?= $this->render('task/comments', array('task' => $task, 'comments' => $comments, 'project' => $project)) ?> \ No newline at end of file
+<?= $this->render('task/comments', array('task' => $task, 'comments' => $comments, 'project' => $project)) ?>
diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php
index e85a1671..f41be14d 100644
--- a/app/Template/task/sidebar.php
+++ b/app/Template/task/sidebar.php
@@ -19,6 +19,9 @@
<?= $this->a(t('Add a sub-task'), 'subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
<li>
+ <?= $this->a(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
<?= $this->a(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
<li>
diff --git a/app/Template/tasklink/create.php b/app/Template/tasklink/create.php
new file mode 100644
index 00000000..fb438cd8
--- /dev/null
+++ b/app/Template/tasklink/create.php
@@ -0,0 +1,27 @@
+<div class="page-header">
+ <h2><?= t('Add a new link') ?></h2>
+</div>
+
+<form action="<?= $this->u('tasklink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off">
+
+ <?= $this->formCsrf() ?>
+ <?= $this->formHidden('task_id', $values) ?>
+ <?= $this->formHidden('opposite_task_id', $values) ?>
+
+ <?= $this->formLabel(t('Label'), 'link_id') ?>
+ <?= $this->formSelect('link_id', $labels, $values, $errors) ?>
+
+ <?= $this->formLabel(t('Task'), 'title') ?>
+ <?= $this->formText(
+ 'title',
+ $values,
+ $errors,
+ array('required', 'data-dst-field="opposite_task_id"', 'data-search-url="'.$this->u('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"'),
+ 'task-autocomplete') ?>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <?= t('or') ?>
+ <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </div>
+</form> \ No newline at end of file
diff --git a/app/Template/tasklink/remove.php b/app/Template/tasklink/remove.php
new file mode 100644
index 00000000..9322ec24
--- /dev/null
+++ b/app/Template/tasklink/remove.php
@@ -0,0 +1,15 @@
+<div class="page-header">
+ <h2><?= t('Remove a link') ?></h2>
+</div>
+
+<div class="confirm">
+ <p class="alert alert-info">
+ <?= t('Do you really want to remove this link with task #%d?', $link['opposite_task_id']) ?>
+ </p>
+
+ <div class="form-actions">
+ <?= $this->a(t('Yes'), 'tasklink', 'remove', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), true, 'btn btn-red') ?>
+ <?= t('or') ?>
+ <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/app/Template/tasklink/show.php b/app/Template/tasklink/show.php
new file mode 100644
index 00000000..ca4e4383
--- /dev/null
+++ b/app/Template/tasklink/show.php
@@ -0,0 +1,41 @@
+<?php if (! empty($links)): ?>
+<div class="page-header">
+ <h2><?= t('Links') ?></h2>
+</div>
+<table class="table-fixed" id="links">
+ <tr>
+ <th class="column-30"><?= t('Label') ?></th>
+ <th class="column-60"><?= t('Task') ?></th>
+ <?php if (! isset($not_editable)): ?>
+ <th><?= t('Action') ?></th>
+ <?php endif ?>
+ </tr>
+ <?php foreach ($links as $link): ?>
+ <tr>
+ <td><?= t('This task') ?> <strong><?= t($link['label']) ?></strong></td>
+ <?php if (! isset($not_editable)): ?>
+ <td>
+ <?= $this->a(
+ $this->e('#'.$link['task_id'].' - '.$link['title']),
+ 'task', 'show', array('task_id' => $link['task_id'], 'project_id' => $link['project_id']),
+ false,
+ $link['is_active'] ? '' : 'task-link-closed'
+ ) ?>
+ </td>
+ <td>
+ <?= $this->a(t('Remove'), 'tasklink', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </td>
+ <?php else: ?>
+ <td>
+ <?= $this->a(
+ $this->e('#'.$link['task_id'].' - '.$link['title']),
+ 'task', 'readonly', array('task_id' => $link['task_id'], 'token' => $project['token']),
+ false,
+ $link['is_active'] ? '' : 'task-link-closed'
+ ) ?>
+ </td>
+ <?php endif ?>
+ </tr>
+ <?php endforeach ?>
+</table>
+<?php endif ?> \ No newline at end of file