From 28a3abf96d010db8253b53933d6ab36c4dd412d9 Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Fri, 19 Aug 2011 23:44:54 +0200 Subject: No need anymore to pass the project_id to the urls. The project is now directly added to the context local g object, and injected on the fly into the urls that need it. This commits also add ideas found while reading the flask documentation. The project can be enhanced in many ways, some ideas are stated there. --- budget/templates/add_bill.html | 4 ++-- budget/templates/add_member.html | 2 +- budget/templates/edit_bill.html | 4 ++-- budget/templates/invitation_mail | 4 ++-- budget/templates/list_bills.html | 18 +++++++++--------- budget/templates/send_invites.html | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) (limited to 'budget/templates') diff --git a/budget/templates/add_bill.html b/budget/templates/add_bill.html index d844b6a..5b3a768 100644 --- a/budget/templates/add_bill.html +++ b/budget/templates/add_bill.html @@ -1,14 +1,14 @@ {% extends "layout.html" %} {% block top_menu %} -Back to the list +Back to the list {% endblock %} {% block content %}

Add a new bill

-
+ {{ forms.add_bill(form) }}
diff --git a/budget/templates/add_member.html b/budget/templates/add_member.html index 8d24aee..5739791 100644 --- a/budget/templates/add_member.html +++ b/budget/templates/add_member.html @@ -1,6 +1,6 @@ {% extends "layout.html" %} {% block content %} -
+ {{ forms.add_member(form) }}
{% endblock %} diff --git a/budget/templates/edit_bill.html b/budget/templates/edit_bill.html index c78eb09..03a1a26 100644 --- a/budget/templates/edit_bill.html +++ b/budget/templates/edit_bill.html @@ -1,14 +1,14 @@ {% extends "layout.html" %} {% block top_menu %} -Back to the list +Back to the list {% endblock %} {% block content %}

Edit a bill

-
+ {{ forms.add_bill(form) }}
diff --git a/budget/templates/invitation_mail b/budget/templates/invitation_mail index 53991ed..83a7840 100644 --- a/budget/templates/invitation_mail +++ b/budget/templates/invitation_mail @@ -1,10 +1,10 @@ Hi, -Someone using the email adress {{ email }} invited you to share your expenses for {{ project.name }} on our application. +Someone using the email adress {{ g.project.contact_email }} invited you to share your expenses for {{ g.project.name }} on our application. It's as simple as saying what did you paid for, for who, and how much did it cost you, we are caring about the rest. -You can access it here: {{ SITE_URL }}{{ url_for("list_bills", project_id=project.id) }}, the password is "{{ project.password }}". +You can access it here: {{ SITE_URL }}{{ url_for("list_bills") }}, the password is "{{ g.project.password }}". Enjoy, Some weird guys diff --git a/budget/templates/list_bills.html b/budget/templates/list_bills.html index fe564e1..94b0f8f 100644 --- a/budget/templates/list_bills.html +++ b/budget/templates/list_bills.html @@ -42,24 +42,24 @@ $('.members li').hover(function(){ {% block content %}
-
+ {{ forms.add_member(member_form) }}
- Add a bill + Add a bill - + {% if bills.count() > 0 %} @@ -72,15 +72,15 @@ $('.members li').hover(function(){ - + {% endfor %}
{{ bill.what }} {% for ower in bill.owers %}{{ ower.name }} {% endfor %} {{ bill.amount }} ({{ bill.pay_each() }} each)edit - deleteedit + delete
{% else %} -

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

+

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

{% endif %}
{% endblock %} diff --git a/budget/templates/send_invites.html b/budget/templates/send_invites.html index f618803..fa46c81 100644 --- a/budget/templates/send_invites.html +++ b/budget/templates/send_invites.html @@ -3,12 +3,12 @@

Invite people to join this project

Specify a (coma separated) list of email adresses you want to notify about the creation of this budget management project and we will send them an email for you.

-

If you prefer, you can skip this step and notify them yourself

+

If you prefer, you can skip this step and notify them yourself

{% include "display_errors.html" %}
{{ form.hidden_tag() }}

{{ form.emails.label }}
{{ form.emails }}

-

{{ form.submit }} No, thanks

+

{{ form.submit }} No, thanks

{% endblock %} -- cgit v1.1