diff options
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/budget/create.php | 51 | ||||
-rw-r--r-- | app/Template/budget/index.php | 9 | ||||
-rw-r--r-- | app/Template/budget/remove.php | 13 | ||||
-rw-r--r-- | app/Template/project/sidebar.php | 5 |
4 files changed, 77 insertions, 1 deletions
diff --git a/app/Template/budget/create.php b/app/Template/budget/create.php new file mode 100644 index 00000000..0ff395c9 --- /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('Burn rate'), 'budget', 'index', 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..8bdf1a57 --- /dev/null +++ b/app/Template/budget/index.php @@ -0,0 +1,9 @@ +<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('Burn rate'), 'budget', 'index', array('project_id' => $project['id'])) ?></li> + </ul> +</div> + +<p><?= t('Current budget: ') ?><strong><?= n($total) ?></strong></p> 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/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']): ?> |