diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-01-08 21:08:33 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-01-08 21:08:33 -0500 |
commit | 47f4bceb1aea51bda9211a16d635b7a0f9664976 (patch) | |
tree | 3203b087f33498b91da6d89338772798263c16d7 /app/Template | |
parent | 1078cac70d079ee0917b1a540a9f0633661ec303 (diff) |
Improve currencies pages navigation
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/config/sidebar.php | 4 | ||||
-rw-r--r-- | app/Template/currency/change.php | 9 | ||||
-rw-r--r-- | app/Template/currency/create.php | 11 | ||||
-rw-r--r-- | app/Template/currency/index.php | 54 | ||||
-rw-r--r-- | app/Template/currency/show.php | 34 |
5 files changed, 56 insertions, 56 deletions
diff --git a/app/Template/config/sidebar.php b/app/Template/config/sidebar.php index 239edc19..f35efde0 100644 --- a/app/Template/config/sidebar.php +++ b/app/Template/config/sidebar.php @@ -24,8 +24,8 @@ <li <?= $this->app->checkMenuSelection('LinkController') ?>> <?= $this->url->link(t('Link settings'), 'LinkController', 'index') ?> </li> - <li <?= $this->app->checkMenuSelection('CurrencyController', 'index') ?>> - <?= $this->url->link(t('Currency rates'), 'CurrencyController', 'index') ?> + <li <?= $this->app->checkMenuSelection('CurrencyController', 'show') ?>> + <?= $this->url->link(t('Currency rates'), 'CurrencyController', 'show') ?> </li> <li <?= $this->app->checkMenuSelection('ConfigController', 'integrations') ?>> <?= $this->url->link(t('Integrations'), 'ConfigController', 'integrations') ?> diff --git a/app/Template/currency/change.php b/app/Template/currency/change.php new file mode 100644 index 00000000..59a7ce37 --- /dev/null +++ b/app/Template/currency/change.php @@ -0,0 +1,9 @@ +<div class="page-header"> + <h2><?= t('Change reference currency') ?></h2> +</div> +<form method="post" action="<?= $this->url->href('CurrencyController', 'update') ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->label(t('Reference currency'), 'application_currency') ?> + <?= $this->form->select('application_currency', $currencies, $values, $errors) ?> + <?= $this->modal->submitButtons() ?> +</form> diff --git a/app/Template/currency/create.php b/app/Template/currency/create.php new file mode 100644 index 00000000..578ece81 --- /dev/null +++ b/app/Template/currency/create.php @@ -0,0 +1,11 @@ +<div class="page-header"> + <h2><?= t('Add or change currency rate') ?></h2> +</div> +<form method="post" action="<?= $this->url->href('CurrencyController', 'save') ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->label(t('Currency'), 'currency') ?> + <?= $this->form->select('currency', $currencies, $values, $errors) ?> + <?= $this->form->label(t('Rate'), 'rate') ?> + <?= $this->form->text('rate', $values, $errors, array('autofocus'), 'form-numeric') ?> + <?= $this->modal->submitButtons() ?> +</form> diff --git a/app/Template/currency/index.php b/app/Template/currency/index.php deleted file mode 100644 index db9b21af..00000000 --- a/app/Template/currency/index.php +++ /dev/null @@ -1,54 +0,0 @@ -<div class="page-header"> - <h2><?= t('Currency rates') ?></h2> -</div> - -<?php if (! empty($rates)): ?> - -<table class="table-striped"> - <tr> - <th class="column-35"><?= t('Currency') ?></th> - <th><?= t('Rate') ?></th> - </tr> - <?php foreach ($rates as $rate): ?> - <tr> - <td> - <strong><?= $this->text->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->url->href('CurrencyController', 'reference') ?>" autocomplete="off"> - - <?= $this->form->csrf() ?> - - <?= $this->form->label(t('Reference currency'), 'application_currency') ?> - <?= $this->form->select('application_currency', $currencies, $config_values, $errors) ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - </div> -</form> - -<hr/> -<h3><?= t('Add a new currency rate') ?></h3> -<form method="post" action="<?= $this->url->href('CurrencyController', 'create') ?>" autocomplete="off"> - - <?= $this->form->csrf() ?> - - <?= $this->form->label(t('Currency'), 'currency') ?> - <?= $this->form->select('currency', $currencies, $values, $errors) ?> - - <?= $this->form->label(t('Rate'), 'rate') ?> - <?= $this->form->text('rate', $values, $errors, array(), 'form-numeric') ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - </div> -</form> diff --git a/app/Template/currency/show.php b/app/Template/currency/show.php new file mode 100644 index 00000000..4b7f34bc --- /dev/null +++ b/app/Template/currency/show.php @@ -0,0 +1,34 @@ +<div class="page-header"> + <h2><?= t('Currency rates') ?></h2> + <ul> + <li> + <?= $this->modal->medium('plus', t('Add or change currency rate'), 'CurrencyController', 'create') ?> + </li> + <li> + <?= $this->modal->medium('edit', t('Change reference currency'), 'CurrencyController', 'change') ?> + </li> + </ul> +</div> + +<div class="panel"> + <strong><?= t('Reference currency: %s', $application_currency) ?></strong> +</div> + +<?php if (! empty($rates)): ?> + <table class="table-striped"> + <tr> + <th class="column-35"><?= t('Currency') ?></th> + <th><?= t('Rate') ?></th> + </tr> + <?php foreach ($rates as $rate): ?> + <tr> + <td> + <strong><?= $this->text->e($rate['currency']) ?></strong> + </td> + <td> + <?= n($rate['rate']) ?> + </td> + </tr> + <?php endforeach ?> + </table> +<?php endif ?> |