2015-04-21 17:56:16 +02:00
|
|
|
<div class="page-header">
|
2015-08-16 17:04:56 +02:00
|
|
|
<h2><?= t('Budget lines') ?></h2>
|
2015-04-21 17:56:16 +02:00
|
|
|
</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>
|
2015-08-16 17:04:56 +02:00
|
|
|
<?= $this->url->link(t('Remove'), 'budget', 'confirm', array('project_id' => $project['id'], 'budget_id' => $line['id'])) ?>
|
2015-04-21 17:56:16 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<h3><?= t('New budget line') ?></h3>
|
|
|
|
<?php endif ?>
|
|
|
|
|
2015-08-16 17:04:56 +02:00
|
|
|
<form method="post" action="<?= $this->url->href('budget', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
|
2015-04-21 17:56:16 +02:00
|
|
|
|
2015-08-16 17:04:56 +02:00
|
|
|
<?= $this->form->csrf() ?>
|
2015-04-21 17:56:16 +02:00
|
|
|
|
2015-08-16 17:04:56 +02:00
|
|
|
<?= $this->form->hidden('id', $values) ?>
|
|
|
|
<?= $this->form->hidden('project_id', $values) ?>
|
2015-04-21 17:56:16 +02:00
|
|
|
|
2015-08-16 17:04:56 +02:00
|
|
|
<?= $this->form->label(t('Amount'), 'amount') ?>
|
|
|
|
<?= $this->form->text('amount', $values, $errors, array('required'), 'form-numeric') ?>
|
2015-04-21 17:56:16 +02:00
|
|
|
|
2015-08-16 17:04:56 +02:00
|
|
|
<?= $this->form->label(t('Date'), 'date') ?>
|
|
|
|
<?= $this->form->text('date', $values, $errors, array('required'), 'form-date') ?>
|
2015-04-21 17:56:16 +02:00
|
|
|
|
2015-08-16 17:04:56 +02:00
|
|
|
<?= $this->form->label(t('Comment'), 'comment') ?>
|
|
|
|
<?= $this->form->text('comment', $values, $errors) ?>
|
2015-04-21 17:56:16 +02:00
|
|
|
|
|
|
|
<div class="form-actions">
|
|
|
|
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
|
|
|
</div>
|
|
|
|
</form>
|