summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/app/subtasks.php4
-rw-r--r--app/Template/budget/breakdown.php2
-rw-r--r--app/Template/config/board.php1
-rw-r--r--app/Template/config/integrations.php38
-rw-r--r--app/Template/config/sidebar.php6
-rw-r--r--app/Template/currency/index.php56
-rw-r--r--app/Template/event/task_assignee_change.php16
-rw-r--r--app/Template/export/transitions.php26
-rw-r--r--app/Template/project/integrations.php2
-rw-r--r--app/Template/project/sidebar.php3
-rw-r--r--app/Template/task/sidebar.php3
-rw-r--r--app/Template/task/transitions.php26
12 files changed, 176 insertions, 7 deletions
diff --git a/app/Template/app/subtasks.php b/app/Template/app/subtasks.php
index fdfbdf2f..487b66fc 100644
--- a/app/Template/app/subtasks.php
+++ b/app/Template/app/subtasks.php
@@ -6,6 +6,7 @@
<tr>
<th class="column-10"><?= $paginator->order('Id', 'tasks.id') ?></th>
<th class="column-20"><?= $paginator->order(t('Project'), 'project_name') ?></th>
+ <th><?= $paginator->order(t('Task'), 'task_name') ?></th>
<th><?= $paginator->order(t('Subtask'), 'title') ?></th>
<th class="column-20"><?= t('Time tracking') ?></th>
</tr>
@@ -18,6 +19,9 @@
<?= $this->a($this->e($subtask['project_name']), 'board', 'show', array('project_id' => $subtask['project_id'])) ?>
</td>
<td>
+ <?= $this->a($this->e($subtask['task_name']), 'task', 'show', array('task_id' => $subtask['task_id'], 'project_id' => $subtask['project_id'])) ?>
+ </td>
+ <td>
<?= $this->toggleSubtaskStatus($subtask, 'dashboard') ?>
</td>
<td>
diff --git a/app/Template/budget/breakdown.php b/app/Template/budget/breakdown.php
index d4168406..0a3c63d7 100644
--- a/app/Template/budget/breakdown.php
+++ b/app/Template/budget/breakdown.php
@@ -22,7 +22,7 @@
<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><?= $this->a($this->e($record['name'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?></td>
<td><?= n($record['cost']) ?></td>
<td><?= n($record['time_spent']).' '.t('hours') ?></td>
<td><?= dt('%B %e, %Y', $record['start']) ?></td>
diff --git a/app/Template/config/board.php b/app/Template/config/board.php
index 57efcd08..15e2b422 100644
--- a/app/Template/config/board.php
+++ b/app/Template/config/board.php
@@ -28,6 +28,7 @@
<?= $this->formCheckbox('subtask_restriction', t('Allow only one subtask in progress at the same time for a user'), 1, $values['subtask_restriction'] == 1) ?>
<?= $this->formCheckbox('subtask_time_tracking', t('Enable time tracking for subtasks'), 1, $values['subtask_time_tracking'] == 1) ?>
+ <?= $this->formCheckbox('subtask_forecast', t('Show subtask estimates in the user calendar'), 1, $values['subtask_forecast'] == 1) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/config/integrations.php b/app/Template/config/integrations.php
new file mode 100644
index 00000000..6f90e0ab
--- /dev/null
+++ b/app/Template/config/integrations.php
@@ -0,0 +1,38 @@
+<div class="page-header">
+ <h2><?= t('Integration with third-party services') ?></h2>
+</div>
+
+<form method="post" action="<?= $this->u('config', 'integrations') ?>" autocomplete="off">
+
+ <?= $this->formCsrf() ?>
+
+ <h3><img src="assets/img/hipchat-icon.png"/> <?= t('Hipchat') ?></h3>
+ <div class="listing">
+ <?= $this->formCheckbox('integration_hipchat', t('Send notifications to Hipchat'), 1, $values['integration_hipchat'] == 1) ?>
+
+ <?= $this->formLabel(t('API URL'), 'integration_hipchat_api_url') ?>
+ <?= $this->formText('integration_hipchat_api_url', $values, $errors) ?>
+
+ <?= $this->formLabel(t('Room API ID or name'), 'integration_hipchat_room_id') ?>
+ <?= $this->formText('integration_hipchat_room_id', $values, $errors) ?>
+
+ <?= $this->formLabel(t('Room notification token'), 'integration_hipchat_room_token') ?>
+ <?= $this->formText('integration_hipchat_room_token', $values, $errors) ?>
+
+ <p class="form-help"><a href="http://kanboard.net/documentation/hipchat" target="_blank"><?= t('Help on Hipchat integration') ?></a></p>
+ </div>
+
+ <h3><i class="fa fa-slack fa-fw"></i>&nbsp;<?= t('Slack') ?></h3>
+ <div class="listing">
+ <?= $this->formCheckbox('integration_slack_webhook', t('Send notifications to a Slack channel'), 1, $values['integration_slack_webhook'] == 1) ?>
+
+ <?= $this->formLabel(t('Webhook URL'), 'integration_slack_webhook_url') ?>
+ <?= $this->formText('integration_slack_webhook_url', $values, $errors) ?>
+
+ <p class="form-help"><a href="http://kanboard.net/documentation/slack" target="_blank"><?= t('Help on Slack integration') ?></a></p>
+ </div>
+
+ <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/config/sidebar.php b/app/Template/config/sidebar.php
index 89f2c203..a4f9d8e3 100644
--- a/app/Template/config/sidebar.php
+++ b/app/Template/config/sidebar.php
@@ -14,6 +14,12 @@
<?= $this->a(t('Link settings'), 'link', 'index') ?>
</li>
<li>
+ <?= $this->a(t('Currency rates'), 'currency', 'index') ?>
+ </li>
+ <li>
+ <?= $this->a(t('Integrations'), 'config', 'integrations') ?>
+ </li>
+ <li>
<?= $this->a(t('Webhooks'), 'config', 'webhook') ?>
</li>
<li>
diff --git a/app/Template/currency/index.php b/app/Template/currency/index.php
new file mode 100644
index 00000000..7839a142
--- /dev/null
+++ b/app/Template/currency/index.php
@@ -0,0 +1,56 @@
+<div class="page-header">
+ <h2><?= t('Currency rates') ?></h2>
+</div>
+
+<?php if (! empty($rates)): ?>
+
+<table class="table-stripped">
+ <tr>
+ <th class="column-35"><?= t('Currency') ?></th>
+ <th><?= t('Rate') ?></th>
+ </tr>
+ <?php foreach ($rates as $rate): ?>
+ <tr>
+ <td>
+ <strong><?= $this->e($rate['currency']) ?></strong>
+ </td>
+ <td>
+ <?= n($rate['rate']) ?>
+ </td>
+ </tr>
+ <?php endforeach ?>
+</table>
+
+<hr/>
+<h3><?= t('Change reference currency') ?></h3>
+<?php endif ?>
+<form method="post" action="<?= $this->u('currency', 'reference') ?>" autocomplete="off">
+
+ <?= $this->formCsrf() ?>
+
+ <?= $this->formLabel(t('Reference currency'), 'application_currency') ?>
+ <?= $this->formSelect('application_currency', $currencies, $config_values, $errors) ?><br/>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ </div>
+</form>
+
+<hr/>
+<h3><?= t('Add a new currency rate') ?></h3>
+<form method="post" action="<?= $this->u('currency', 'create') ?>" autocomplete="off">
+
+ <?= $this->formCsrf() ?>
+
+ <?= $this->formLabel(t('Currency'), 'currency') ?>
+ <?= $this->formSelect('currency', $currencies, $values, $errors) ?><br/>
+
+ <?= $this->formLabel(t('Rate'), 'rate') ?>
+ <?= $this->formText('rate', $values, $errors, array(), 'form-numeric') ?><br/>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ </div>
+</form>
+
+<p class="alert alert-info"><?= t('Currency rates are used to calculate project budget.') ?></p>
diff --git a/app/Template/event/task_assignee_change.php b/app/Template/event/task_assignee_change.php
index 6eac412b..22ed936b 100644
--- a/app/Template/event/task_assignee_change.php
+++ b/app/Template/event/task_assignee_change.php
@@ -1,9 +1,15 @@
<p class="activity-title">
- <?= e('%s changed the assignee of the task %s to %s',
- $this->e($author),
- $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
- $this->e($task['assignee_name'] ?: $task['assignee_username'])
- ) ?>
+ <?php $assignee = $task['assignee_name'] ?: $task['assignee_username'] ?>
+
+ <?php if (! empty($assignee)): ?>
+ <?= e('%s changed the assignee of the task %s to %s',
+ $this->e($author),
+ $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
+ $this->e($assignee)
+ ) ?>
+ <?php else: ?>
+ <?= e('%s remove the assignee of the task %s', $this->e($author), $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?>
+ <?php endif ?>
</p>
<p class="activity-description">
<em><?= $this->e($task['title']) ?></em>
diff --git a/app/Template/export/transitions.php b/app/Template/export/transitions.php
new file mode 100644
index 00000000..7cd190e0
--- /dev/null
+++ b/app/Template/export/transitions.php
@@ -0,0 +1,26 @@
+<div class="page-header">
+ <h2>
+ <?= t('Task transitions export') ?>
+ </h2>
+</div>
+
+<p class="alert alert-info"><?= t('This report contains all column moves for each task with the date, the user and the time spent for each transition.') ?></p>
+
+<form method="get" action="?" autocomplete="off">
+
+ <?= $this->formHidden('controller', $values) ?>
+ <?= $this->formHidden('action', $values) ?>
+ <?= $this->formHidden('project_id', $values) ?>
+
+ <?= $this->formLabel(t('Start Date'), 'from') ?>
+ <?= $this->formText('from', $values, $errors, array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?><br/>
+
+ <?= $this->formLabel(t('End Date'), 'to') ?>
+ <?= $this->formText('to', $values, $errors, array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?>
+
+ <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Execute') ?>" class="btn btn-blue"/>
+ </div>
+</form> \ No newline at end of file
diff --git a/app/Template/project/integrations.php b/app/Template/project/integrations.php
index 194bd672..4f6553ad 100644
--- a/app/Template/project/integrations.php
+++ b/app/Template/project/integrations.php
@@ -8,7 +8,7 @@
<p class="form-help"><a href="http://kanboard.net/documentation/github-webhooks" target="_blank"><?= t('Help on Github webhooks') ?></a></p>
</div>
-<h3><i class="fa fa-git fa-fw"></i>&nbsp;<?= t('Gitlab webhooks') ?></h3>
+<h3><img src="assets/img/gitlab-icon.png"/>&nbsp;<?= t('Gitlab webhooks') ?></h3>
<div class="listing">
<input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'gitlab', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/>
<p class="form-help"><a href="http://kanboard.net/documentation/gitlab-webhooks" target="_blank"><?= t('Help on Gitlab webhooks') ?></a></p>
diff --git a/app/Template/project/sidebar.php b/app/Template/project/sidebar.php
index 4afc8ba9..47458144 100644
--- a/app/Template/project/sidebar.php
+++ b/app/Template/project/sidebar.php
@@ -63,6 +63,9 @@
<?= $this->a(t('Subtasks'), 'export', 'subtasks', array('project_id' => $project['id'])) ?>
</li>
<li>
+ <?= $this->a(t('Task transitions'), 'export', 'transitions', array('project_id' => $project['id'])) ?>
+ </li>
+ <li>
<?= $this->a(t('Daily project summary'), 'export', 'summary', array('project_id' => $project['id'])) ?>
</li>
</ul>
diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php
index f41be14d..cb3b3c69 100644
--- a/app/Template/task/sidebar.php
+++ b/app/Template/task/sidebar.php
@@ -4,6 +4,9 @@
<li>
<?= $this->a(t('Summary'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
+ <li>
+ <?= $this->a(t('Transitions'), 'task', 'transitions', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
<?php if ($task['time_estimated'] > 0 || $task['time_spent'] > 0): ?>
<li>
<?= $this->a(t('Time tracking'), 'task', 'timesheet', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
diff --git a/app/Template/task/transitions.php b/app/Template/task/transitions.php
new file mode 100644
index 00000000..2f45eb39
--- /dev/null
+++ b/app/Template/task/transitions.php
@@ -0,0 +1,26 @@
+<div class="page-header">
+ <h2><?= t('Transitions') ?></h2>
+</div>
+
+<?php if (empty($transitions)): ?>
+ <p class="alert"><?= t('There is nothing to show.') ?></p>
+<?php else: ?>
+ <table class="table-stripped">
+ <tr>
+ <th><?= t('Date') ?></th>
+ <th><?= t('Source column') ?></th>
+ <th><?= t('Destination column') ?></th>
+ <th><?= t('Executer') ?></th>
+ <th><?= t('Time spent in the column') ?></th>
+ </tr>
+ <?php foreach ($transitions as $transition): ?>
+ <tr>
+ <td><?= dt('%B %e, %Y at %k:%M %p', $transition['date']) ?></td>
+ <td><?= $this->e($transition['src_column']) ?></td>
+ <td><?= $this->e($transition['dst_column']) ?></td>
+ <td><?= $this->a($this->e($transition['name'] ?: $transition['username']), 'user', 'show', array('user_id' => $transition['user_id'])) ?></td>
+ <td><?= n(round($transition['time_spent'] / 3600, 2)).' '.t('hours') ?></td>
+ </tr>
+ <?php endforeach ?>
+ </table>
+<?php endif ?> \ No newline at end of file