{% extends "layout.html" %} {% block js %} // display the form when clicking on the "add bill" button $('#add_bill_button').click(function(){ $('#add_bill').show(200); $(this).hide(); $('#hide_bill_form').show(); return false; }); // and provide a mechanism to hide it back $('#hide_bill_form').click(function(){ $('#add_bill').hide(200); $(this).hide(); $('#add_bill_button').show(); return false; }); // ask for confirmation before removing an user $('a.remove').each(function(){ $(this).hide(); $(this).click(function(){ return confirm("are you sure?"); }); }); // display the remove button on mouse over (and hide them per default) $('.members li').hover(function(){ $(this).children('a.remove').show(); }, function(){ $(this).children('a.remove').hide(); }); {% endblock %} {% block top_menu %} {% endblock %} {% block content %}
{{ forms.add_member(member_form) }}
Add a bill {% if bills.count() > 0 %} {% for bill in bills %} {% endfor %}
When?Who paid?For what?OwersHow much?Actions
{{ bill.date }} {{ bill.payer }} {{ bill.what }} {% for ower in bill.owers %}{{ ower.name }} {% endfor %} {{ bill.amount }} ({{ bill.pay_each() }} each) edit delete
{% else %}

Nothing to list yet. You probably want to add a bill ?

{% endif %}
{% endblock %}