From 732899564517c6efd9ef965f3f843309a222ce50 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 7 Mar 2015 16:50:36 -0500 Subject: Add user cost --- app/Template/hourlyrate/index.php | 46 ++++++++++++++++++++++++++++++++++++++ app/Template/hourlyrate/remove.php | 13 +++++++++++ app/Template/user/sidebar.php | 5 ++++- 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 app/Template/hourlyrate/index.php create mode 100644 app/Template/hourlyrate/remove.php (limited to 'app/Template') diff --git a/app/Template/hourlyrate/index.php b/app/Template/hourlyrate/index.php new file mode 100644 index 00000000..9d0b77c8 --- /dev/null +++ b/app/Template/hourlyrate/index.php @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + +
+ a(t('Remove'), 'hourlyrate', 'confirm', array('user_id' => $user['id'], 'rate_id' => $rate['id'])) ?> +
+ +

+ + +
+ + formHidden('user_id', $values) ?> + formCsrf() ?> + + formLabel(t('Hourly rate'), 'rate') ?> + formText('rate', $values, $errors, array('required'), 'form-numeric') ?> + + formLabel(t('Currency'), 'currency') ?> + formSelect('currency', $currencies_list, $values, $errors, array('required')) ?> + + formLabel(t('Effective date'), 'date_effective') ?> + formText('date_effective', $values, $errors, array('required'), 'form-date') ?> + +
+ +
+
diff --git a/app/Template/hourlyrate/remove.php b/app/Template/hourlyrate/remove.php new file mode 100644 index 00000000..7f22728e --- /dev/null +++ b/app/Template/hourlyrate/remove.php @@ -0,0 +1,13 @@ + + +
+

+ +
+ a(t('Yes'), 'hourlyrate', 'remove', array('user_id' => $user['id'], 'rate_id' => $rate_id), true, 'btn btn-red') ?> + + a(t('cancel'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?> +
+
\ No newline at end of file diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php index e41851a9..88977a9e 100644 --- a/app/Template/user/sidebar.php +++ b/app/Template/user/sidebar.php @@ -32,7 +32,7 @@ a(t('Time tracking'), 'user', 'timesheet', array('user_id' => $user['id'])) ?> - + userSession->isAdmin()): ?>
  • a(t('User dashboard'), 'app', 'dashboard', array('user_id' => $user['id'])) ?> @@ -40,6 +40,9 @@
  • a(t('User calendar'), 'user', 'calendar', array('user_id' => $user['id'])) ?>
  • +
  • + a(t('Hourly rates'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?> +
  • userSession->isAdmin() && ! $this->userSession->isCurrentUser($user['id'])): ?> -- cgit v1.2.3