Move budget outside of the core
The budget planning feature is now a plugin See: https://github.com/kanboard/plugin-budget
This commit is contained in:
@@ -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 ?>
|
||||
@@ -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>
|
||||
@@ -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') ?>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -16,10 +16,6 @@
|
||||
<i class="fa fa-line-chart fa-fw"></i>
|
||||
<?= $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'])) ?>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user