summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/analytic/layout.php2
-rw-r--r--app/Template/app/dashboard.php8
-rw-r--r--app/Template/app/projects.php10
-rw-r--r--app/Template/board/edit.php8
-rw-r--r--app/Template/board/files.php41
-rw-r--r--app/Template/board/filters.php26
-rw-r--r--app/Template/board/show.php3
-rw-r--r--app/Template/board/swimlane.php2
-rw-r--r--app/Template/board/task_footer.php14
-rw-r--r--app/Template/board/task_menu.php9
-rw-r--r--app/Template/board/task_private.php4
-rw-r--r--app/Template/board/task_public.php4
-rw-r--r--app/Template/budget/breakdown.php34
-rw-r--r--app/Template/budget/create.php51
-rw-r--r--app/Template/budget/index.php35
-rw-r--r--app/Template/budget/remove.php13
-rw-r--r--app/Template/config/about.php1
-rw-r--r--app/Template/config/application.php3
-rw-r--r--app/Template/file/show.php55
-rw-r--r--app/Template/hourlyrate/index.php46
-rw-r--r--app/Template/hourlyrate/remove.php13
-rw-r--r--app/Template/layout.php14
-rw-r--r--app/Template/project/edit.php29
-rw-r--r--app/Template/project/index.php8
-rw-r--r--app/Template/project/show.php12
-rw-r--r--app/Template/project/sidebar.php5
-rw-r--r--app/Template/subtask/create.php2
-rw-r--r--app/Template/subtask/edit.php2
-rw-r--r--app/Template/subtask/show.php12
-rw-r--r--app/Template/task/new.php4
-rw-r--r--app/Template/task/show.php6
-rw-r--r--app/Template/task/time_tracking.php10
-rw-r--r--app/Template/tasklink/create.php8
-rw-r--r--app/Template/tasklink/show.php22
-rw-r--r--app/Template/timetable/index.php44
-rw-r--r--app/Template/timetable_day/index.php45
-rw-r--r--app/Template/timetable_day/remove.php13
-rw-r--r--app/Template/timetable_extra/index.php56
-rw-r--r--app/Template/timetable_extra/remove.php13
-rw-r--r--app/Template/timetable_off/index.php56
-rw-r--r--app/Template/timetable_off/remove.php13
-rw-r--r--app/Template/timetable_week/index.php46
-rw-r--r--app/Template/timetable_week/remove.php13
-rw-r--r--app/Template/user/sidebar.php8
-rw-r--r--app/Template/user/timesheet.php10
45 files changed, 743 insertions, 90 deletions
diff --git a/app/Template/analytic/layout.php b/app/Template/analytic/layout.php
index 8c946699..c6e3a962 100644
--- a/app/Template/analytic/layout.php
+++ b/app/Template/analytic/layout.php
@@ -1,5 +1,5 @@
<?= $this->js('assets/js/vendor/d3.v3.4.8.min.js') ?>
-<?= $this->js('assets/js/vendor/dimple.v2.1.0.min.js') ?>
+<?= $this->js('assets/js/vendor/dimple.v2.1.2.min.js') ?>
<section id="main">
<div class="page-header">
diff --git a/app/Template/app/dashboard.php b/app/Template/app/dashboard.php
index e6f124e1..5b83540c 100644
--- a/app/Template/app/dashboard.php
+++ b/app/Template/app/dashboard.php
@@ -11,8 +11,8 @@
<li><i class="fa fa-cog fa-fw"></i><?= $this->a(t('Settings'), 'config', 'index') ?></li>
<?php endif ?>
<li>
- <ul class="dropdown">
- <li>
+ <span class="dropdown">
+ <span>
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Change dashboard view') ?></a>
<ul>
<li>
@@ -31,8 +31,8 @@
<a href="#" class="dashboard-toggle" data-toggle="activities"><?= t('Show/hide activities') ?></a>
</li>
</ul>
- </li>
- </ul>
+ </span>
+ </span>
</li>
</ul>
</div>
diff --git a/app/Template/app/projects.php b/app/Template/app/projects.php
index 4740c4b8..b2744644 100644
--- a/app/Template/app/projects.php
+++ b/app/Template/app/projects.php
@@ -17,9 +17,15 @@
<?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')) ?>&nbsp;
<?php endif ?>
-
+
<?= $this->a('<i class="fa fa-calendar"></i>', 'calendar', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Calendar')) ?>&nbsp;
+
<?= $this->a($this->e($project['name']), 'board', 'show', array('project_id' => $project['id'])) ?>
+ <?php if (! empty($project['description'])): ?>
+ <span class="column-tooltip" title='<?= $this->e($this->markdown($project['description'])) ?>'>
+ <i class="fa fa-info-circle"></i>
+ </span>
+ <?php endif ?>
</td>
<td class="dashboard-project-stats">
<?php foreach ($project['columns'] as $column): ?>
@@ -32,4 +38,4 @@
</table>
<?= $paginator ?>
-<?php endif ?> \ No newline at end of file
+<?php endif ?>
diff --git a/app/Template/board/edit.php b/app/Template/board/edit.php
index b9b1788a..a6df1000 100644
--- a/app/Template/board/edit.php
+++ b/app/Template/board/edit.php
@@ -13,7 +13,7 @@
<tr>
<td class="column-60"><?= $this->e($column['title']) ?>
<?php if (! empty($column['description'])): ?>
- <span class="column-tooltip" title="<?= $this->markdown($column['description']) ?>">
+ <span class="column-tooltip" title='<?= $this->e($this->markdown($column['description'])) ?>'>
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
@@ -52,12 +52,12 @@
<?= $this->formLabel(t('Title'), 'title') ?>
<?= $this->formText('title', $values, $errors, array('required', 'maxlength="50"')) ?>
-
+
<?= $this->formLabel(t('Task limit'), 'task_limit') ?>
<?= $this->formNumber('task_limit', $values, $errors) ?>
-
+
<?= $this->formLabel(t('Description'), 'description') ?>
-
+
<div class="form-tabs">
<div class="write-area">
<?= $this->formTextarea('description', $values, $errors) ?>
diff --git a/app/Template/board/files.php b/app/Template/board/files.php
index 278b906b..851a118d 100644
--- a/app/Template/board/files.php
+++ b/app/Template/board/files.php
@@ -1,14 +1,31 @@
<section>
- <?php foreach ($files as $file): ?>
- <i class="fa fa-file-o fa-fw"></i>
-
- <?= $this->a(
- $this->e($file['name']),
- 'file',
- 'download',
- array('file_id' => $file['id'], 'task_id' => $file['task_id'], 'project_id' => $task['project_id'])
- ) ?>
-
- <br/>
- <?php endforeach ?>
+ <table>
+ <?php if (! empty($images)): ?>
+ <?php foreach ($images as $file): ?>
+ <tr>
+ <td class="column-70">
+ <i class="fa fa-file-image-o fa-fw"></i>
+ <?= $this->e($file['name']) ?>
+ </td>
+ <td>
+ <i class="fa fa-download"></i> <?= $this->a(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ <i class="fa fa-eye"></i> <?= $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?>
+ </td>
+ </tr>
+ <?php endforeach ?>
+ <?php endif ?>
+ <?php if (! empty($files)): ?>
+ <?php foreach ($files as $file): ?>
+ <tr>
+ <td>
+ <i class="fa <?= $this->getFileIcon($file['name']) ?> fa-fw"></i>
+ <?= $this->e($file['name']) ?>
+ </td>
+ <td>
+ <i class="fa fa-download"></i> <?= $this->a(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ </td>
+ </tr>
+ <?php endforeach ?>
+ <?php endif ?>
+ </table>
</section>
diff --git a/app/Template/board/filters.php b/app/Template/board/filters.php
index a0de5fd9..47304d7d 100644
--- a/app/Template/board/filters.php
+++ b/app/Template/board/filters.php
@@ -1,8 +1,8 @@
<div class="page-header">
<ul class="board-filters">
<li>
- <ul class="dropdown">
- <li>
+ <span class="dropdown">
+ <span>
<i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Actions') ?></a>
<ul>
<li>
@@ -14,6 +14,14 @@
</span>
</li>
<li>
+ <span class="filter-compact">
+ <i class="fa fa-th fa-fw"></i> <a href="#" class="filter-toggle-scrolling"><?= 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"><?= t('Horizontal scrolling') ?></a>
+ </span>
+ </li>
+ <li>
<i class="fa fa-search fa-fw"></i>
<?= $this->a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
</li>
@@ -40,22 +48,26 @@
<?= $this->a(t('Analytics'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?>
</li>
<li>
+ <i class="fa fa-pie-chart fa-fw"></i>
+ <?= $this->a(t('Budget'), 'budget', 'index', array('project_id' => $project['id'])) ?>
+ </li>
+ <li>
<i class="fa fa-cog fa-fw"></i>
<?= $this->a(t('Configure'), 'project', 'show', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
</ul>
- </li>
- </ul>
+ </span>
+ </span>
</li>
<li>
- <?= $this->formSelect('user_id', $users, array(), array(), array('data-placeholder="'.t('Filter by user').'"'), 'apply-filters chosen-select') ?>
+ <?= $this->formSelect('user_id', $users, array(), array(), array('data-placeholder="'.t('Filter by user').'"', 'data-notfound="'.t('No results match:').'"'), 'apply-filters chosen-select') ?>
</li>
<li>
- <?= $this->formSelect('category_id', $categories, array(), array(), array('data-placeholder="'.t('Filter by category').'"'), 'apply-filters chosen-select') ?>
+ <?= $this->formSelect('category_id', $categories, array(), array(), array('data-placeholder="'.t('Filter by category').'"', 'data-notfound="'.t('No results match:').'"'), 'apply-filters chosen-select') ?>
</li>
<li>
- <select id="more-filters" multiple data-placeholder="<?= t('More filters') ?>" class="apply-filters chosen-select hide-mobile">
+ <select id="more-filters" multiple data-placeholder="<?= t('More filters') ?>" data-notfound="<?= t('No results match:') ?>" class="apply-filters chosen-select hide-mobile">
<option value=""></option>
<option value="filter-due-date"><?= t('Filter by due date') ?></option>
<option value="filter-recent"><?= t('Filter recently updated') ?></option>
diff --git a/app/Template/board/show.php b/app/Template/board/show.php
index f1607d26..6f81fe2e 100644
--- a/app/Template/board/show.php
+++ b/app/Template/board/show.php
@@ -1,8 +1,9 @@
<div id="board-container">
<?php if (isset($not_editable)): ?>
- <table id="board">
+ <table id="board" class="board-project-<?= $project['id'] ?>">
<?php else: ?>
<table id="board"
+ class="board-project-<?= $project['id'] ?>"
data-project-id="<?= $project['id'] ?>"
data-check-interval="<?= $board_private_refresh_interval ?>"
data-save-url="<?= $this->u('board', 'save', array('project_id' => $project['id'])) ?>"
diff --git a/app/Template/board/swimlane.php b/app/Template/board/swimlane.php
index ec298e24..744610ab 100644
--- a/app/Template/board/swimlane.php
+++ b/app/Template/board/swimlane.php
@@ -28,7 +28,7 @@
<?= $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->e($this->markdown($column['description'])) ?>'>
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php
index d413692c..635ed31f 100644
--- a/app/Template/board/task_footer.php
+++ b/app/Template/board/task_footer.php
@@ -22,19 +22,19 @@
<?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>
+ <span title="<?= t('Links') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'tasklinks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-code-fork"></i>&nbsp;<?= $task['nb_links'] ?></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>
+ <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'])) ?>"><i class="fa fa-bars"></i>&nbsp;<?= round($task['nb_completed_subtasks']/$task['nb_subtasks']*100, 0).'%' ?></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 title="<?= t('Attachments') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-paperclip"></i>&nbsp;<?= $task['nb_files'] ?></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>
+ <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'])) ?>"><i class="fa fa-comment-o"></i>&nbsp;<?= $task['nb_comments'] ?></span>
<?php endif ?>
<?php if (! empty($task['description'])): ?>
@@ -42,4 +42,8 @@
<i class="fa fa-file-text-o"></i>
</span>
<?php endif ?>
-</div> \ No newline at end of file
+
+ <?php if ($task['score']): ?>
+ <span class="task-score"><?= $this->e($task['score']) ?></span>
+ <?php endif ?>
+</div>
diff --git a/app/Template/board/task_menu.php b/app/Template/board/task_menu.php
index e7e0f419..35104b66 100644
--- a/app/Template/board/task_menu.php
+++ b/app/Template/board/task_menu.php
@@ -1,13 +1,14 @@
-<ul class="dropdown">
- <li>
+<span class="dropdown">
+ <span>
<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-comment-o"></i> <?= $this->a(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
+ <li><i class="fa fa-code-fork"></i> <?= $this->a(t('Add a link'), 'tasklink', 'create', 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> \ No newline at end of file
+ </span>
+</span> \ No newline at end of file
diff --git a/app/Template/board/task_private.php b/app/Template/board/task_private.php
index 71d94fbf..9e7358f0 100644
--- a/app/Template/board/task_private.php
+++ b/app/Template/board/task_private.php
@@ -31,10 +31,6 @@
) ?>
</span>
- <?php if ($task['score']): ?>
- <span class="task-score"><?= $this->e($task['score']) ?></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>
diff --git a/app/Template/board/task_public.php b/app/Template/board/task_public.php
index 650b956d..4e3ad18c 100644
--- a/app/Template/board/task_public.php
+++ b/app/Template/board/task_public.php
@@ -18,10 +18,6 @@
<?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>
diff --git a/app/Template/budget/breakdown.php b/app/Template/budget/breakdown.php
new file mode 100644
index 00000000..d4168406
--- /dev/null
+++ b/app/Template/budget/breakdown.php
@@ -0,0 +1,34 @@
+<div class="page-header">
+ <h2><?= t('Budget') ?></h2>
+ <ul>
+ <li><?= $this->a(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?></li>
+ <li><?= $this->a(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?></li>
+ </ul>
+</div>
+
+<?php if ($paginator->isEmpty()): ?>
+ <p class="alert"><?= t('There is nothing to show.') ?></p>
+<?php else: ?>
+ <table class="table-fixed">
+ <tr>
+ <th class="column-20"><?= $paginator->order(t('Task'), 'task_title') ?></th>
+ <th class="column-25"><?= $paginator->order(t('Subtask'), 'subtask_title') ?></th>
+ <th class="column-20"><?= $paginator->order(t('User'), 'username') ?></th>
+ <th class="column-10"><?= t('Cost') ?></th>
+ <th class="column-10"><?= $paginator->order(t('Time spent'), 'time_spent') ?></th>
+ <th class="column-15"><?= $paginator->order(t('Date'), 'start') ?></th>
+ </tr>
+ <?php foreach ($paginator->getCollection() as $record): ?>
+ <tr>
+ <td><?= $this->a($this->e($record['task_title']), 'task', 'show', array('project_id' => $project['id'], 'task_id' => $record['task_id'])) ?></td>
+ <td><?= $this->a($this->e($record['subtask_title']), 'task', 'show', array('project_id' => $project['id'], 'task_id' => $record['task_id'])) ?></td>
+ <td><?= $this->e($record['name'] ?: $record['username']) ?></td>
+ <td><?= n($record['cost']) ?></td>
+ <td><?= n($record['time_spent']).' '.t('hours') ?></td>
+ <td><?= dt('%B %e, %Y', $record['start']) ?></td>
+ </tr>
+ <?php endforeach ?>
+ </table>
+
+ <?= $paginator ?>
+<?php endif ?> \ No newline at end of file
diff --git a/app/Template/budget/create.php b/app/Template/budget/create.php
new file mode 100644
index 00000000..5a919ce6
--- /dev/null
+++ b/app/Template/budget/create.php
@@ -0,0 +1,51 @@
+<div class="page-header">
+ <h2><?= t('Budget') ?></h2>
+ <ul>
+ <li><?= $this->a(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?></li>
+ <li><?= $this->a(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?></li>
+ </ul>
+</div>
+
+<?php if (! empty($lines)): ?>
+<table class="table-fixed table-stripped">
+ <tr>
+ <th class="column-20"><?= t('Budget line') ?></th>
+ <th class="column-20"><?= t('Date') ?></th>
+ <th><?= t('Comment') ?></th>
+ <th><?= t('Action') ?></th>
+ </tr>
+ <?php foreach ($lines as $line): ?>
+ <tr>
+ <td><?= n($line['amount']) ?></td>
+ <td><?= $this->e($line['date']) ?></td>
+ <td><?= $this->e($line['comment']) ?></td>
+ <td>
+ <?= $this->a(t('Remove'), 'budget', 'confirm', array('project_id' => $project['id'], 'budget_id' => $line['id'])) ?>
+ </td>
+ </tr>
+ <?php endforeach ?>
+</table>
+
+<h3><?= t('New budget line') ?></h3>
+<?php endif ?>
+
+<form method="post" action="<?= $this->u('budget', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
+
+ <?= $this->formCsrf() ?>
+
+ <?= $this->formHidden('id', $values) ?>
+ <?= $this->formHidden('project_id', $values) ?>
+
+ <?= $this->formLabel(t('Amount'), 'amount') ?>
+ <?= $this->formText('amount', $values, $errors, array('required'), 'form-numeric') ?>
+
+ <?= $this->formLabel(t('Date'), 'date') ?>
+ <?= $this->formText('date', $values, $errors, array('required'), 'form-date') ?>
+
+ <?= $this->formLabel(t('Comment'), 'comment') ?>
+ <?= $this->formText('comment', $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/budget/index.php b/app/Template/budget/index.php
new file mode 100644
index 00000000..442a6b64
--- /dev/null
+++ b/app/Template/budget/index.php
@@ -0,0 +1,35 @@
+<?= $this->js('assets/js/vendor/d3.v3.4.8.min.js') ?>
+<?= $this->js('assets/js/vendor/dimple.v2.1.2.min.js') ?>
+
+<div class="page-header">
+ <h2><?= t('Budget') ?></h2>
+ <ul>
+ <li><?= $this->a(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?></li>
+ <li><?= $this->a(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?></li>
+ </ul>
+</div>
+
+<?php if (! empty($daily_budget)): ?>
+<div id="budget-chart">
+ <div id="chart"
+ data-serie='<?= json_encode($daily_budget) ?>'
+ data-labels='<?= json_encode(array('in' => t('Budget line'), 'out' => t('Expenses'), 'left' => t('Remaining'), 'value' => t('Amount'), 'date' => t('Date'), 'type' => t('Type'))) ?>'></div>
+</div>
+<hr/>
+<table class="table-fixed table-stripped">
+ <tr>
+ <th><?= t('Date') ?></td>
+ <th><?= t('Budget line') ?></td>
+ <th><?= t('Expenses') ?></td>
+ <th><?= t('Remaining') ?></td>
+ </tr>
+ <?php foreach ($daily_budget as $line): ?>
+ <tr>
+ <td><?= $this->e($line['date']) ?></td>
+ <td><?= n($line['in']) ?></td>
+ <td><?= n($line['out']) ?></td>
+ <td><?= n($line['left']) ?></td>
+ </tr>
+ <?php endforeach ?>
+</table>
+<?php endif ?>
diff --git a/app/Template/budget/remove.php b/app/Template/budget/remove.php
new file mode 100644
index 00000000..97f9c3dc
--- /dev/null
+++ b/app/Template/budget/remove.php
@@ -0,0 +1,13 @@
+<div class="page-header">
+ <h2><?= t('Remove budget line') ?></h2>
+</div>
+
+<div class="confirm">
+ <p class="alert alert-info"><?= t('Do you really want to remove this budget line?') ?></p>
+
+ <div class="form-actions">
+ <?= $this->a(t('Yes'), 'budget', 'remove', array('project_id' => $project['id'], 'budget_id' => $budget_id), true, 'btn btn-red') ?>
+ <?= t('or') ?>
+ <?= $this->a(t('cancel'), 'budget', 'create', array('project_id' => $project['id'])) ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/app/Template/config/about.php b/app/Template/config/about.php
index f6474e21..b6ed43e5 100644
--- a/app/Template/config/about.php
+++ b/app/Template/config/about.php
@@ -46,6 +46,7 @@
<ul>
<li><?= t('New task') ?> = <strong>n</strong></li>
<li><?= t('Expand/collapse tasks') ?> = <strong>s</strong></li>
+ <li><?= t('Compact/wide view') ?> = <strong>c</strong></li>
</ul>
<h3><?= t('Application') ?></h3>
<ul>
diff --git a/app/Template/config/application.php b/app/Template/config/application.php
index 26f3743e..f6c9db94 100644
--- a/app/Template/config/application.php
+++ b/app/Template/config/application.php
@@ -20,6 +20,9 @@
<?= $this->formSelect('application_date_format', $date_formats, $values, $errors) ?><br/>
<p class="form-help"><?= t('ISO format is always accepted, example: "%s" and "%s"', date('Y-m-d'), date('Y_m_d')) ?></p>
+ <?= $this->formLabel(t('Custom Stylesheet'), 'application_stylesheet') ?>
+ <?= $this->formTextarea('application_stylesheet', $values, $errors) ?><br/>
+
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
</div>
diff --git a/app/Template/file/show.php b/app/Template/file/show.php
index 298976f6..b181ab54 100644
--- a/app/Template/file/show.php
+++ b/app/Template/file/show.php
@@ -1,23 +1,48 @@
-<?php if (! empty($files)): ?>
+<?php if (! empty($files) || ! empty($images)): ?>
<div id="attachments" class="task-show-section">
<div class="page-header">
<h2><?= t('Attachments') ?></h2>
</div>
+ <?php if (!empty($images)): ?>
+ <h3><?= t('Images') ?></h3>
+ <ul class="task-show-images">
+ <?php foreach ($images as $file): ?>
+ <li>
+ <div class="img_container">
+ <img src="<?= $this->u('file', 'thumbnail', array('width' => 250, 'file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" alt="<?= $this->e($file['name']) ?>"/>
+ </div>
+ <p>
+ <?= $this->e($file['name']) ?>
+ </p>
+ <span class="task-show-file-actions task-show-image-actions">
+ <i class="fa fa-eye"></i> <?= $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?>
+ <i class="fa fa-trash"></i> <?= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ <i class="fa fa-download"></i> <?= $this->a(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ </span>
+ </li>
+ <?php endforeach ?>
+ </ul>
+ <?php endif ?>
- <ul class="task-show-files">
- <?php foreach ($files as $file): ?>
- <li>
- <?= $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, 'popover') ?>,
- <?php endif ?>
- <?= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
- </span>
- </li>
- <?php endforeach ?>
- </ul>
-
+ <?php if (! empty($files)): ?>
+ <h3><?= t('Files') ?></h3>
+ <table class="task-show-file-table">
+ <?php foreach ($files as $file): ?>
+ <tr>
+ <td><i class="fa <?= $this->getFileIcon($file['name']) ?> fa-fw"></i></td>
+ <td>
+ <?= $this->e($file['name']) ?>
+ </td>
+ <td>
+ <span class="task-show-file-actions">
+ <i class="fa fa-trash"></i> <?= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ <i class="fa fa-download"></i> <?= $this->a(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ </span>
+ </td>
+ </tr>
+ <?php endforeach ?>
+ </table>
+ <?php endif ?>
</div>
<?php endif ?> \ No newline at end of file
diff --git a/app/Template/hourlyrate/index.php b/app/Template/hourlyrate/index.php
new file mode 100644
index 00000000..9d0b77c8
--- /dev/null
+++ b/app/Template/hourlyrate/index.php
@@ -0,0 +1,46 @@
+<div class="page-header">
+ <h2><?= t('Hourly rates') ?></h2>
+</div>
+
+<?php if (! empty($rates)): ?>
+
+<table>
+ <tr>
+ <th><?= t('Hourly rate') ?></th>
+ <th><?= t('Currency') ?></th>
+ <th><?= t('Effective date') ?></th>
+ <th><?= t('Action') ?></th>
+ </tr>
+ <?php foreach ($rates as $rate): ?>
+ <tr>
+ <td><?= n($rate['rate']) ?></td>
+ <td><?= $rate['currency'] ?></td>
+ <td><?= dt('%b %e, %Y', $rate['date_effective']) ?></td>
+ <td>
+ <?= $this->a(t('Remove'), 'hourlyrate', 'confirm', array('user_id' => $user['id'], 'rate_id' => $rate['id'])) ?>
+ </td>
+ </tr>
+ <?php endforeach ?>
+</table>
+
+<h3><?= t('Add new rate') ?></h3>
+<?php endif ?>
+
+<form method="post" action="<?= $this->u('hourlyrate', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
+
+ <?= $this->formHidden('user_id', $values) ?>
+ <?= $this->formCsrf() ?>
+
+ <?= $this->formLabel(t('Hourly rate'), 'rate') ?>
+ <?= $this->formText('rate', $values, $errors, array('required'), 'form-numeric') ?>
+
+ <?= $this->formLabel(t('Currency'), 'currency') ?>
+ <?= $this->formSelect('currency', $currencies_list, $values, $errors, array('required')) ?>
+
+ <?= $this->formLabel(t('Effective date'), 'date_effective') ?>
+ <?= $this->formText('date_effective', $values, $errors, array('required'), 'form-date') ?>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ </div>
+</form>
diff --git a/app/Template/hourlyrate/remove.php b/app/Template/hourlyrate/remove.php
new file mode 100644
index 00000000..7f22728e
--- /dev/null
+++ b/app/Template/hourlyrate/remove.php
@@ -0,0 +1,13 @@
+<div class="page-header">
+ <h2><?= t('Remove hourly rate') ?></h2>
+</div>
+
+<div class="confirm">
+ <p class="alert alert-info"><?= t('Do you really want to remove this hourly rate?') ?></p>
+
+ <div class="form-actions">
+ <?= $this->a(t('Yes'), 'hourlyrate', 'remove', array('user_id' => $user['id'], 'rate_id' => $rate_id), true, 'btn btn-red') ?>
+ <?= t('or') ?>
+ <?= $this->a(t('cancel'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/app/Template/layout.php b/app/Template/layout.php
index ad4c4084..ec9f2288 100644
--- a/app/Template/layout.php
+++ b/app/Template/layout.php
@@ -17,6 +17,10 @@
<?= $this->css($this->u('app', 'colors'), false) ?>
<?= $this->css('assets/css/app.css') ?>
+ <?php if ($this->config->get('application_stylesheet')): ?>
+ <style><?= $this->config->get('application_stylesheet') ?></style>
+ <?php endif ?>
+
<link rel="icon" type="image/png" href="assets/img/favicon.png">
<link rel="apple-touch-icon" href="assets/img/touch-icon-iphone.png">
<link rel="apple-touch-icon" sizes="72x72" href="assets/img/touch-icon-ipad.png">
@@ -35,11 +39,17 @@
<?php else: ?>
<header>
<nav>
- <h1><?= $this->a('K<span>B</span>', 'app', 'index', array(), false, 'logo', 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)) ?>
+ <?php if (! empty($description)): ?>
+ <span class="column-tooltip" title='<?= $this->e($this->markdown($description)) ?>'>
+ <i class="fa fa-info-circle"></i>
+ </span>
+ <?php endif ?>
+ </h1>
<ul>
<?php if (isset($board_selector) && ! empty($board_selector)): ?>
<li>
- <select id="board-selector" data-placeholder="<?= t('Display another project') ?>" data-board-url="<?= $this->u('board', 'show', array('project_id' => 'PROJECT_ID')) ?>">
+ <select id="board-selector" data-notfound="<?= t('No results match:') ?>" data-placeholder="<?= t('Display another project') ?>" data-board-url="<?= $this->u('board', 'show', array('project_id' => 'PROJECT_ID')) ?>">
<option value=""></option>
<?php foreach($board_selector as $board_id => $board_name): ?>
<option value="<?= $board_id ?>"><?= $this->e($board_name) ?></option>
diff --git a/app/Template/project/edit.php b/app/Template/project/edit.php
index a1b945cd..c1f98315 100644
--- a/app/Template/project/edit.php
+++ b/app/Template/project/edit.php
@@ -1,7 +1,7 @@
<div class="page-header">
<h2><?= t('Edit project') ?></h2>
</div>
-<form method="post" action="<?= $this->u('project', 'update', array('project_id' => $values['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->u('project', 'update', array('project_id' => $project['id'])) ?>" autocomplete="off">
<?= $this->formCsrf() ?>
<?= $this->formHidden('id', $values) ?>
@@ -9,7 +9,32 @@
<?= $this->formLabel(t('Name'), 'name') ?>
<?= $this->formText('name', $values, $errors, array('required', 'maxlength="50"')) ?>
+ <?= $this->formLabel(t('Description'), 'description') ?>
+
+ <div class="form-tabs">
+
+ <div class="write-area">
+ <?= $this->formTextarea('description', $values, $errors) ?>
+ </div>
+ <div class="preview-area">
+ <div class="markdown"></div>
+ </div>
+ <ul class="form-tabs-nav">
+ <li class="form-tab form-tab-selected">
+ <i class="fa fa-pencil-square-o fa-fw"></i><a id="markdown-write" href="#"><?= t('Write') ?></a>
+ </li>
+ <li class="form-tab">
+ <a id="markdown-preview" href="#"><i class="fa fa-eye fa-fw"></i><?= t('Preview') ?></a>
+ </li>
+ </ul>
+ </div>
+ <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
+
+ <?php if ($project['is_private'] == 1 && $this->userSession->isAdmin()): ?>
+ <?= $this->formCheckbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?>
+ <?php endif ?>
+
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
</div>
-</form> \ No newline at end of file
+</form>
diff --git a/app/Template/project/index.php b/app/Template/project/index.php
index a36a9ce1..05a7d955 100644
--- a/app/Template/project/index.php
+++ b/app/Template/project/index.php
@@ -39,7 +39,13 @@
<?php if ($project['is_private']): ?>
<i class="fa fa-lock fa-fw"></i>
<?php endif ?>
+
<?= $this->a($this->e($project['name']), 'project', 'show', array('project_id' => $project['id'])) ?>
+ <?php if (! empty($project['description'])): ?>
+ <span class="column-tooltip" title='<?= $this->e($this->markdown($project['description'])) ?>'>
+ <i class="fa fa-info-circle"></i>
+ </span>
+ <?php endif ?>
</td>
<td class="dashboard-project-stats">
<?php foreach ($project['columns'] as $column): ?>
@@ -54,4 +60,4 @@
<?= $paginator ?>
<?php endif ?>
</section>
-</section> \ No newline at end of file
+</section>
diff --git a/app/Template/project/show.php b/app/Template/project/show.php
index b8bfd510..9c6cd1a8 100644
--- a/app/Template/project/show.php
+++ b/app/Template/project/show.php
@@ -50,7 +50,7 @@
<td>
<?= $this->e($column['title']) ?>
<?php if (! empty($column['description'])): ?>
- <span class="column-tooltip" title="<?= $this->markdown($column['description']) ?>">
+ <span class="column-tooltip" title='<?= $this->e($this->markdown($column['description'])) ?>'>
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
@@ -60,3 +60,13 @@
</tr>
<?php endforeach ?>
</table>
+
+<?php if (! empty($project['description'])): ?>
+ <div class="page-header">
+ <h2><?= t('Description') ?></h2>
+ </div>
+
+ <article class="markdown">
+ <?= $this->markdown($project['description']) ?>
+ </article>
+<?php endif ?>
diff --git a/app/Template/project/sidebar.php b/app/Template/project/sidebar.php
index f4809fde..4afc8ba9 100644
--- a/app/Template/project/sidebar.php
+++ b/app/Template/project/sidebar.php
@@ -33,7 +33,10 @@
<?= $this->a(t('Automatic actions'), 'action', 'index', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->a(t('Duplicate'), 'project', 'duplicate', array('project_id' => $project['id']), true) ?>
+ <?= $this->a(t('Duplicate'), 'project', 'duplicate', array('project_id' => $project['id'])) ?>
+ </li>
+ <li>
+ <?= $this->a(t('Budget'), 'budget', 'index', array('project_id' => $project['id'])) ?>
</li>
<li>
<?php if ($project['is_active']): ?>
diff --git a/app/Template/subtask/create.php b/app/Template/subtask/create.php
index be7fc311..8c5aae11 100644
--- a/app/Template/subtask/create.php
+++ b/app/Template/subtask/create.php
@@ -9,7 +9,7 @@
<?= $this->formHidden('task_id', $values) ?>
<?= $this->formLabel(t('Title'), 'title') ?>
- <?= $this->formText('title', $values, $errors, array('required', 'autofocus', 'maxlength="50"')) ?><br/>
+ <?= $this->formText('title', $values, $errors, array('required', 'autofocus', 'maxlength="255"')) ?><br/>
<?= $this->formLabel(t('Assignee'), 'user_id') ?>
<?= $this->formSelect('user_id', $users_list, $values, $errors) ?><br/>
diff --git a/app/Template/subtask/edit.php b/app/Template/subtask/edit.php
index f34d9532..3058ff44 100644
--- a/app/Template/subtask/edit.php
+++ b/app/Template/subtask/edit.php
@@ -10,7 +10,7 @@
<?= $this->formHidden('task_id', $values) ?>
<?= $this->formLabel(t('Title'), 'title') ?>
- <?= $this->formText('title', $values, $errors, array('required', 'autofocus', 'maxlength="50"')) ?><br/>
+ <?= $this->formText('title', $values, $errors, array('required', 'autofocus', 'maxlength="255"')) ?><br/>
<?= $this->formLabel(t('Assignee'), 'user_id') ?>
<?= $this->formSelect('user_id', $users_list, $values, $errors) ?><br/>
diff --git a/app/Template/subtask/show.php b/app/Template/subtask/show.php
index 1d55d1ee..c7ac652a 100644
--- a/app/Template/subtask/show.php
+++ b/app/Template/subtask/show.php
@@ -20,7 +20,7 @@
<?php if (! isset($not_editable)): ?>
<?= $this->toggleSubtaskStatus($subtask, 'task') ?>
<?php else: ?>
- <?= $this->render('subtask/icons', array('subtask' => $subtask)) . $this->e($subtask['status_name']) ?>
+ <?= $this->render('subtask/icons', array('subtask' => $subtask)) . $this->e($subtask['title']) ?>
<?php endif ?>
</td>
<td>
@@ -40,6 +40,16 @@
<?php if (! isset($not_editable)): ?>
<td>
<ul>
+ <?php if ($subtask['position'] > 1): ?>
+ <li>
+ <?= $this->a(t('Move Up'), 'subtask', 'movePosition', array('project_id' => $project['id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'direction' => 'up'), true) ?>
+ </li>
+ <?php endif ?>
+ <?php if ($subtask['position'] != 0 && $subtask['position'] != count($subtasks)): ?>
+ <li>
+ <?= $this->a(t('Move Down'), 'subtask', 'movePosition', array('project_id' => $project['id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'direction' => 'down'), true) ?>
+ </li>
+ <?php endif ?>
<li>
<?= $this->a(t('Edit'), 'subtask', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>
</li>
diff --git a/app/Template/task/new.php b/app/Template/task/new.php
index e64effde..4bfb8064 100644
--- a/app/Template/task/new.php
+++ b/app/Template/task/new.php
@@ -47,7 +47,6 @@
<div class="form-column">
<?= $this->formHidden('project_id', $values) ?>
- <?= $this->formHidden('swimlane_id', $values) ?>
<?= $this->formLabel(t('Assignee'), 'owner_id') ?>
<?= $this->formSelect('owner_id', $users_list, $values, $errors) ?><br/>
@@ -55,6 +54,9 @@
<?= $this->formLabel(t('Category'), 'category_id') ?>
<?= $this->formSelect('category_id', $categories_list, $values, $errors) ?><br/>
+ <?= $this->formLabel(t('Swimlane'), 'swimlane_id') ?>
+ <?= $this->formSelect('swimlane_id', $swimlanes_list, $values, $errors) ?><br/>
+
<?= $this->formLabel(t('Column'), 'column_id') ?>
<?= $this->formSelect('column_id', $columns_list, $values, $errors) ?><br/>
diff --git a/app/Template/task/show.php b/app/Template/task/show.php
index 1ff2ef43..50316c9f 100644
--- a/app/Template/task/show.php
+++ b/app/Template/task/show.php
@@ -1,8 +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('tasklink/show', array('task' => $task, 'links' => $links, 'link_label_list' => $link_label_list)) ?>
+<?= $this->render('subtask/show', array('task' => $task, 'subtasks' => $subtasks, 'project' => $project)) ?>
<?= $this->render('task/timesheet', array('task' => $task)) ?>
-<?= $this->render('file/show', array('task' => $task, 'files' => $files)) ?>
+<?= $this->render('file/show', array('task' => $task, 'files' => $files, 'images' => $images)) ?>
<?= $this->render('task/comments', array('task' => $task, 'comments' => $comments, 'project' => $project)) ?>
diff --git a/app/Template/task/time_tracking.php b/app/Template/task/time_tracking.php
index 1dea0f0b..55d33e5e 100644
--- a/app/Template/task/time_tracking.php
+++ b/app/Template/task/time_tracking.php
@@ -6,10 +6,11 @@
<?php else: ?>
<table class="table-fixed">
<tr>
- <th class="column-20"><?= $subtask_paginator->order(t('User'), 'username') ?></th>
- <th class="column-30"><?= $subtask_paginator->order(t('Subtask'), 'subtask_title') ?></th>
- <th><?= $subtask_paginator->order(t('Start'), 'start') ?></th>
- <th><?= $subtask_paginator->order(t('End'), 'end') ?></th>
+ <th class="column-15"><?= $subtask_paginator->order(t('User'), 'username') ?></th>
+ <th><?= $subtask_paginator->order(t('Subtask'), 'subtask_title') ?></th>
+ <th class="column-20"><?= $subtask_paginator->order(t('Start'), 'start') ?></th>
+ <th class="column-20"><?= $subtask_paginator->order(t('End'), 'end') ?></th>
+ <th class="column-10"><?= $subtask_paginator->order(t('Time spent'), 'time_spent') ?></th>
</tr>
<?php foreach ($subtask_paginator->getCollection() as $record): ?>
<tr>
@@ -17,6 +18,7 @@
<td><?= t($record['subtask_title']) ?></td>
<td><?= dt('%B %e, %Y at %k:%M %p', $record['start']) ?></td>
<td><?= dt('%B %e, %Y at %k:%M %p', $record['end']) ?></td>
+ <td><?= n($record['time_spent']).' '.t('hours') ?></td>
</tr>
<?php endforeach ?>
</table>
diff --git a/app/Template/tasklink/create.php b/app/Template/tasklink/create.php
index fb438cd8..acf9d6d1 100644
--- a/app/Template/tasklink/create.php
+++ b/app/Template/tasklink/create.php
@@ -2,7 +2,7 @@
<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">
+<form action="<?= $this->u('tasklink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => isset($ajax))) ?>" method="post" autocomplete="off">
<?= $this->formCsrf() ?>
<?= $this->formHidden('task_id', $values) ?>
@@ -22,6 +22,10 @@
<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'])) ?>
+ <?php if (isset($ajax)): ?>
+ <?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?>
+ <?php else: ?>
+ <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?php endif ?>
</div>
</form> \ No newline at end of file
diff --git a/app/Template/tasklink/show.php b/app/Template/tasklink/show.php
index a36f89dd..75e3c376 100644
--- a/app/Template/tasklink/show.php
+++ b/app/Template/tasklink/show.php
@@ -41,4 +41,24 @@
</tr>
<?php endforeach ?>
</table>
-<?php endif ?> \ No newline at end of file
+
+<?php if (! isset($not_editable) && isset($link_label_list)): ?>
+ <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', array('task_id' => $task['id'])) ?>
+ <?= $this->formHidden('opposite_task_id', array()) ?>
+
+ <?= $this->formSelect('link_id', $link_label_list, array(), array()) ?>
+
+ <?= $this->formText(
+ 'title',
+ array(),
+ array(),
+ array('required', 'data-dst-field="opposite_task_id"', 'data-search-url="'.$this->u('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"'),
+ 'task-autocomplete') ?>
+
+ <input type="submit" value="<?= t('Add') ?>" class="btn btn-blue"/>
+ </form>
+<?php endif ?>
+<?php endif ?>
diff --git a/app/Template/timetable/index.php b/app/Template/timetable/index.php
new file mode 100644
index 00000000..27cbe39c
--- /dev/null
+++ b/app/Template/timetable/index.php
@@ -0,0 +1,44 @@
+<div class="page-header">
+ <h2><?= t('Timetable') ?></h2>
+ <ul>
+ <li><?= $this->a(t('Day timetable'), 'timetableday', 'index', array('user_id' => $user['id'])) ?></li>
+ <li><?= $this->a(t('Week timetable'), 'timetableweek', 'index', array('user_id' => $user['id'])) ?></li>
+ <li><?= $this->a(t('Time off timetable'), 'timetableoff', 'index', array('user_id' => $user['id'])) ?></li>
+ <li><?= $this->a(t('Overtime timetable'), 'timetableextra', 'index', array('user_id' => $user['id'])) ?></li>
+ </ul>
+</div>
+
+<form method="get" action="?" autocomplete="off" class="form-inline">
+
+ <?= $this->formHidden('controller', $values) ?>
+ <?= $this->formHidden('action', $values) ?>
+ <?= $this->formHidden('user_id', $values) ?>
+
+ <?= $this->formLabel(t('From'), 'from') ?>
+ <?= $this->formText('from', $values, array(), array(), 'form-date') ?>
+
+ <?= $this->formLabel(t('To'), 'to') ?>
+ <?= $this->formText('to', $values, array(), array(), 'form-date') ?>
+
+ <input type="submit" value="<?= t('Execute') ?>" class="btn btn-blue"/>
+</form>
+
+<?php if (! empty($timetable)): ?>
+<hr/>
+<h3><?= t('Work timetable') ?></h3>
+<table class="table-fixed table-stripped">
+ <tr>
+ <th><?= t('Day') ?></th>
+ <th><?= t('Start') ?></th>
+ <th><?= t('End') ?></th>
+ </tr>
+ <?php foreach ($timetable as $slot): ?>
+ <tr>
+ <td><?= dt('%B %e, %Y', $slot[0]->getTimestamp()) ?></td>
+ <td><?= dt('%k:%M %p', $slot[0]->getTimestamp()) ?></td>
+ <td><?= dt('%k:%M %p', $slot[1]->getTimestamp()) ?></td>
+ </tr>
+ <?php endforeach ?>
+</table>
+
+<?php endif ?> \ No newline at end of file
diff --git a/app/Template/timetable_day/index.php b/app/Template/timetable_day/index.php
new file mode 100644
index 00000000..50aca602
--- /dev/null
+++ b/app/Template/timetable_day/index.php
@@ -0,0 +1,45 @@
+<div class="page-header">
+ <h2><?= t('Day timetable') ?></h2>
+</div>
+
+<?php if (! empty($timetable)): ?>
+
+<table class="table-fixed table-stripped">
+ <tr>
+ <th><?= t('Start time') ?></th>
+ <th><?= t('End time') ?></th>
+ <th><?= t('Action') ?></th>
+ </tr>
+ <?php foreach ($timetable as $slot): ?>
+ <tr>
+ <td><?= $slot['start'] ?></td>
+ <td><?= $slot['end'] ?></td>
+ <td>
+ <?= $this->a(t('Remove'), 'timetableday', 'confirm', array('user_id' => $user['id'], 'slot_id' => $slot['id'])) ?>
+ </td>
+ </tr>
+ <?php endforeach ?>
+</table>
+
+<h3><?= t('Add new time slot') ?></h3>
+<?php endif ?>
+
+<form method="post" action="<?= $this->u('timetableday', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
+
+ <?= $this->formHidden('user_id', $values) ?>
+ <?= $this->formCsrf() ?>
+
+ <?= $this->formLabel(t('Start time'), 'start') ?>
+ <?= $this->formSelect('start', $this->getDayHours(), $values, $errors) ?>
+
+ <?= $this->formLabel(t('End time'), 'end') ?>
+ <?= $this->formSelect('end', $this->getDayHours(), $values, $errors) ?>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ </div>
+</form>
+
+<p class="alert alert-info">
+ <?= t('This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.') ?>
+</p> \ No newline at end of file
diff --git a/app/Template/timetable_day/remove.php b/app/Template/timetable_day/remove.php
new file mode 100644
index 00000000..b3ee8775
--- /dev/null
+++ b/app/Template/timetable_day/remove.php
@@ -0,0 +1,13 @@
+<div class="page-header">
+ <h2><?= t('Remove time slot') ?></h2>
+</div>
+
+<div class="confirm">
+ <p class="alert alert-info"><?= t('Do you really want to remove this time slot?') ?></p>
+
+ <div class="form-actions">
+ <?= $this->a(t('Yes'), 'timetableday', 'remove', array('user_id' => $user['id'], 'slot_id' => $slot_id), true, 'btn btn-red') ?>
+ <?= t('or') ?>
+ <?= $this->a(t('cancel'), 'timetableday', 'index', array('user_id' => $user['id'])) ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/app/Template/timetable_extra/index.php b/app/Template/timetable_extra/index.php
new file mode 100644
index 00000000..a0a55bec
--- /dev/null
+++ b/app/Template/timetable_extra/index.php
@@ -0,0 +1,56 @@
+<div class="page-header">
+ <h2><?= t('Overtime timetable') ?></h2>
+</div>
+
+<?php if (! $paginator->isEmpty()): ?>
+
+<table class="table-fixed table-stripped">
+ <tr>
+ <th><?= $paginator->order(t('Day'), 'Day') ?></th>
+ <th><?= $paginator->order(t('All day'), 'all_day') ?></th>
+ <th><?= $paginator->order(t('Start time'), 'start') ?></th>
+ <th><?= $paginator->order(t('End time'), 'end') ?></th>
+ <th class="column-40"><?= t('Comment') ?></th>
+ <th><?= t('Action') ?></th>
+ </tr>
+ <?php foreach ($paginator->getCollection() as $slot): ?>
+ <tr>
+ <td><?= $slot['date'] ?></td>
+ <td><?= $slot['all_day'] == 1 ? t('Yes') : t('No') ?></td>
+ <td><?= $slot['start'] ?></td>
+ <td><?= $slot['end'] ?></td>
+ <td><?= $this->e($slot['comment']) ?></td>
+ <td>
+ <?= $this->a(t('Remove'), 'timetableextra', 'confirm', array('user_id' => $user['id'], 'slot_id' => $slot['id'])) ?>
+ </td>
+ </tr>
+ <?php endforeach ?>
+</table>
+
+<?= $paginator ?>
+
+<?php endif ?>
+
+<form method="post" action="<?= $this->u('timetableextra', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
+
+ <?= $this->formHidden('user_id', $values) ?>
+ <?= $this->formCsrf() ?>
+
+ <?= $this->formLabel(t('Day'), 'date') ?>
+ <?= $this->formText('date', $values, $errors, array('required'), 'form-date') ?>
+
+ <?= $this->formCheckbox('all_day', t('All day'), 1) ?>
+
+ <?= $this->formLabel(t('Start time'), 'start') ?>
+ <?= $this->formSelect('start', $this->getDayHours(), $values, $errors) ?>
+
+ <?= $this->formLabel(t('End time'), 'end') ?>
+ <?= $this->formSelect('end', $this->getDayHours(), $values, $errors) ?>
+
+ <?= $this->formLabel(t('Comment'), 'comment') ?>
+ <?= $this->formText('comment', $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/timetable_extra/remove.php b/app/Template/timetable_extra/remove.php
new file mode 100644
index 00000000..d8dc5b3b
--- /dev/null
+++ b/app/Template/timetable_extra/remove.php
@@ -0,0 +1,13 @@
+<div class="page-header">
+ <h2><?= t('Remove time slot') ?></h2>
+</div>
+
+<div class="confirm">
+ <p class="alert alert-info"><?= t('Do you really want to remove this time slot?') ?></p>
+
+ <div class="form-actions">
+ <?= $this->a(t('Yes'), 'timetableextra', 'remove', array('user_id' => $user['id'], 'slot_id' => $slot_id), true, 'btn btn-red') ?>
+ <?= t('or') ?>
+ <?= $this->a(t('cancel'), 'timetableextra', 'index', array('user_id' => $user['id'])) ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/app/Template/timetable_off/index.php b/app/Template/timetable_off/index.php
new file mode 100644
index 00000000..f35d331e
--- /dev/null
+++ b/app/Template/timetable_off/index.php
@@ -0,0 +1,56 @@
+<div class="page-header">
+ <h2><?= t('Time off timetable') ?></h2>
+</div>
+
+<?php if (! $paginator->isEmpty()): ?>
+
+<table class="table-fixed table-stripped">
+ <tr>
+ <th><?= $paginator->order(t('Day'), 'Day') ?></th>
+ <th><?= $paginator->order(t('All day'), 'all_day') ?></th>
+ <th><?= $paginator->order(t('Start time'), 'start') ?></th>
+ <th><?= $paginator->order(t('End time'), 'end') ?></th>
+ <th class="column-40"><?= t('Comment') ?></th>
+ <th><?= t('Action') ?></th>
+ </tr>
+ <?php foreach ($paginator->getCollection() as $slot): ?>
+ <tr>
+ <td><?= $slot['date'] ?></td>
+ <td><?= $slot['all_day'] == 1 ? t('Yes') : t('No') ?></td>
+ <td><?= $slot['start'] ?></td>
+ <td><?= $slot['end'] ?></td>
+ <td><?= $this->e($slot['comment']) ?></td>
+ <td>
+ <?= $this->a(t('Remove'), 'timetableoff', 'confirm', array('user_id' => $user['id'], 'slot_id' => $slot['id'])) ?>
+ </td>
+ </tr>
+ <?php endforeach ?>
+</table>
+
+<?= $paginator ?>
+
+<?php endif ?>
+
+<form method="post" action="<?= $this->u('timetableoff', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
+
+ <?= $this->formHidden('user_id', $values) ?>
+ <?= $this->formCsrf() ?>
+
+ <?= $this->formLabel(t('Day'), 'date') ?>
+ <?= $this->formText('date', $values, $errors, array('required'), 'form-date') ?>
+
+ <?= $this->formCheckbox('all_day', t('All day'), 1) ?>
+
+ <?= $this->formLabel(t('Start time'), 'start') ?>
+ <?= $this->formSelect('start', $this->getDayHours(), $values, $errors) ?>
+
+ <?= $this->formLabel(t('End time'), 'end') ?>
+ <?= $this->formSelect('end', $this->getDayHours(), $values, $errors) ?>
+
+ <?= $this->formLabel(t('Comment'), 'comment') ?>
+ <?= $this->formText('comment', $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/timetable_off/remove.php b/app/Template/timetable_off/remove.php
new file mode 100644
index 00000000..64863781
--- /dev/null
+++ b/app/Template/timetable_off/remove.php
@@ -0,0 +1,13 @@
+<div class="page-header">
+ <h2><?= t('Remove time slot') ?></h2>
+</div>
+
+<div class="confirm">
+ <p class="alert alert-info"><?= t('Do you really want to remove this time slot?') ?></p>
+
+ <div class="form-actions">
+ <?= $this->a(t('Yes'), 'timetableoff', 'remove', array('user_id' => $user['id'], 'slot_id' => $slot_id), true, 'btn btn-red') ?>
+ <?= t('or') ?>
+ <?= $this->a(t('cancel'), 'timetableoff', 'index', array('user_id' => $user['id'])) ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/app/Template/timetable_week/index.php b/app/Template/timetable_week/index.php
new file mode 100644
index 00000000..8fb51909
--- /dev/null
+++ b/app/Template/timetable_week/index.php
@@ -0,0 +1,46 @@
+<div class="page-header">
+ <h2><?= t('Week timetable') ?></h2>
+</div>
+
+<?php if (! empty($timetable)): ?>
+
+<table class="table-fixed table-stripped">
+ <tr>
+ <th><?= t('Day') ?></th>
+ <th><?= t('Start time') ?></th>
+ <th><?= t('End time') ?></th>
+ <th><?= t('Action') ?></th>
+ </tr>
+ <?php foreach ($timetable as $slot): ?>
+ <tr>
+ <td><?= $this->getWeekDay($slot['day']) ?></td>
+ <td><?= $slot['start'] ?></td>
+ <td><?= $slot['end'] ?></td>
+ <td>
+ <?= $this->a(t('Remove'), 'timetableweek', 'confirm', array('user_id' => $user['id'], 'slot_id' => $slot['id'])) ?>
+ </td>
+ </tr>
+ <?php endforeach ?>
+</table>
+
+<h3><?= t('Add new time slot') ?></h3>
+<?php endif ?>
+
+<form method="post" action="<?= $this->u('timetableweek', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
+
+ <?= $this->formHidden('user_id', $values) ?>
+ <?= $this->formCsrf() ?>
+
+ <?= $this->formLabel(t('Day'), 'day') ?>
+ <?= $this->formSelect('day', $this->getWeekDays(), $values, $errors) ?>
+
+ <?= $this->formLabel(t('Start time'), 'start') ?>
+ <?= $this->formSelect('start', $this->getDayHours(), $values, $errors) ?>
+
+ <?= $this->formLabel(t('End time'), 'end') ?>
+ <?= $this->formSelect('end', $this->getDayHours(), $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/timetable_week/remove.php b/app/Template/timetable_week/remove.php
new file mode 100644
index 00000000..f8eb2bbe
--- /dev/null
+++ b/app/Template/timetable_week/remove.php
@@ -0,0 +1,13 @@
+<div class="page-header">
+ <h2><?= t('Remove time slot') ?></h2>
+</div>
+
+<div class="confirm">
+ <p class="alert alert-info"><?= t('Do you really want to remove this time slot?') ?></p>
+
+ <div class="form-actions">
+ <?= $this->a(t('Yes'), 'timetableweek', 'remove', array('user_id' => $user['id'], 'slot_id' => $slot_id), true, 'btn btn-red') ?>
+ <?= t('or') ?>
+ <?= $this->a(t('cancel'), 'timetableweek', 'index', array('user_id' => $user['id'])) ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php
index e41851a9..1af10c1d 100644
--- a/app/Template/user/sidebar.php
+++ b/app/Template/user/sidebar.php
@@ -32,7 +32,7 @@
<?= $this->a(t('Time tracking'), 'user', 'timesheet', array('user_id' => $user['id'])) ?>
</li>
<?php endif ?>
-
+
<?php if ($this->userSession->isAdmin()): ?>
<li>
<?= $this->a(t('User dashboard'), 'app', 'dashboard', array('user_id' => $user['id'])) ?>
@@ -40,6 +40,12 @@
<li>
<?= $this->a(t('User calendar'), 'user', 'calendar', array('user_id' => $user['id'])) ?>
</li>
+ <li>
+ <?= $this->a(t('Hourly rates'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?>
+ </li>
+ <li>
+ <?= $this->a(t('Manage timetable'), 'timetable', 'index', array('user_id' => $user['id'])) ?>
+ </li>
<?php endif ?>
<?php if ($this->userSession->isAdmin() && ! $this->userSession->isCurrentUser($user['id'])): ?>
diff --git a/app/Template/user/timesheet.php b/app/Template/user/timesheet.php
index 4f052006..3ae84df0 100644
--- a/app/Template/user/timesheet.php
+++ b/app/Template/user/timesheet.php
@@ -8,10 +8,11 @@
<?php else: ?>
<table class="table-fixed">
<tr>
- <th class="column-20"><?= $subtask_paginator->order(t('Task'), 'task_title') ?></th>
- <th class="column-20"><?= $subtask_paginator->order(t('Subtask'), 'subtask_title') ?></th>
- <th><?= $subtask_paginator->order(t('Start'), 'start') ?></th>
- <th><?= $subtask_paginator->order(t('End'), 'end') ?></th>
+ <th class="column-25"><?= $subtask_paginator->order(t('Task'), 'task_title') ?></th>
+ <th class="column-25"><?= $subtask_paginator->order(t('Subtask'), 'subtask_title') ?></th>
+ <th class="column-20"><?= $subtask_paginator->order(t('Start'), 'start') ?></th>
+ <th class="column-20"><?= $subtask_paginator->order(t('End'), 'end') ?></th>
+ <th class="column-10"><?= $subtask_paginator->order(t('Time spent'), 'time_spent') ?></th>
</tr>
<?php foreach ($subtask_paginator->getCollection() as $record): ?>
<tr>
@@ -19,6 +20,7 @@
<td><?= $this->a($this->e($record['subtask_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td>
<td><?= dt('%B %e, %Y at %k:%M %p', $record['start']) ?></td>
<td><?= dt('%B %e, %Y at %k:%M %p', $record['end']) ?></td>
+ <td><?= n($record['time_spent']).' '.t('hours') ?></td>
</tr>
<?php endforeach ?>
</table>