From ac54e4cb1657305a547cafe6101a68d030a2ddea Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Thu, 30 Aug 2018 19:32:23 +0200 Subject: [PATCH] show unapproved expenses seperately in backoffice, crosslink expenses and reimbursements in list and detailviews on main page and in backoffice --- .../templates/expense_manage_list.html | 107 ++++++++++++------ .../reimbursement_detail_backoffice.html | 2 +- src/backoffice/urls.py | 2 +- src/backoffice/views.py | 14 +++ src/economy/templates/expense_list.html | 14 ++- .../includes/expense_detail_panel.html | 6 +- .../includes/reimbursement_detail_panel.html | 15 ++- .../templates/reimbursement_detail.html | 2 + 8 files changed, 121 insertions(+), 41 deletions(-) diff --git a/src/backoffice/templates/expense_manage_list.html b/src/backoffice/templates/expense_manage_list.html index 43b16a89..f62adcf3 100644 --- a/src/backoffice/templates/expense_manage_list.html +++ b/src/backoffice/templates/expense_manage_list.html @@ -7,43 +7,80 @@ {% endblock extra_head %} {% block content %} -
-

Expenses for {{ camp.title }}

-
- This page shows all expenses for {{ camp.title }}. -
+

Manage Expenses for {{ camp.title }}

+ +{% if unapproved_expenses %} +
+ This table shows unapproved expenses for {{ camp.title }}.
+ + + + + + + + + + + + + + + + {% for expense in unapproved_expenses %} + + + + + + + + + + {% endfor %} + +
UserDescriptionAmountPaid byApproved?Reimbursement?Actions
{{ expense.user }}{{ expense.description }}{{ expense.amount }} DKK{% if expense.paid_by_bornhack %}BornHack{% else %}{{ expense.user }}{% endif %}{{ expense.approval_status }}{% if expense.reimbursement %}Details{% else %}N/A{% endif %} + Details +
+{% endif %} + +
+ +
+ This table shows all expenses for {{ camp.title }}. +
+
-
- - - - - - - - - - - - - - {% for expense in expense_list %} - - - - - - - - - - {% endfor %} - -
UserDescriptionAmountPaid byApproved?Reimbursement?Actions
{{ expense.user }}{{ expense.description }}{{ expense.amount }} DKK{% if expense.paid_by_bornhack %}BornHack{% else %}{{ expense.user }}{% endif %}{{ expense.approval_status }}{{ expense.reimbursement.pk }} - Details -
-
+ + + + + + + + + + + + + + + {% for expense in expense_list %} + + + + + + + + + + {% endfor %} + +
UserDescriptionAmountPaid byApproved?Reimbursement?Actions
{{ expense.user }}{{ expense.description }}{{ expense.amount }} DKK{% if expense.paid_by_bornhack %}BornHack{% else %}{{ expense.user }}{% endif %}{{ expense.approval_status }}{% if expense.reimbursement %}Details{% else %}N/A{% endif %} + Details +