From 9bfab51e00608b6e008aa71f6df74104b28fc662 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 28 Mar 2015 18:00:18 -0400 Subject: Add currency rates for budget calculation --- app/Template/budget/breakdown.php | 2 +- app/Template/config/sidebar.php | 3 +++ app/Template/currency/index.php | 56 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 app/Template/currency/index.php (limited to 'app/Template') diff --git a/app/Template/budget/breakdown.php b/app/Template/budget/breakdown.php index d4168406..0a3c63d7 100644 --- a/app/Template/budget/breakdown.php +++ b/app/Template/budget/breakdown.php @@ -22,7 +22,7 @@ a($this->e($record['task_title']), 'task', 'show', array('project_id' => $project['id'], 'task_id' => $record['task_id'])) ?> a($this->e($record['subtask_title']), 'task', 'show', array('project_id' => $project['id'], 'task_id' => $record['task_id'])) ?> - e($record['name'] ?: $record['username']) ?> + a($this->e($record['name'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?> diff --git a/app/Template/config/sidebar.php b/app/Template/config/sidebar.php index 89f2c203..2e81d48a 100644 --- a/app/Template/config/sidebar.php +++ b/app/Template/config/sidebar.php @@ -13,6 +13,9 @@
  • a(t('Link settings'), 'link', 'index') ?>
  • +
  • + a(t('Currency rates'), 'currency', 'index') ?> +
  • a(t('Webhooks'), 'config', 'webhook') ?>
  • diff --git a/app/Template/currency/index.php b/app/Template/currency/index.php new file mode 100644 index 00000000..7839a142 --- /dev/null +++ b/app/Template/currency/index.php @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + +
    + e($rate['currency']) ?> + + +
    + +
    +

    + +
    + + formCsrf() ?> + + formLabel(t('Reference currency'), 'application_currency') ?> + formSelect('application_currency', $currencies, $config_values, $errors) ?>
    + +
    + +
    +
    + +
    +

    +
    + + formCsrf() ?> + + formLabel(t('Currency'), 'currency') ?> + formSelect('currency', $currencies, $values, $errors) ?>
    + + formLabel(t('Rate'), 'rate') ?> + formText('rate', $values, $errors, array(), 'form-numeric') ?>
    + +
    + +
    +
    + +

    -- cgit v1.2.3