summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-09-13 16:56:51 -0400
committerFrederic Guillot <fred@kanboard.net>2015-09-13 16:56:51 -0400
commit4b6672d0b33563ab8888d592ef86616ca9238007 (patch)
tree0ba5c0b2244f08ddac55169161271ca2a25ce005 /app/Template
parentd400f7c5be4b3f7371dce73510e5fd4a54375025 (diff)
Move budget outside of the core
The budget planning feature is now a plugin See: https://github.com/kanboard/plugin-budget
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/budget/breakdown.php30
-rw-r--r--app/Template/budget/create.php47
-rw-r--r--app/Template/budget/index.php34
-rw-r--r--app/Template/budget/remove.php13
-rw-r--r--app/Template/budget/sidebar.php16
-rw-r--r--app/Template/currency/index.php2
-rw-r--r--app/Template/hourlyrate/index.php46
-rw-r--r--app/Template/hourlyrate/remove.php13
-rw-r--r--app/Template/project/dropdown.php4
-rw-r--r--app/Template/user/sidebar.php3
10 files changed, 0 insertions, 208 deletions
diff --git a/app/Template/budget/breakdown.php b/app/Template/budget/breakdown.php
deleted file mode 100644
index 92561188..00000000
--- a/app/Template/budget/breakdown.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<div class="page-header">
- <h2><?= t('Cost breakdown') ?></h2>
-</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'), \Model\SubtaskTimeTracking::TABLE.'.time_spent') ?></th>
- <th class="column-15"><?= $paginator->order(t('Date'), 'start') ?></th>
- </tr>
- <?php foreach ($paginator->getCollection() as $record): ?>
- <tr>
- <td><?= $this->url->link($this->e($record['task_title']), 'task', 'show', array('project_id' => $project['id'], 'task_id' => $record['task_id'])) ?></td>
- <td><?= $this->url->link($this->e($record['subtask_title']), 'task', 'show', array('project_id' => $project['id'], 'task_id' => $record['task_id'])) ?></td>
- <td><?= $this->url->link($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>
- </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
deleted file mode 100644
index a563796d..00000000
--- a/app/Template/budget/create.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<div class="page-header">
- <h2><?= t('Budget lines') ?></h2>
-</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><?= dt('%B %e, %Y', strtotime($line['date'])) ?></td>
- <td><?= $this->e($line['comment']) ?></td>
- <td>
- <?= $this->url->link(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->url->href('budget', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
-
- <?= $this->form->csrf() ?>
-
- <?= $this->form->hidden('id', $values) ?>
- <?= $this->form->hidden('project_id', $values) ?>
-
- <?= $this->form->label(t('Amount'), 'amount') ?>
- <?= $this->form->text('amount', $values, $errors, array('required'), 'form-numeric') ?>
-
- <?= $this->form->label(t('Date'), 'date') ?>
- <?= $this->form->text('date', $values, $errors, array('required'), 'form-date') ?>
-
- <?= $this->form->label(t('Comment'), 'comment') ?>
- <?= $this->form->text('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
deleted file mode 100644
index 51ef3d87..00000000
--- a/app/Template/budget/index.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<div class="page-header">
- <h2><?= t('Budget overview') ?></h2>
-</div>
-
-<?php if (! empty($daily_budget)): ?>
-<div id="budget-chart">
- <div id="chart"
- data-date-format="<?= e('%%Y-%%m-%%d') ?>"
- data-metrics='<?= json_encode($daily_budget, JSON_HEX_APOS) ?>'
- data-labels='<?= json_encode(array('in' => t('Budget line'), 'out' => t('Expenses'), 'left' => t('Remaining'), 'value' => t('Amount'), 'date' => t('Date'), 'type' => t('Type')), JSON_HEX_APOS) ?>'></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><?= dt('%B %e, %Y', strtotime($line['date'])) ?></td>
- <td><?= n($line['in']) ?></td>
- <td><?= n($line['out']) ?></td>
- <td><?= n($line['left']) ?></td>
- </tr>
- <?php endforeach ?>
-</table>
-<?php else: ?>
- <p class="alert"><?= t('There is not enough data to show something.') ?></p>
-<?php endif ?>
-
-<?= $this->asset->js('assets/js/vendor/d3.v3.min.js') ?>
-<?= $this->asset->js('assets/js/vendor/c3.min.js') ?> \ No newline at end of file
diff --git a/app/Template/budget/remove.php b/app/Template/budget/remove.php
deleted file mode 100644
index a5b906a1..00000000
--- a/app/Template/budget/remove.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<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->url->link(t('Yes'), 'budget', 'remove', array('project_id' => $project['id'], 'budget_id' => $budget_id), true, 'btn btn-red') ?>
- <?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'budget', 'create', array('project_id' => $project['id'])) ?>
- </div>
-</div> \ No newline at end of file
diff --git a/app/Template/budget/sidebar.php b/app/Template/budget/sidebar.php
deleted file mode 100644
index 8477c052..00000000
--- a/app/Template/budget/sidebar.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<div class="sidebar">
- <h2><?= t('Budget') ?></h2>
- <ul>
- <li <?= $this->app->getRouterAction() === 'index' ? 'class="active"' : '' ?>>
- <?= $this->url->link(t('Budget overview'), 'budget', 'index', array('project_id' => $project['id'])) ?>
- </li>
- <li <?= $this->app->getRouterAction() === 'create' ? 'class="active"' : '' ?>>
- <?= $this->url->link(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?>
- </li>
- <li <?= $this->app->getRouterAction() === 'breakdown' ? 'class="active"' : '' ?>>
- <?= $this->url->link(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?>
- </li>
- </ul>
- <div class="sidebar-collapse"><a href="#" title="<?= t('Hide sidebar') ?>"><i class="fa fa-chevron-left"></i></a></div>
- <div class="sidebar-expand" style="display: none"><a href="#" title="<?= t('Expand sidebar') ?>"><i class="fa fa-chevron-right"></i></a></div>
-</div> \ No newline at end of file
diff --git a/app/Template/currency/index.php b/app/Template/currency/index.php
index f72c5700..1c78c47a 100644
--- a/app/Template/currency/index.php
+++ b/app/Template/currency/index.php
@@ -52,5 +52,3 @@
<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/hourlyrate/index.php b/app/Template/hourlyrate/index.php
deleted file mode 100644
index af305d07..00000000
--- a/app/Template/hourlyrate/index.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<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->url->link(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->url->href('hourlyrate', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
-
- <?= $this->form->hidden('user_id', $values) ?>
- <?= $this->form->csrf() ?>
-
- <?= $this->form->label(t('Hourly rate'), 'rate') ?>
- <?= $this->form->text('rate', $values, $errors, array('required'), 'form-numeric') ?>
-
- <?= $this->form->label(t('Currency'), 'currency') ?>
- <?= $this->form->select('currency', $currencies_list, $values, $errors, array('required')) ?>
-
- <?= $this->form->label(t('Effective date'), 'date_effective') ?>
- <?= $this->form->text('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
deleted file mode 100644
index 121436e4..00000000
--- a/app/Template/hourlyrate/remove.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<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->url->link(t('Yes'), 'hourlyrate', 'remove', array('user_id' => $user['id'], 'rate_id' => $rate_id), true, 'btn btn-red') ?>
- <?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?>
- </div>
-</div> \ No newline at end of file
diff --git a/app/Template/project/dropdown.php b/app/Template/project/dropdown.php
index c9563a4f..0f1e1f6b 100644
--- a/app/Template/project/dropdown.php
+++ b/app/Template/project/dropdown.php
@@ -17,10 +17,6 @@
<?= $this->url->link(t('Analytics'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?>
</li>
<li>
- <i class="fa fa-pie-chart fa-fw"></i>
- <?= $this->url->link(t('Budget'), 'budget', 'index', array('project_id' => $project['id'])) ?>
- </li>
- <li>
<i class="fa fa-download fa-fw"></i>
<?= $this->url->link(t('Exports'), 'export', 'tasks', array('project_id' => $project['id'])) ?>
</li>
diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php
index 77612d0f..80fe8684 100644
--- a/app/Template/user/sidebar.php
+++ b/app/Template/user/sidebar.php
@@ -62,9 +62,6 @@
<li <?= $this->app->getRouterController() === 'user' && $this->app->getRouterAction() === 'authentication' ? 'class="active"' : '' ?>>
<?= $this->url->link(t('Edit Authentication'), 'user', 'authentication', array('user_id' => $user['id'])) ?>
</li>
- <li <?= $this->app->getRouterController() === 'hourlyrate' ? 'class="active"' : '' ?>>
- <?= $this->url->link(t('Hourly rates'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?>
- </li>
<li <?= $this->app->getRouterController() === 'timetable' ? 'class="active"' : '' ?>>
<?= $this->url->link(t('Manage timetable'), 'timetable', 'index', array('user_id' => $user['id'])) ?>
</li>