aboutsummaryrefslogtreecommitdiff
path: root/budget
diff options
context:
space:
mode:
authorAlexis Metaireau <alexis@notmyidea.org>2011-07-30 15:47:51 +0200
committerAlexis Metaireau <alexis@notmyidea.org>2011-07-30 15:47:51 +0200
commitea136b506b20ec3856f9c32832e461cbdd944648 (patch)
treeb51cb98dc4bbf2da682fcbeeb0e01e6f8be04c19 /budget
parent87ea04505924a0869e3c806cdf4de3defc1c034c (diff)
downloadihatemoney-mirror-ea136b506b20ec3856f9c32832e461cbdd944648.zip
ihatemoney-mirror-ea136b506b20ec3856f9c32832e461cbdd944648.tar.gz
ihatemoney-mirror-ea136b506b20ec3856f9c32832e461cbdd944648.tar.bz2
List existing sessions on the home.
Also factorize the code to display errors in forms.
Diffstat (limited to 'budget')
-rw-r--r--budget/templates/home.html27
-rw-r--r--budget/templates/layout.html4
-rw-r--r--budget/templates/member_form.html6
3 files changed, 19 insertions, 18 deletions
diff --git a/budget/templates/home.html b/budget/templates/home.html
index 7d4dc32..7a0cafc 100644
--- a/budget/templates/home.html
+++ b/budget/templates/home.html
@@ -2,16 +2,23 @@
{% block content %}
<h2>Welcome on the budget manager</h2>
-
-<form class="span-12 prepend-2" action="{{ url_for('authenticate') }}" method="post" accept-charset="utf-8">
- <h3>Log to an existing project...</h3>
-
- {{ auth_form.hidden_tag() }}
-
- <p>{{ auth_form.id.label }}<br /> {{ auth_form.id }}</p>
- <p>{{ auth_form.password.label }}<br /> {{ auth_form.password }}</p>
- <p>{{ auth_form.submit }}</p>
-</form>
+<div class="span-12 prepend-2">
+ <form action="{{ url_for('authenticate') }}" method="post" accept-charset="utf-8">
+ <h3>Log to an existing project...</h3>
+
+ {{ auth_form.hidden_tag() }}
+
+ <p>{{ auth_form.id.label }}<br /> {{ auth_form.id }}</p>
+ <p>{{ auth_form.password.label }}<br /> {{ auth_form.password }}</p>
+ <p>{{ auth_form.submit }}</p>
+ </form>
+ <h3>Recently visisted projects</h3>
+ <ul>
+ {% for project in session['projects'] %}
+ <li>{{ project }}</li>
+ {% endfor %}
+ </ul>
+</div>
<form class="span-10 last" action="{{ url_for('create_project') }}" method="post" class="container span-24 add-bill">
<h3>...or create a new one</h3>
diff --git a/budget/templates/layout.html b/budget/templates/layout.html
index 79240b3..25c5dd7 100644
--- a/budget/templates/layout.html
+++ b/budget/templates/layout.html
@@ -8,10 +8,8 @@
<div class="container" class="span-24">
<div id="title">
- <div class="span-18">
<a href="/"><h1>Account manager ! <span class="small">Manage your shared expenses.</span></h1></a>
- </div>
- <div class="span-6 last" id="topmenu">
+ <div class="fright" id="topmenu">
{% block top_menu %}{% endblock %}
</div>
</div>
diff --git a/budget/templates/member_form.html b/budget/templates/member_form.html
index 75b3efe..6eb4575 100644
--- a/budget/templates/member_form.html
+++ b/budget/templates/member_form.html
@@ -1,8 +1,4 @@
-{% for errors in form.errors.values() %}
- {% for error in errors %}
- <p class="error">{{error}}</p>
- {% endfor %}
-{% endfor %}
+{% include "display_errors.html" %}
<form action="{{ url_for("add_member", project_id=project.id) }}" method="post">
{{ form.hidden_tag() }}
<p>{{ form.name.label }}<br /> {{ form.name }}</p>