diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2011-09-09 21:21:37 +0200 |
|---|---|---|
| committer | Alexis Metaireau <alexis@notmyidea.org> | 2011-09-09 21:21:37 +0200 |
| commit | ef353d643c274d19e7816e9cfa436e38f1d1edea (patch) | |
| tree | ce88603d11ed7b10015677db1ce97ad3cf23ec4e /budget/templates | |
| parent | 45dc6edacbc9cb771fd038cdc719fd953c1a6771 (diff) | |
| download | ihatemoney-mirror-ef353d643c274d19e7816e9cfa436e38f1d1edea.zip ihatemoney-mirror-ef353d643c274d19e7816e9cfa436e38f1d1edea.tar.gz ihatemoney-mirror-ef353d643c274d19e7816e9cfa436e38f1d1edea.tar.bz2 | |
Refactor the application to use blueprints.
This allows to isolate some behavior in the context of the web application so
the API and the web application can behave in different ways.
Diffstat (limited to 'budget/templates')
| -rw-r--r-- | budget/templates/add_bill.html | 2 | ||||
| -rw-r--r-- | budget/templates/add_member.html | 2 | ||||
| -rw-r--r-- | budget/templates/authenticate.html | 2 | ||||
| -rw-r--r-- | budget/templates/edit_bill.html | 2 | ||||
| -rw-r--r-- | budget/templates/forms.html | 2 | ||||
| -rw-r--r-- | budget/templates/home.html | 6 | ||||
| -rw-r--r-- | budget/templates/invitation_mail | 2 | ||||
| -rw-r--r-- | budget/templates/layout.html | 10 | ||||
| -rw-r--r-- | budget/templates/list_bills.html | 14 | ||||
| -rw-r--r-- | budget/templates/send_invites.html | 4 |
10 files changed, 23 insertions, 23 deletions
diff --git a/budget/templates/add_bill.html b/budget/templates/add_bill.html index 0b575d7..3b29896 100644 --- a/budget/templates/add_bill.html +++ b/budget/templates/add_bill.html @@ -1,7 +1,7 @@ {% extends "layout.html" %} {% block top_menu %} -<a href="{{ url_for('list_bills') }}">Back to the list</a> +<a href="{{ url_for(".list_bills") }}">Back to the list</a> {% endblock %} {% block content %} diff --git a/budget/templates/add_member.html b/budget/templates/add_member.html index 5739791..62fcf9e 100644 --- a/budget/templates/add_member.html +++ b/budget/templates/add_member.html @@ -1,6 +1,6 @@ {% extends "layout.html" %} {% block content %} - <form action="{{ url_for("add_member") }}" method="post"> + <form action="{{ url_for(".add_member") }}" method="post"> {{ forms.add_member(form) }} </form> {% endblock %} diff --git a/budget/templates/authenticate.html b/budget/templates/authenticate.html index 0ad8815..9852d6a 100644 --- a/budget/templates/authenticate.html +++ b/budget/templates/authenticate.html @@ -8,7 +8,7 @@ {% if create_project %} <p class="info">The project you are trying to access do not exist, do you want -to <a href="{{ url_for("create_project", project_id=create_project) }}">create it</a>? +to <a href="{{ url_for(".create_project", project_id=create_project) }}">create it</a>? </p> {% endif %} <form action="" method="POST" accept-charset="utf-8"> diff --git a/budget/templates/edit_bill.html b/budget/templates/edit_bill.html index f069193..9c272ae 100644 --- a/budget/templates/edit_bill.html +++ b/budget/templates/edit_bill.html @@ -1,7 +1,7 @@ {% extends "layout.html" %} {% block top_menu %} -<a href="{{ url_for('list_bills') }}">Back to the list</a> +<a href="{{ url_for(".list_bills") }}">Back to the list</a> {% endblock %} {% block content %} diff --git a/budget/templates/forms.html b/budget/templates/forms.html index 7b512ff..b027763 100644 --- a/budget/templates/forms.html +++ b/budget/templates/forms.html @@ -80,7 +80,7 @@ {{ input(form.emails) }} <div class="actions"> <button class="btn">Send the invitations</button> - <a href="{{ url_for("list_bills") }}">No, thanks</a> + <a href="{{ url_for(".list_bills") }}">No, thanks</a> </div> {% endmacro %} diff --git a/budget/templates/home.html b/budget/templates/home.html index 1b77cbd..ceb3b57 100644 --- a/budget/templates/home.html +++ b/budget/templates/home.html @@ -7,7 +7,7 @@ <div id="header"> <div class="slide"> <h1><span>Manage your shared <br>expenses, easily</span></h1> - <a href="{{ url_for("demo") }}" class="about_link">Try out the demo</a> + <a href="{{ url_for(".demo") }}" class="about_link">Try out the demo</a> </div> <div class="additional-content"> <p>You're sharing a house?<br /> Going on holidays with friends?<br /> Simply sharing money with others? <br /><strong>We can help!</strong></p> @@ -22,14 +22,14 @@ <div class="row"> <div class="span8 columns"> - <form action="{{ url_for('authenticate') }}" method="post"> + <form action="{{ url_for(".authenticate") }}" method="post"> <h3>Log to an existing project...</h3> {{ forms.authenticate(auth_form, home=True) }} <button class="btn">log in</button> </form> </div> <div class="span8 columns"> - <form class="create" action="{{ url_for('create_project') }}" method="post"> + <form class="create" action="{{ url_for(".create_project") }}" method="post"> <h3>...or create a new one</h3> {{ forms.create_project(project_form, home=True) }} <button class="btn">let's get started</button> diff --git a/budget/templates/invitation_mail b/budget/templates/invitation_mail index 2844efd..f041db0 100644 --- a/budget/templates/invitation_mail +++ b/budget/templates/invitation_mail @@ -4,7 +4,7 @@ Someone using the email adress {{ g.project.contact_email }} invited you to shar 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: {{ config['SITE_URL'] }}{{ url_for("list_bills") }}, the password is "{{ g.project.password }}". +You can access it here: {{ config['SITE_URL'] }}{{ url_for(".list_bills") }}, the password is "{{ g.project.password }}". Enjoy, Some weird guys diff --git a/budget/templates/layout.html b/budget/templates/layout.html index cb7ab10..afdda85 100644 --- a/budget/templates/layout.html +++ b/budget/templates/layout.html @@ -4,7 +4,7 @@ <head> <title>Account manager</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> - <link rel=stylesheet type=text/css href="{{ url_for('static', filename='main.css') }}"> + <link rel=stylesheet type=text/css href="{{ url_for("static", filename='main.css') }}"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script type="text/javascript" charset="utf-8"> $(document).ready(function(){ @@ -42,7 +42,7 @@ <body> <div class="topbar"> - <h3><a class="logo" href="{% if g.project %}{{ url_for("list_bills") }}{% endif %}">#! money?</a></h3> + <h3><a class="logo" href="{% if g.project %}{{ url_for(".list_bills") }}{% endif %}">#! money?</a></h3> {% if g.project %} <ul> <li class="active"><a href="">Bills</a></li> @@ -56,12 +56,12 @@ <li class="divider"></li> {% for id, name in session['projects'] %} {% if id != g.project.id %} - <li><a href="{{ url_for("list_bills", project_id=id) }}">switch to {{ name }}</a></li> + <li><a href="{{ url_for(".list_bills", project_id=id) }}">switch to {{ name }}</a></li> {% endif %} {% endfor %} - <li><a href="{{ url_for("create_project") }}">Start a new project</a></li> + <li><a href="{{ url_for(".create_project") }}">Start a new project</a></li> <li class="divider"></li> - <li><a href="{{ url_for("exit") }}">Logout</a></li> + <li><a href="{{ url_for(".exit") }}">Logout</a></li> </ul> </li> </ul> diff --git a/budget/templates/list_bills.html b/budget/templates/list_bills.html index b485f81..545de6a 100644 --- a/budget/templates/list_bills.html +++ b/budget/templates/list_bills.html @@ -48,20 +48,20 @@ <td class="{% if balance[member] > 0 %}positive{% elif balance[member] < 0 %}negative{% endif %}"> {% if balance[member] > 0 %}+{% endif %}{{ balance[member] }} </td> - <td> {% if member.activated %}<a class="remove" href="{{ url_for("remove_member", member_id=member.id) }}">delete</a>{% else %}<a href="{{ url_for("reactivate", member_id=member.id) }}">reactivate</a>{% endif %}</td> + <td> {% if member.activated %}<a class="remove" href="{{ url_for(".remove_member", member_id=member.id) }}">delete</a>{% else %}<a href="{{ url_for(".reactivate", member_id=member.id) }}">reactivate</a>{% endif %}</td> </tr> {% endif %} {% endfor %} </table> - <form action="{{ url_for("add_member") }}" method="post"> + <form action="{{ url_for(".add_member") }}" method="post"> {{ forms.add_member(member_form) }} </form> {% endblock %} {% block content %} -<a id="new-bill" href="{{ url_for('add_bill') }}" class="primary">Add a new bill</a> - <form id="bill-form" action="{{ url_for('add_bill') }}" method="post" style="display: none"> +<a id="new-bill" href="{{ url_for(".add_bill") }}" class="primary">Add a new bill</a> + <form id="bill-form" action="{{ url_for(".add_bill") }}" method="post" style="display: none"> <a id="hide-bill-form" href="#">hide this form</a> {{ forms.add_bill(bill_form) }} </form> @@ -77,15 +77,15 @@ <td>{{ bill.what }}</td> <td>{% for ower in bill.owers %}{{ ower.name }} {% endfor %}</td> <td>{{ bill.amount }} ({{ bill.pay_each() }} each)</td> - <td><a href="{{ url_for("edit_bill", bill_id=bill.id) }}">edit</a> - <a class="delete" href="{{ url_for("delete_bill", bill_id=bill.id) }}">delete</a></td> + <td><a href="{{ url_for(".edit_bill", bill_id=bill.id) }}">edit</a> + <a class="delete" href="{{ url_for(".delete_bill", bill_id=bill.id) }}">delete</a></td> </tr> {% endfor %} </tbody> </table> {% else %} - <p>Nothing to list yet. You probably want to <a id="empty-new-bill" href="{{ url_for("add_bill") }}">add a bill</a> ?</p> + <p>Nothing to list yet. You probably want to <a id="empty-new-bill" href="{{ url_for(".add_bill") }}">add a bill</a> ?</p> {% endif %} </div> {% endblock %} diff --git a/budget/templates/send_invites.html b/budget/templates/send_invites.html index bf018e2..ec68333 100644 --- a/budget/templates/send_invites.html +++ b/budget/templates/send_invites.html @@ -4,14 +4,14 @@ <ol> <li>Create the project</li> <li><strong>Invite people</strong></li> - <li><a href="{{ url_for("list_bills") }}">Use it!</a></li> + <li><a href="{{ url_for(".list_bills") }}">Use it!</a></li> </ol> {% endblock %} {% block content %} <h2>Invite people to join this project</h2> <p>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.</p> -<p>If you prefer, you can <a href="{{ url_for("list_bills") }}">skip this step</a> and notify them yourself</p> +<p>If you prefer, you can <a href="{{ url_for(".list_bills") }}">skip this step</a> and notify them yourself</p> {% include "display_errors.html" %} <form class="invites" method="post" accept-charset="utf-8"> |
