From 89e1bbe134bc770d4a3f999a1329bd07522b07cf Mon Sep 17 00:00:00 2001 From: Arnaud Bos Date: Wed, 14 Sep 2011 01:16:25 +0200 Subject: [PATCH] Make the identifier clearer to the end-user. - Send an email to the user with the summary of the created project containing a reminder of the identifier, password and a link. - Add flash message with the identifier in the /invite page/ - Add a small note containing the identifier in the upper right corner of the project main page. --- .gitignore | 1 + budget/forms.py | 2 +- budget/static/main.css | 5 +++++ budget/templates/forms.html | 10 +++++----- budget/templates/invitation_mail | 6 +++--- budget/templates/layout.html | 2 +- budget/templates/list_bills.html | 2 ++ budget/templates/reminder_mail | 9 +++++++++ budget/tests.py | 5 +++-- budget/web.py | 15 ++++++++++++++- 10 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 budget/templates/reminder_mail diff --git a/.gitignore b/.gitignore index d65e6778..b0349904 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ budget/budget.db +budget/memory *.pyc diff --git a/budget/forms.py b/budget/forms.py index 3ab5f457..bb191427 100644 --- a/budget/forms.py +++ b/budget/forms.py @@ -50,7 +50,7 @@ class ProjectForm(Form): to log in and for the URL of the project.
We tried to generate an identifier for you but - a projet with this identifier already exists. + a project with this identifier already exists.
Please create a new identifier you will be able to remember. diff --git a/budget/static/main.css b/budget/static/main.css index aa2be621..3b671955 100644 --- a/budget/static/main.css +++ b/budget/static/main.css @@ -88,3 +88,8 @@ div.topbar ul.secondary-nav { padding-right: 75px; } background-color: #fff; opacity: 0.8; } + +.identifier{ + text-align: right; + margin-top: -15px; +} diff --git a/budget/templates/forms.html b/budget/templates/forms.html index ba915e8f..f516e40e 100644 --- a/budget/templates/forms.html +++ b/budget/templates/forms.html @@ -19,10 +19,10 @@ {% macro submit(field, cancel=False, home=False) -%}
- {% if home %} - Back Home - {% endif %} + {% if home %} + Go back Home + {% endif %} {% if cancel %} {% endif %} @@ -36,7 +36,7 @@ {{ input(form.id) }} {{ input(form.password) }} {% if not home %} - {{ submit(form.submit) }} + {{ submit(form.submit, home=True) }} {% endif %} {% endmacro %} @@ -84,7 +84,7 @@ {{ form.hidden_tag() }} {{ input(form.emails) }}
- + No, thanks
{% endmacro %} diff --git a/budget/templates/invitation_mail b/budget/templates/invitation_mail index f041db05..4f5bbf06 100644 --- a/budget/templates/invitation_mail +++ b/budget/templates/invitation_mail @@ -1,10 +1,10 @@ Hi, -Someone using the email adress {{ g.project.contact_email }} invited you to share your expenses for "{{ g.project.name }}". +Someone using the email address {{ g.project.contact_email }} invited you to share your expenses for "{{ g.project.name }}". 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 private code is "{{ g.project.password }}". Enjoy, -Some weird guys +Some weird guys (with beards) diff --git a/budget/templates/layout.html b/budget/templates/layout.html index afdda854..c45a1936 100644 --- a/budget/templates/layout.html +++ b/budget/templates/layout.html @@ -12,7 +12,7 @@ $(".flash").fadeOut("slow", function () { $(".flash").remove(); }); - }, 2000); + }, 4000); $("body").bind("click", function(e) { $("ul.menu-dropdown").hide(); $('a.menu').parent("li").removeClass("open").children("ul.menu-dropdown").hide(); diff --git a/budget/templates/list_bills.html b/budget/templates/list_bills.html index 545de6ab..63a89160 100644 --- a/budget/templates/list_bills.html +++ b/budget/templates/list_bills.html @@ -60,6 +60,8 @@ {% endblock %} {% block content %} +
The project identifier is {{ g.project.id }}, remember it or add this page to you bookmarks!
+

Add a new bill