From 3b2e11ab6369dfa853383840dc28915b60c2d062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Fri, 5 Jan 2018 22:06:11 +0100 Subject: Include all .j2 files in the packaged version. I've also renamed the templates to *.j2 in order to make things clearer to others. Having extensions with the name of the locale doesn't seem to be a good practice, and would need us to add the locales in the MANIFEST file each time we add one. Fix #305 --- ihatemoney/templates/invitation_mail.en | 12 ------------ ihatemoney/templates/invitation_mail.en.j2 | 12 ++++++++++++ ihatemoney/templates/invitation_mail.fr | 11 ----------- ihatemoney/templates/invitation_mail.fr.j2 | 11 +++++++++++ ihatemoney/templates/password_reminder.en | 8 -------- ihatemoney/templates/password_reminder.en.j2 | 8 ++++++++ ihatemoney/templates/password_reminder.fr | 7 ------- ihatemoney/templates/password_reminder.fr.j2 | 7 +++++++ ihatemoney/templates/reminder_mail.en | 10 ---------- ihatemoney/templates/reminder_mail.en.j2 | 10 ++++++++++ ihatemoney/templates/reminder_mail.fr | 9 --------- ihatemoney/templates/reminder_mail.fr.j2 | 9 +++++++++ 12 files changed, 57 insertions(+), 57 deletions(-) delete mode 100644 ihatemoney/templates/invitation_mail.en create mode 100644 ihatemoney/templates/invitation_mail.en.j2 delete mode 100644 ihatemoney/templates/invitation_mail.fr create mode 100644 ihatemoney/templates/invitation_mail.fr.j2 delete mode 100644 ihatemoney/templates/password_reminder.en create mode 100644 ihatemoney/templates/password_reminder.en.j2 delete mode 100644 ihatemoney/templates/password_reminder.fr create mode 100644 ihatemoney/templates/password_reminder.fr.j2 delete mode 100644 ihatemoney/templates/reminder_mail.en create mode 100644 ihatemoney/templates/reminder_mail.en.j2 delete mode 100644 ihatemoney/templates/reminder_mail.fr create mode 100644 ihatemoney/templates/reminder_mail.fr.j2 (limited to 'ihatemoney/templates') diff --git a/ihatemoney/templates/invitation_mail.en b/ihatemoney/templates/invitation_mail.en deleted file mode 100644 index eeaafdb..0000000 --- a/ihatemoney/templates/invitation_mail.en +++ /dev/null @@ -1,12 +0,0 @@ -Hi, - -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 log in using this link: {{ url_for(".authenticate", _external=True, token=g.project.generate_token()) }}. -Once logged in you can use the following link which is easier to remember: {{ url_for(".list_bills", _external=True) }} -If your cookie gets deleted or if you log out, you will need to log back in using the first link. - -Enjoy, -Some weird guys (with beards) diff --git a/ihatemoney/templates/invitation_mail.en.j2 b/ihatemoney/templates/invitation_mail.en.j2 new file mode 100644 index 0000000..42be0d2 --- /dev/null +++ b/ihatemoney/templates/invitation_mail.en.j2 @@ -0,0 +1,12 @@ +Hi, + +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 pay for, for whom, and how much did it cost you, we are caring about the rest. + +You can log in using this link: {{ url_for(".authenticate", _external=True, token=g.project.generate_token()) }}. +Once logged-in, you can use the following link which is easier to remember: {{ url_for(".list_bills", _external=True) }} +If your cookie gets deleted or if you log out, you will need to log back in using the first link. + +Enjoy, +Some weird guys (with beards) diff --git a/ihatemoney/templates/invitation_mail.fr b/ihatemoney/templates/invitation_mail.fr deleted file mode 100644 index a95f9e9..0000000 --- a/ihatemoney/templates/invitation_mail.fr +++ /dev/null @@ -1,11 +0,0 @@ -Salut, - -Quelqu'un avec l'addresse email "{{ g.project.contact_email }}" vous à invité à partager vos dépenses pour "{{ g.project.name }}". - -C'est aussi simple que de dire qui à payé pour quoi, pour qui, et combien celà à coûté, on s'occuppe du reste. - -Vous pouvez vous authentifier avec le lien suivant: {{ url_for(".authenticate", _external=True, token=g.project.generate_token()) }}. -Une fois authentifié, vous pouvez utiliser le lien suivant qui est plus facile à mémoriser: {{ url_for(".list_bills", _external=True) }} -Si votre cookie est supprimé ou si vous vous déconnectez, voous devrez vous réauthentifier en utilisant le premier lien. - -Have fun, diff --git a/ihatemoney/templates/invitation_mail.fr.j2 b/ihatemoney/templates/invitation_mail.fr.j2 new file mode 100644 index 0000000..197edcc --- /dev/null +++ b/ihatemoney/templates/invitation_mail.fr.j2 @@ -0,0 +1,11 @@ +Salut, + +Quelqu'un avec l'adresse "{{ g.project.contact_email }}" vous à invité à partager vos dépenses pour "{{ g.project.name }}". + +C'est aussi simple que de dire qui à payé pour quoi, pour qui, et combien celà à coûté, on s’occupe du reste. + +Vous pouvez vous authentifier avec le lien suivant: {{ url_for(".authenticate", _external=True, token=g.project.generate_token()) }}. +Une fois authentifié, vous pouvez utiliser le lien suivant qui est plus facile à mémoriser: {{ url_for(".list_bills", _external=True) }} +Si votre cookie est supprimé ou si vous vous déconnectez, vous devrez vous authentifier à nouveau en utilisant le premier lien. + +Have fun, diff --git a/ihatemoney/templates/password_reminder.en b/ihatemoney/templates/password_reminder.en deleted file mode 100644 index bc7e609..0000000 --- a/ihatemoney/templates/password_reminder.en +++ /dev/null @@ -1,8 +0,0 @@ -Hi, - -You requested to reset the password of the following project: "{{ project.name }}". -You can reset it here: {{ url_for(".reset_password", _external=True, token=project.generate_token(expiration=3600)) }}. -This link is only valid for 1 hour. - -Hope this helps, -Some weird guys (with beards) diff --git a/ihatemoney/templates/password_reminder.en.j2 b/ihatemoney/templates/password_reminder.en.j2 new file mode 100644 index 0000000..c654354 --- /dev/null +++ b/ihatemoney/templates/password_reminder.en.j2 @@ -0,0 +1,8 @@ +Hi, + +You requested to reset the password of the following project: "{{ project.name }}". +You can reset it here: {{ url_for(".reset_password", _external=True, token=project.generate_token(expiration=3600)) }}. +This link is only valid for one hour. + +Hope this helps, +Some weird guys (with beards) diff --git a/ihatemoney/templates/password_reminder.fr b/ihatemoney/templates/password_reminder.fr deleted file mode 100644 index d4fbc2d..0000000 --- a/ihatemoney/templates/password_reminder.fr +++ /dev/null @@ -1,7 +0,0 @@ -Salut, - -Vous avez demandé à réinitialiser le mot de passe du projet suivant : "{{ project.name }}". -Vous pouvez le réinitialiser ici : {{ url_for(".reset_password", _external=True, token=project.generate_token(expiration=3600)) }}. -Ce lien est seulement valide pendant 1 heure. - -Faites en bon usage ! diff --git a/ihatemoney/templates/password_reminder.fr.j2 b/ihatemoney/templates/password_reminder.fr.j2 new file mode 100644 index 0000000..d4fbc2d --- /dev/null +++ b/ihatemoney/templates/password_reminder.fr.j2 @@ -0,0 +1,7 @@ +Salut, + +Vous avez demandé à réinitialiser le mot de passe du projet suivant : "{{ project.name }}". +Vous pouvez le réinitialiser ici : {{ url_for(".reset_password", _external=True, token=project.generate_token(expiration=3600)) }}. +Ce lien est seulement valide pendant 1 heure. + +Faites en bon usage ! diff --git a/ihatemoney/templates/reminder_mail.en b/ihatemoney/templates/reminder_mail.en deleted file mode 100644 index 8784d2a..0000000 --- a/ihatemoney/templates/reminder_mail.en +++ /dev/null @@ -1,10 +0,0 @@ -Hi, - -You have just (or someone else using your email address) created the project "{{ g.project.name }}" to share your expenses. - -You can access it here: {{ url_for(".list_bills", _external=True) }} (the identifier is {{ g.project.id }}). -If you want to share this project with your friends, you can share the identifier and the shared password with them or send them invitations with the following link: -{{ url_for(".invite", _external=True) }} - -Enjoy, -Some weird guys (with beards) diff --git a/ihatemoney/templates/reminder_mail.en.j2 b/ihatemoney/templates/reminder_mail.en.j2 new file mode 100644 index 0000000..8784d2a --- /dev/null +++ b/ihatemoney/templates/reminder_mail.en.j2 @@ -0,0 +1,10 @@ +Hi, + +You have just (or someone else using your email address) created the project "{{ g.project.name }}" to share your expenses. + +You can access it here: {{ url_for(".list_bills", _external=True) }} (the identifier is {{ g.project.id }}). +If you want to share this project with your friends, you can share the identifier and the shared password with them or send them invitations with the following link: +{{ url_for(".invite", _external=True) }} + +Enjoy, +Some weird guys (with beards) diff --git a/ihatemoney/templates/reminder_mail.fr b/ihatemoney/templates/reminder_mail.fr deleted file mode 100644 index e73938a..0000000 --- a/ihatemoney/templates/reminder_mail.fr +++ /dev/null @@ -1,9 +0,0 @@ -Hey, - -Vous venez de créer le projet "{{ g.project.name }}" pour partager vos dépenses. - -Vous pouvez y accéder ici: {{ url_for(".list_bills", _external=True) }} (l'identifieur est {{ g.project.id }}). -Si vous voulez partager ce projet avec vos amis, vous pouvez partager son identifiant et son code d'accès avec eux ou leur envoyer une invitation avec le lien suivant : -{{ url_for(".invite", _external=True) }} - -Faites en bon usage ! diff --git a/ihatemoney/templates/reminder_mail.fr.j2 b/ihatemoney/templates/reminder_mail.fr.j2 new file mode 100644 index 0000000..e73938a --- /dev/null +++ b/ihatemoney/templates/reminder_mail.fr.j2 @@ -0,0 +1,9 @@ +Hey, + +Vous venez de créer le projet "{{ g.project.name }}" pour partager vos dépenses. + +Vous pouvez y accéder ici: {{ url_for(".list_bills", _external=True) }} (l'identifieur est {{ g.project.id }}). +Si vous voulez partager ce projet avec vos amis, vous pouvez partager son identifiant et son code d'accès avec eux ou leur envoyer une invitation avec le lien suivant : +{{ url_for(".invite", _external=True) }} + +Faites en bon usage ! -- cgit v1.1 From cf7bd572489aad17bf60026c6618d0ff49f822a9 Mon Sep 17 00:00:00 2001 From: Jocelyn Delalande Date: Sun, 4 Feb 2018 13:10:57 +0100 Subject: Remove unused CSS odd/even classes That was forgotten from fe39258630e55d4a3e1297a01a1c8fd39bad3a4e --- ihatemoney/templates/dashboard.html | 2 +- ihatemoney/templates/settle_bills.html | 2 +- ihatemoney/templates/statistics.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'ihatemoney/templates') diff --git a/ihatemoney/templates/dashboard.html b/ihatemoney/templates/dashboard.html index b1220bd..807e3e2 100644 --- a/ihatemoney/templates/dashboard.html +++ b/ihatemoney/templates/dashboard.html @@ -4,7 +4,7 @@ {% for project in projects|sort(attribute='name') %} - + {% if project.has_bills() %} diff --git a/ihatemoney/templates/settle_bills.html b/ihatemoney/templates/settle_bills.html index b67a9b8..7ec5e29 100644 --- a/ihatemoney/templates/settle_bills.html +++ b/ihatemoney/templates/settle_bills.html @@ -22,7 +22,7 @@ {% for bill in bills %} - + diff --git a/ihatemoney/templates/statistics.html b/ihatemoney/templates/statistics.html index 061c629..ae1c80e 100644 --- a/ihatemoney/templates/statistics.html +++ b/ihatemoney/templates/statistics.html @@ -22,7 +22,7 @@ {% for member in members %} - + -- cgit v1.1 From 389c7b8bcd2813d8549858265432859259942fd6 Mon Sep 17 00:00:00 2001 From: Jocelyn Delalande Date: Sat, 3 Feb 2018 17:49:12 +0100 Subject: Remove dead code --- ihatemoney/templates/statistics.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ihatemoney/templates') diff --git a/ihatemoney/templates/statistics.html b/ihatemoney/templates/statistics.html index ae1c80e..ee59cb9 100644 --- a/ihatemoney/templates/statistics.html +++ b/ihatemoney/templates/statistics.html @@ -5,7 +5,7 @@
{{ _("Project") }}{{ _("Number of members") }}{{ _("Number of bills") }}{{_("Newest bill")}}{{_("Oldest bill")}}{{_("Actions")}}
{{ project.name }}{{ project.members | count }}{{ project.get_bills().count() }}{{ project.get_bills().all()[0].date }}
{{ _("Who pays?") }}{{ _("To whom?") }}{{ _("How much?") }}
{{ bill.ower }} {{ bill.receiver }} {{ "%0.2f"|format(bill.amount) }}
{{ _("Who?") }}{{ _("Paid") }}{{ _("Spent") }}{{ _("Balance") }}
{{ member.name }} {{ "%0.2f"|format(paid[member.id]) }} {{ "%0.2f"|format(spent[member.id]) }}
{% set balance = g.project.balance %} {% for member in g.project.members | sort(attribute='name') if member.activated or balance[member.id]|round(2) != 0 %} - +
{{ member.name }} {% if balance[member.id]|round(2) > 0 %}+{% endif %}{{ "%.2f" | format(balance[member.id]) }} -- cgit v1.1 From b1a4572e8c72e1d7f49b07aaeb5be0f3603bf0a7 Mon Sep 17 00:00:00 2001 From: Jocelyn Delalande Date: Sat, 3 Feb 2018 18:04:06 +0100 Subject: Change statistics data structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clearer data structure, and simpler template This commit has a side effect: sidebar now hides disabled members. IMHO, the disabled members should either be hidden or shown consistently between sidebar and central table. Previous status was: shown in sidebar (if balance ≠ 0) and hidden in central table. --- ihatemoney/templates/statistics.html | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'ihatemoney/templates') diff --git a/ihatemoney/templates/statistics.html b/ihatemoney/templates/statistics.html index ee59cb9..1b07a33 100644 --- a/ihatemoney/templates/statistics.html +++ b/ihatemoney/templates/statistics.html @@ -3,12 +3,11 @@ {% block sidebar %}
- {% set balance = g.project.balance %} - {% for member in g.project.members | sort(attribute='name') if member.activated or balance[member.id]|round(2) != 0 %} + {% for stat in members_stats| sort(attribute='member.name') %} - - + {% endfor %} @@ -21,12 +20,12 @@
{{ member.name }} - {% if balance[member.id]|round(2) > 0 %}+{% endif %}{{ "%.2f" | format(balance[member.id]) }} + {{ stat.member.name }} + {% if stat.balance|round(2) > 0 %}+{% endif %}{{ "%.2f" | format(stat.balance) }}
- {% for member in members %} + {% for stat in members_stats %} - - - - + + + + {% endfor %} -- cgit v1.1
{{ _("Who?") }}{{ _("Paid") }}{{ _("Spent") }}{{ _("Balance") }}
{{ member.name }}{{ "%0.2f"|format(paid[member.id]) }}{{ "%0.2f"|format(spent[member.id]) }}{{ "%0.2f"|format(balance[member.id]) }}{{ stat.member.name }}{{ "%0.2f"|format(stat.paid) }}{{ "%0.2f"|format(stat.spent) }}{{ "%0.2f"|format(stat.balance) }}