diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2011-07-31 23:55:18 +0200 |
|---|---|---|
| committer | Alexis Metaireau <alexis@notmyidea.org> | 2011-07-31 23:55:18 +0200 |
| commit | 769bcbf3f10f59a1bce952c336adeb1804a5cc77 (patch) | |
| tree | 46e7c4266b3a93d4ffa67d77d03e24cf2c5f998a /budget/templates | |
| parent | 548101d8bbd5adff4887cfad8fc70d1a4cf82370 (diff) | |
| download | ihatemoney-mirror-769bcbf3f10f59a1bce952c336adeb1804a5cc77.zip ihatemoney-mirror-769bcbf3f10f59a1bce952c336adeb1804a5cc77.tar.gz ihatemoney-mirror-769bcbf3f10f59a1bce952c336adeb1804a5cc77.tar.bz2 | |
Makes the computation working.
Diffstat (limited to 'budget/templates')
| -rw-r--r-- | budget/templates/compute_bills.html | 11 | ||||
| -rw-r--r-- | budget/templates/list_bills.html | 18 |
2 files changed, 20 insertions, 9 deletions
diff --git a/budget/templates/compute_bills.html b/budget/templates/compute_bills.html index 8f286cf..4c6fd56 100644 --- a/budget/templates/compute_bills.html +++ b/budget/templates/compute_bills.html @@ -1,4 +1,9 @@ {% extends "layout.html" %} + +{% block top_menu %} +<a href="{{ url_for('list_bills', project_id=project.id) }}">Back to the list</a> +{% endblock %} + {% block content %} <h2>Computations</h2> @@ -12,14 +17,14 @@ </div> <div class="container span-6 last"> - <a class="awesome large green button" onclick = "if (! confirm('Are you sure ?')) return false;" href="{{ url_for("reset_bills") }}">Mark this as payed / processed</a> + <a class="awesome large green button" onclick = "if (! confirm('Are you sure ?')) return false;" href="">Mark this as payed / processed</a> </div> <table> <thead><tr><th>Name</th><th>Balance</th></tr></thead> <tbody> -{% for name, balance in balances.items() %} - <tr><td>{{ name }}</td><td>{{ balance }}</td></tr> +{% for person, balance in balances.items() %} + <tr><td>{{ person.name }}</td><td>{{ balance }}</td></tr> {% endfor %} </tbody> </table> diff --git a/budget/templates/list_bills.html b/budget/templates/list_bills.html index a26dccc..48308fe 100644 --- a/budget/templates/list_bills.html +++ b/budget/templates/list_bills.html @@ -7,16 +7,22 @@ {% endblock %} {% block content %} -<div id="leftmenu" class="span-6"> +<div id="leftmenu" class="span-4"> <ul> - {% for member in project.members %} - <li>{{ member.name }}</li> + {% set balance = project.get_balance() %} + {% for member in project.active_members %} + <li> {{ member.name }} {{ balance[member] }} <a href="{{ url_for("remove_member", project_id=project.id, member_id=member.id) }}">x</a></li> {% endfor %} </ul> - {% set form=member_form %} - {% include "member_form.html" %} + <form action="{{ url_for("add_member", project_id=project.id) }}" method="post"> + {{ forms.add_member(member_form) }} + </form> </div> -<div id="content" class="span-18 last"> +<div id="content" class="uniForm span-20 last"> + <form id="add_bill" action="{{ url_for('add_bill', project_id=project.id) }}" method="post" style="width: 400px; display: none"> + {{ forms.add_bill(bill_form) }} + </form> + {% if bills.count() > 0 %} <table> <thead><tr><th>When ?</th><th>Who paid?</th><th>for what ?</th><th>Owers</th><th>How much ?</th><th>Actions</th></tr></thead> |
