Commit graph

399 commits

Author SHA1 Message Date
zorun
795efd6b58
Fix order of participants in the statistics page (#608)
This fixes #607 and add a test case for this bug.

It also renames participants in test cases to avoid alphabetical ordering.

Inserting participants in alphabetical order is a special case, because ordering by ID will be the same as ordering by name. This is a bad idea in test cases, as #607 has shown.
2020-05-04 23:06:35 +02:00
Weblate (bot)
15ab04e636
Translations update from Weblate (#606)
Fix #605
2020-05-03 17:28:27 +02:00
dark0dave
f389c56259
Feature/currencies (#541)
Now each project can have a currency, default to None.
Each bill can use a different currency, and a conversion to project default currency is done on settle.

Fix #512
2020-04-29 22:57:08 +02:00
Weblate (bot)
162193c787
Translations update from Weblate (#591)
RU : 100%
2020-04-29 12:08:24 +02:00
zorun
c509896b8c
Add support for different categories of "flash alerts" (#594) 2020-04-26 23:17:48 +02:00
zorun
08bb95422b
Fix crash when a localized email template is missing (#592) 2020-04-26 23:12:33 +02:00
zorun
342292ca9f
Fix language code parsing (#589) 2020-04-26 22:48:30 +02:00
zorun
d9dc38947c
Fix string representation of bills (#584)
Currently the string representation of a Bill is: "<amount> for <description>"

It is used in the History Page to describe changes that were applied to
Bills, for instance:

    Bill "42.0 for Test" renamed to "Another Test"

This is inconsistent, not easy to read, and the "for" in the middle is not
translatable.

To solve this issue, simply switch the string representation of a bill to
its description.

Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
2020-04-26 14:22:54 +02:00
Andrew Dickinson
2c32c6190c
Direct Alembic to ignore the sqlite_sequence table (#586)
* Direct Alembic to ignore the sqlite_sequence table

* Direct Alembic to ignore the sqlite_sequence table

* Fix "Skipping unsupported ALTER" warning on database migration
2020-04-26 14:20:24 +02:00
zorun
27cac869d3
Fix missing HTML tag (#583) 2020-04-25 14:03:40 +02:00
Weblate (bot)
ab3240ed34
Translated using Weblate (French) (#582)
Currently translated at 100.0% (222 of 222 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/fr/

Co-authored-by: Rémy Hubscher <hubscher.remy@gmail.com>
2020-04-25 13:15:02 +02:00
Rémy HUBSCHER
741e4023b4
Fix last history string. 2020-04-25 13:04:47 +02:00
Rémy Hubscher
1167a64b50
Translated using Weblate (French)
Currently translated at 97.7% (218 of 223 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/fr/
2020-04-25 13:01:38 +02:00
Rémy HUBSCHER
2854258830
Merge remote-tracking branch 'weblate/master' 2020-04-25 12:47:01 +02:00
Rémy Hubscher
84c8949a81
Translated using Weblate (French)
Currently translated at 83.3% (190 of 228 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/fr/
2020-04-25 12:44:10 +02:00
Rémy HUBSCHER
db47683e4e
Fix history translations. (#580) 2020-04-25 12:44:06 +02:00
Rémy HUBSCHER
64fbda885c
@zorun review.
Revert "Fix obsolete translations."

This reverts commit a2a3b1e2fe.
2020-04-25 12:18:10 +02:00
Rémy HUBSCHER
a8e62734a3
Fix weblate conflicts. 2020-04-25 12:15:00 +02:00
Rémy HUBSCHER
6129191b26
Fix sqlite only migration. (#579) 2020-04-25 11:55:46 +02:00
Baptiste
f5d861199d
Translated using Weblate (French)
Currently translated at 81.5% (186 of 228 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/fr/
2020-04-25 11:55:25 +02:00
zorun
d6d084f26a
Fix translations (#575)
* Fix user-facing string and update translation catalog

In the flash message confirming member creation, change "member had been
added" into the correct form "member has been added".

No translation has been changed.  Some translators seem to have already
spotted the mistake while translating, but I can't tell for all languages.

* Change "Person" to "Participant" in history view

Currently, the main user-facing term is "Participant", as seen for
instance in the "Add participant" form.  "Person" is not used anywhere in
the interface.

See #302 for a more general discussion on choosing the right terminology.

* Fix obsolete translations.

Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
Co-authored-by: Rémy HUBSCHER <hubscher.remy@gmail.com>
2020-04-25 11:55:20 +02:00
zorun
d0fa723877
Add Indonesian and Norwegian to the list of supported languages (#572)
According to https://hosted.weblate.org/projects/i-hate-money/i-hate-money/
these translations are almost complete (69% and 58% currently, but that's
because there have been lots of new strings to translate recently)

Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
2020-04-25 11:48:32 +02:00
Rémy HUBSCHER
7587e292fb
Remove obsolete python code (<3.6). (#571) 2020-04-24 12:32:52 +02:00
Weblate (bot)
abf1eea842
Translated using Weblate (French) (#566)
Currently translated at 80.7% (184 of 228 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/fr/

Co-authored-by: Glandos <bugs-github@antipoul.fr>
2020-04-23 11:12:16 +02:00
Rémy HUBSCHER
53dae96bdb
Pin WTForms 2.2.1 2020-04-23 10:22:50 +02:00
Rémy HUBSCHER
3592a8e2f7
Update translations. 2020-04-23 10:10:37 +02:00
Glandos
11aef3f3d1
update i18n (#562) 2020-04-21 14:41:27 +02:00
Rémy HUBSCHER
299c64a48c
Add isort support. (#561) 2020-04-21 13:59:41 +02:00
Andrew Dickinson
026a072235
Add Project History Page (#553)
Co-Authored-By: Glandos <bugs-github@antipoul.fr>

All project activity can be tracked, using SQLAlchemy-continuum.
IP addresses can optionally be recorded.
2020-04-20 15:30:27 +02:00
eMerzh
03251c090e
merge settings and import to avoid clutter (#550) 2020-04-08 14:00:24 +02:00
Charles Rose
4b79efe18a
updated web.py to make session permanent (#547)
* moved making session permanent to after authentication in web.py

Co-authored-by: Charlie Rose <charlierose@Charlies-MacBook-Pro.local>
2020-04-07 17:09:33 +02:00
eMerzh
23b7e397f2
fix(Home): correct responsive width of cards (#549) 2020-04-05 23:39:50 +02:00
bmatt
a8e74c98df
Bmatticus/feature/112 dashboard sorting (#538)
* Added DataTables for table sorting, pagination, and searching of bill_table for dashboard. Issue #112

* Moved datatables CSS/JS to dashboard to reduce loaded data throughout

* Moved link back to proper place, in head tab, but added if to prevent loading CSS/JS for datatables outside of the dashboard. Also added eye icon to drill into list_billa API to be more consistent with the look and feel of the overall site.

Co-authored-by: bmatt <bmatt@nuc01.attlocal.net>
2020-03-06 23:06:17 +01:00
Glandos
5ec3dc0acc
Align tables in statistics (#535)
* Align tables in statistics

The table in sidebar is now aligned with the one in content, to avoid
redundant informations.
All tables are back to normal on small devices.

* fix test

* run black on tests
2020-02-20 09:43:50 +01:00
zorun
9378694034
Paginate the list of bills (#480)
We display 100 bills on each page.  We only show previous/next buttons (at
the top of the view) and the list of pages (at the bottom) if there are
more than one pages.

This uses built-in pagination support from Flask-SQLAlchemy:

  https://flask-sqlalchemy.palletsprojects.com/en/2.x/api/#flask_sqlalchemy.BaseQuery.paginate
  https://flask-sqlalchemy.palletsprojects.com/en/2.x/api/#flask_sqlalchemy.Pagination
2020-02-20 09:43:00 +01:00
DavidRThrashJr
72653c0d3a
Added support for multiple API versions (#533)
* Added support for multiple API versions

Note that no changes were made to the api, the code was refactored to allow for new versions of the api to be created down the road.

Here's what this would look like:
+-- api/
    +-- v1/
        +-- __init__.py
        +-- resources.py
    +-- v1_1/
        +-- __init__.py
        +-- resources.py
    +-- v2/
        +-- __init__.py
        +-- resources.py
    +-- __init__.py
    +-- common.py

* reformatted using black

/Users/drthrash/PycharmProjects/ihatemoney/ihatemoney/api/v1/resources.py
reformatted /Users/drthrash/PycharmProjects/ihatemoney/ihatemoney/api/common.py
All done!  🍰 

* Applying fix for unused import in init.py

https://stackoverflow.com/questions/31079047/python-pep8-class-in-init-imported-but-not-used

* Formatting changes recommended by black

All done!  🍰 
1 file reformatted, 22 files left unchanged.
2020-02-20 09:35:03 +01:00
DavidRThrashJr
32d76178c0
Use SQL statement for summing up weights
* Update models: Bill.pay_each()
* Import sql func
* reformatted using black
* Added ModelsTestCase.test_bill_pay_each() in order to test the SQL query change within pay_each.
Had to add Project.ProjectQuery.get_by_name() for the test.
2020-02-17 18:39:51 +01:00
Weblate (bot)
e4f18f0600
Update from Weblate (#510)
* Added translation using Weblate (Indonesian)

* Translated using Weblate (Indonesian)

Currently translated at 100.0% (158 of 158 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/id/

* Added translation using Weblate (Ukrainian)

* Translated using Weblate (Ukrainian)

Currently translated at 11.4% (18 of 158 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/uk/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 20.9% (33 of 158 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/zh_Hans/

* Translated using Weblate (German)

Currently translated at 100.0% (155 of 155 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/de/

Co-authored-by: Muhammad Fauzi <fauzipadlaw@users.noreply.github.com>
Co-authored-by: Muge Niu <mugeniu12138@gmail.com>
Co-authored-by: flolilo <30194876+flolilo@users.noreply.github.com>
2020-02-13 21:39:08 +01:00
Edwin Smulders
02242f2e12
Initial montly expenses (#526) 2020-02-09 13:03:52 +01:00
DavidRThrashJr
bf691660ee
Update forms.html (#531)
Made the html formatting more readable
2020-02-09 13:01:47 +01:00
James Leong
1f62f18154 Statistics view #323
Remove header and table column of 'Balance' in statistics view
2020-02-08 23:17:02 +01:00
Nicolas Vanvyve
9aa7e62d0f Import previously exported json data (#518)
Fix #417 

* New tab upload

* Extract data from JSON

* Add users

* Black format

* Try to add bill

* Import bills

* Add french translation msg

* Black reformat missing

* Deactivated users are supported

* Test import

* Remove temp file in upload_json()

* Incomplete tests

* tests import

* Update ihatemoney/translations/fr/LC_MESSAGES/messages.po

Co-Authored-By: Rémy HUBSCHER <hubscher.remy@gmail.com>

* Remove useless variable and check json format

* Use String.IO and test for wrong json

* Remove coma

Co-authored-by: Rémy HUBSCHER <hubscher.remy@gmail.com>
2020-01-13 21:17:55 +01:00
John-Michael Reed
73a4d139ff Fixed typos in tests.py (#521) 2019-12-29 20:34:04 +01:00
Weblate (bot)
a00a9ff6b0 Translated using Weblate (Norwegian Bokmål) (#509)
Currently translated at 84.8% (134 of 158 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/nb_NO/
2019-11-13 16:45:18 +00:00
Tom Biju
c44784c3ed prevent bill cancellation when cancelling autocomplete (#506) 2019-11-01 01:11:03 +00:00
Weblate (bot)
3cae4de40d Added translation using Weblate (Czech) (#505) 2019-10-25 11:18:50 +00:00
José Antonio de la Torre
b683d062f0 Token support (#504)
Added API support to generate authentication tokens, at `/api/projects/:id/token`
2019-10-25 11:17:54 +00:00
e30d863c56 Change the color of the add a member button. 2019-10-20 21:23:09 +02:00
nautilusx
dabb321f9d Translated using Weblate (German)
Currently translated at 100.0% (155 of 155 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/de/
2019-10-20 21:22:56 +02:00
José Antonio de la Torre
c931a98d70 Added missing strings and fixed some of them 2019-10-20 21:09:47 +02:00
f51a02005c Remove jQuery datepicker.
We don't need this anymore because all major browser now have implemented that feature on the browser itself.

Closes #221.
2019-10-19 12:31:17 +02:00
6a4014cf5a Fix the "and add a new one" button. 2019-10-19 12:30:56 +02:00
José Antonio de la Torre
a50d54d5da typo 2019-10-19 12:30:31 +02:00
José Antonio de la Torre
28440d15ab Added test 2019-10-19 12:30:31 +02:00
José Antonio de la Torre
4b18be97e6 Fixed public project creation flag in API creation #246 2019-10-19 12:30:31 +02:00
José Antonio de la Torre
5158135ac6 Prettify css 2019-10-17 20:17:38 +02:00
José Antonio de la Torre
a0cb2b78b7 Removed unused textarea to solve flake8 error 2019-10-17 20:17:38 +02:00
José Antonio de la Torre
5e37e33716 Added support to split messages #133 2019-10-17 20:17:38 +02:00
f260a2c9e7 Use black to refomat the files. 2019-10-14 21:20:38 +02:00
f2a0b9f3f0 Merge remote-tracking branch 'weblate/master' 2019-10-14 19:35:39 +02:00
freetim
7b87bd3842 Add german as language and update german translation 2019-10-14 16:53:57 +02:00
freetim
df6feb1451 Add first version of german translation 2019-10-14 16:53:57 +02:00
Tim
45baf44418 Added translation using Weblate (German) 2019-10-14 16:52:07 +02:00
95d4891857 Add errors to the output if they arise. 2019-10-14 16:52:02 +02:00
21c2ef1775 Enhance pytest support, update ProxyFix import. 2019-10-11 20:52:05 +02:00
480939afe5 Remove support for python2.
In the same move :
- use a setup.cfg file for packaging
- remove the use of six
2019-10-11 19:52:37 +02:00
4dd9da8e7c Translated using Weblate (French)
Currently translated at 100.0% (158 of 158 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/fr/
2019-10-08 11:43:05 +02:00
Heimen Stoffels
b6771ef03f Translated using Weblate (Dutch)
Currently translated at 100.0% (158 of 158 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/nl/
2019-10-08 11:43:05 +02:00
3d4d40bd12 Fix a small typo in the french project-reminder email 2019-10-07 18:15:45 +02:00
Leo Mouyna
e453c917ed Add new translations 2019-10-03 18:17:25 +02:00
Leo Mouyna
b70476cf8f fix unit tests 2019-10-03 18:15:50 +02:00
Leo Mouyna
afc9353180 feat: Optional field 'external link' in bill form.
An optional field has been added to the bill form to add a link to a real bill. A new action button allow user to see this bill. Breaking change with Bill model update for database, a migration is needed.

See issue #429.
2019-10-03 18:15:50 +02:00
Allan Nordhøy
1f539b5c0d Translated using Weblate (Norwegian Bokmål)
Currently translated at 85.2% (132 of 155 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/nb_NO/
2019-10-02 18:29:50 +02:00
Heimen Stoffels
f31c4c56e0 Translated using Weblate (Dutch)
Currently translated at 100.0% (155 of 155 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/nl/
2019-10-02 18:29:50 +02:00
Adrien CLERC
54ce277db5 Add more human "for who?" description.
The limit for displaying "Everyone but …"
instead of the ower's list is completely empirical.
2019-09-30 23:57:02 +02:00
Brice Maron
ad6c6a4abb api: add bearer token support 2019-09-30 23:55:28 +02:00
Alexis Métaireau
82d94a7490 Trim member usernames. Fixes #353 2019-09-27 23:36:25 +02:00
Diego Caraballo
787334777a Translated using Weblate (Spanish (Latin America))
Currently translated at 100.0% (153 of 153 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/es_419/
2019-09-26 18:23:53 +02:00
Rémy HUBSCHER
4ec4525075
Merge pull request #476 from spiral-project/integrate-debts
Fix #434 Use the debts lib to solve settlements.
2019-09-24 22:19:38 +02:00
74c51be5a3 Fix #434 Use the debts lib to solve settlements. 2019-09-24 21:25:06 +02:00
257a146b74 Translated using Weblate (French)
Currently translated at 100.0% (153 of 153 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/fr/
2019-09-24 17:19:55 +02:00
9fc7fc768e Add .mo files for spanish translation 2019-09-24 17:13:58 +02:00
8bdb8fb445 Add support for spanish language (es_419) 2019-09-24 17:13:20 +02:00
Diego Caraballo
bf261b8d9f Translated using Weblate (Spanish (Latin America))
Currently translated at 100.0% (153 of 153 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/es_419/
2019-09-24 16:50:09 +02:00
Diego Caraballo
d7f145ce4f Added translation using Weblate (Spanish (Latin America)) 2019-09-24 16:47:26 +02:00
Allan Nordhøy
4de0696072 Translated using Weblate (Norwegian Bokmål)
Currently translated at 85.0% (130 of 153 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/nb_NO/
2019-09-20 10:49:00 +02:00
Heimen Stoffels
ed083e3381 Translated using Weblate (Dutch)
Currently translated at 100.0% (153 of 153 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/nl/
2019-09-20 10:49:00 +02:00
c8396f50b9 Update translations to publish new point release. 2019-09-18 21:40:09 +02:00
Brice Maron
b82d07c3eb Move translations in template and translate link 2019-09-18 21:27:52 +02:00
Leo Mouyna
fabceefece PR remarks 2019-09-16 21:35:28 +02:00
Leo Mouyna
db98010691 fix: display validation message on password reminder
Create a new route with a new generic page that display a title and a message on a <p> tag. This route will be triggered after succesfully submit password reminder form

See issue #455
2019-09-16 21:35:28 +02:00
8127586159 Update translations 2019-09-08 19:28:41 +02:00
532f7f55e0 Translated using Weblate (French)
Currently translated at 100.0% (152 of 152 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/fr/
2019-09-08 19:13:54 +02:00
Heimen Stoffels
a696a553cc Translated using Weblate (Dutch)
Currently translated at 100.0% (152 of 152 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/nl/
2019-09-08 19:13:54 +02:00
01cf56559b Update requirements.txt 2019-09-06 23:59:05 +02:00
de84f35f9d Use WTForms DataRequired to be futureproof 2019-09-06 23:58:39 +02:00
a6bbd733b9 Update translations 2019-09-06 23:13:52 +02:00
Brice Maron
9c9832704d bill list: add placeholder and disable add bill when no members 2019-09-06 22:00:39 +02:00
Brice Maron
604f4696d8 fix: add table layout for sharing options
ref #451
2019-09-02 13:37:54 +02:00
Adrien CLERC
8531ea5b19 use zopflipng to the max to recompress png 2019-09-02 13:34:53 +02:00
57709d0cdc Merge branch 'master' of https://github.com/spiral-project/ihatemoney 2019-08-26 22:48:04 +02:00
6e02c4275a Add some spacing when displaying « list empty ». 2019-08-26 22:47:00 +02:00
Mesut Akcan
b368402af5 Translated using Weblate (Turkish)
Currently translated at 15.2% (21 of 138 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/tr/
2019-08-26 20:29:33 +00:00
Mesut Akcan
1842984ed4 Added translation using Weblate (Turkish) 2019-08-26 20:29:33 +00:00
Brice Maron
3d7ab656e1 Rework invite people to project 2019-08-26 20:11:42 +00:00
Brice Maron
0edf8634a4 Move export form to links 2019-08-26 19:59:55 +00:00
Brice Maron
09d887cde2 add homepage design 2019-08-18 21:37:20 +00:00
Brice Maron
5b2fa36efa fix flash messages position 2019-08-18 21:37:20 +00:00
Brice Maron
60b76f32f5 Add project switcher on login page if already logged 2019-08-18 21:37:20 +00:00
Brice Maron
72acde7122 Add footer with links 2019-08-18 21:37:20 +00:00
Brice Maron
fd49599cc7 Arrange navbar items by functions 2019-08-18 21:37:20 +00:00
b5cc1592d6 Translated using Weblate (French)
Currently translated at 100.0% (138 of 138 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/fr/
2019-08-02 13:56:53 +02:00
Allan Nordhøy
5091302cf3 Translated using Weblate (Norwegian Bokmål)
Currently translated at 87.7% (121 of 138 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/nb_NO/
2019-08-02 13:56:53 +02:00
eMerzh
77ea148830 Translated using Weblate (French)
Currently translated at 100.0% (138 of 138 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/fr/
2019-08-02 13:56:53 +02:00
Heimen Stoffels
663614244d Translated using Weblate (Dutch)
Currently translated at 100.0% (138 of 138 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/nl/
2019-08-02 13:56:53 +02:00
Brice Maron
89e78bb4d0 Remove Added on column from bill list.
to avoid breaking anyone's workflow, i've instead use a tooltip to display the creation date.

fix #418
2019-07-27 03:44:42 +02:00
Brice Maron
669b15b0ec Improve already project exists message 2019-07-26 22:35:02 +02:00
Brice Maron
2a9f447054 remove console log 2019-07-26 17:02:43 +02:00
Brice Maron
227ce0a1fb prettier the css file 2019-07-25 13:26:46 +02:00
Brice Maron
92ce7d4d48 Improve usability specially for small screen
- add buttons class to fix alignments
- add responsive info to big tables
- use visibility instead of display to avoid jumping rows
- reorganize menu in responsive
2019-07-25 13:26:46 +02:00
Brice Maron
773fbec5b2 Cleanup some unused css rules 2019-07-25 13:26:46 +02:00
Elizabeth Sherrock
bfa145b816 Translated using Weblate (Chinese (Simplified))
Currently translated at 8.7% (12 of 138 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/zh_HANS-CN/
2019-07-23 18:17:08 +02:00
Elizabeth Sherrock
3381714607 Added translation using Weblate (Chinese (Simplified)) 2019-07-23 18:17:08 +02:00
Brice Maron
69a2d50d1d bump bootstrap to latest stable 2019-07-23 18:16:27 +02:00
THANOS SIOURDAKIS
f5606bdd18 Added translation using Weblate (Greek) 2019-06-11 17:24:33 +02:00
Michal Čihař
f6c6a7d360 Translated using Weblate (Norwegian Bokmål)
Currently translated at 86.2% (119 of 138 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/nb_NO/
2019-06-11 17:24:33 +02:00
Allan Nordhøy
b8a0a2e22a Translated using Weblate (Norwegian Bokmål)
Currently translated at 86.2% (119 of 138 strings)

Translation: I Hate Money/I Hate Money
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/nb_NO/
2019-06-11 17:24:33 +02:00
Allan Nordhøy
d10947d995 Added translation using Weblate (Norwegian Bokmål) 2019-06-11 17:24:33 +02:00
Heimen Stoffels
f2643b6508 Added Dutch translation 2019-03-12 11:52:11 +01:00
1cc69e22c0 Fix french translation for 'added on' 2019-03-02 05:18:24 +01:00
d55b996170
Do not allow negative weights on users (Fixes #362) (#366) 2019-01-03 13:29:56 +01:00
Byron Ullauri
04adfe4155 Provide basic math operations on bills (#413)
* allow basic math ops in amount field for bills form
* docs: changing compile-translations to build-translations
2019-01-03 10:03:13 +01:00
Byron Ullauri
7cb339c0bb Resolve "Update API project list" (#409)
* refactoring models _to_serialize property

* updated project api members list

* addressing flake8: line too long
2018-12-26 19:07:09 +01:00
620596e32c
Add CORS to the API. Fix #404 (#407) 2018-12-25 18:13:58 +01:00
Lucas Verney
0428cf06b5 Add bill.creation_date field (#327) 2018-12-25 16:50:14 +01:00
Jocelyn Delalande
d4729880dd flake8 code cleanup
Flake8 was nitpicking about:

ihatemoney/forms.py:192:13: F841 local variable 'e' is assigned to but never used
ihatemoney/utils.py:26:8: W605 invalid escape sequence '\w'
ihatemoney/utils.py:26:10: W605 invalid escape sequence '\s'
ihatemoney/utils.py:27:8: W605 invalid escape sequence '\s'
2018-11-25 21:27:04 +01:00
23a4beafae
Fix form error on already existing participant. (#370)
Fixes #350
2018-09-03 20:59:18 +02:00
bfac0c1978
Sort members alphabetically in the new bill form. (#374)
Fixes #333
2018-09-03 20:58:28 +02:00
c34583d079
Add a ihatemoney delete-project command. (#375) 2018-09-03 20:55:44 +02:00
171dd81ed7
Underline actions links on hover. (#377)
Fix #260
2018-09-03 20:55:25 +02:00
6ab92ddbac
Add a handler when pages aren't found. (#379)
Fixes #356
2018-09-03 20:54:07 +02:00
24e0d8348f
Fix double-click when deleting a bill (#349) (#372)
When double-clicking on the delete button, the first click actually
deletes the bill, and the second click does the same action again. But
as the bill is already deleted, it displays a 404 page which can be
misleading.

This fix makes the app trigger a redirect when the bill seem to doesn't
exist, fixing this strange behaviour.
2018-09-03 20:53:37 +02:00
Benjamin Bouvier
22f8d552c3 Fix error escaping; (#388) 2018-09-03 20:52:48 +02:00
bb77fdbe3e
Simplify a JS function. (#371) 2018-09-03 20:49:30 +02:00
2eafb7260c
Add a favicon.ico route and logo. (#381)
Might fix #255
2018-08-11 00:13:53 +02:00
665dfd5c44
Remove Sentry, as it's not used anymore on prod. (#380)
Fixes #312.
2018-08-11 00:11:00 +02:00
9d76144a83 Fix failing tests (#365)
* Remove unwanted space in utils.py

* Fix email validation when sending invites
2018-08-10 23:04:31 +02:00
Alexis Métaireau
67de8c3b35 Remove unwanted space in utils.py 2018-08-05 15:02:04 +02:00
JocelynDelalande
fc9781b8c0 Enhance translation tooling (#360)
* Add a `make update-translations` command

To collect new strings to be translated from code.

Totally cheated on @Glandos commands :-)

Ref #336
Ref https://github.com/spiral-project/ihatemoney/issues/336#issue-322069517

* Document translation process

Fix #336

* Drop noisy location comments from .po files

Fix #339

* Drop .pot header

As it serves no purpose with our translation workflow.
.po header could be removed also, but pybabel has no option for that.

Ref #339
2018-08-05 14:59:39 +02:00
Glandos
c1b5eb1375 Remove strict_slashes for /
I don't know why, but on my setup (nginx + uwsgi), the `strict_slashes` (default to `True`) was causing an infinite loop.
I think it could be safely removed for this route only.
2018-08-05 14:57:55 +02:00
Alexis Métaireau
633e3543b2 Merge branch 'master' into almet/fix-pbkdf2-check 2018-08-05 14:37:50 +02:00
1d0880f3cb
Merge branch 'master' into almet/fix-supervisord-template 2018-07-16 22:58:48 +02:00
JocelynDelalande
c3f8ddd274 Fix Apache conf template, without relying on environment var (#359)
`python-home` is prefered over `python-path`. It will work with or without
a virtualenv.

See http://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIDaemonProcess.html
2018-07-16 22:55:54 +02:00
Adrien CLERC
a5240fb8a3 compile l10n 2018-06-17 09:49:10 +02:00
Adrien CLERC
893db0bf2c fix fr l10n 2018-06-17 09:48:19 +02:00
Adrien CLERC
0a9d16b40a compile translations to MO 2018-05-15 22:05:42 +02:00
Adrien CLERC
1947a5ae78 update fr l10n 2018-05-15 22:05:06 +02:00
Adrien CLERC
fb31868278 update locales from template with pybabel 2018-05-15 21:47:01 +02:00
Adrien CLERC
74f72a46d5 new extraction with pybabel 2018-05-15 21:45:24 +02:00
Jocelyn Delalande
b95ea7f4e6 Add statistics support to API 2018-02-07 00:06:08 +01:00
Jocelyn Delalande
036cd05e57 Move member stats computation to a dedicated method 2018-02-07 00:01:13 +01:00
Jocelyn Delalande
b1a4572e8c Change statistics data structure
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.
2018-02-07 00:01:13 +01:00
Jocelyn Delalande
389c7b8bcd Remove dead code 2018-02-06 23:59:46 +01:00
Jocelyn Delalande
cf7bd57248 Remove unused CSS odd/even classes
That was forgotten from fe39258630
2018-02-04 13:12:08 +01:00
Jocelyn Delalande
434ee8b852 Display sidebar scroll-bar only if required
This fix a regression from #316 (scrollbar was displayed all the time).

Note that the padding-bottom value is totally empiric, but proved OK on my Fx
and Chrome instances + some responsive tests. There might be finer solutions,
feel free :-).
2018-01-26 16:18:26 +01:00
0livd
b93ea4830d API: Migrate from flask-rest to flask-restful (#315)
The flask-rest custom json encoder is still needed
and thus was added to ihatemoney's utils.

Closes #298
2018-01-25 17:41:28 +01:00
Richard Coates
830718e1fe Make sidebar scrollable (#316)
* Make sidebar scrollable

Make sidebar scrollable.

* Update CHANGELOG.rst

Fixes #318
2018-01-25 17:34:37 +01:00
230eafdf58 Use Jinja2 strict rendering.
For this I had to create an Jinja2 explicit environment, so I put a
function in `ihatemoney.utils.create_jinja2_env(strict_rendering=False)`.

When using this environment and if `strict_rendering` is activated,
templates using undefined variables will now error out rather than
failing silently.
2018-01-14 18:37:10 +01:00
0504fd82f5 Fix the supervisord template.
The script was relying on the presence of an environment variable, which
is only set when the virtualenv is activated. But a virtualenv does not
have to be activated to work (it's possible to call the python command
directly).

This fixes it by relying on `sys.executable` which should be correct at
all times.

Fixes #306
2018-01-14 15:55:06 +01:00
JocelynDelalande
2019b398f1 manage commands testing (#313)
* Rename manage.ConfigTemplate → manage.GenerateConfig

To be consistent with the CLI name: `generate-config`.

* Add tests for manage.py commands

* Run tests from pip-installed package

To be able to detect packaging-related issues on test runs.

refs #305
2018-01-07 00:27:42 +01:00
c3b973b15e Do not enforce a check on sha256 hash algorithm.
This makes it inconsistent with our own generated passwords. Only check
that the password has been hashed.

Fixes #310.
2018-01-05 22:59:12 +01:00
b581865873 Fix the supervisord template.
The script was relying on the presence of an environment variable, which
is only set when the virtualenv is activated. But a virtualenv does not
have to be activated to work (it's possible to call the python command
directly).

This fixes it by relying on `sys.executable` which should be correct at
all times.

Fixes #306
2018-01-05 22:40:28 +01:00
3b2e11ab63 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
2018-01-05 22:06:11 +01:00
donkers
4ab8863eb2 Enable basic auth passthrough for API (#303)
* Enable basic auth passthrough for API

Added the couple of apache configuration lines necessary to get the basic authentication working for the API.

* Revert the addition of "AuthType Basic"

Did some more testing on my server here and I totally agree, don't need "AuthType Basic".
2018-01-05 12:32:46 +01:00
JocelynDelalande
c002cdbf94 Allow to disable/enable member via API (#301)
Disable was already (kind-of) possible via API via DELETE, but not re-enabling.

Kudos to @almet for helping me fixing that damn BooleanField :-)
2017-12-29 18:07:39 +01:00
Jocelyn Delalande
40e5a833a1 Fix tests layout so that API tests are not ran twice
Bad inheritance was causing APITestsCase tests to be ran twice.
2017-12-27 23:27:41 +01:00
JocelynDelalande
2dd7a0740a
Merge pull request #299 from spiral-project/fix-duplicate-member-validation
Fix duplicate member validation
2017-12-27 19:00:09 +01:00
JocelynDelalande
1c9120e68b Silent stderr output during app init for some commands (#293)
Avoid confusing the user for the commands outputing text to the user.

fix #277
2017-12-27 17:28:18 +01:00
9fea0ffe2c Add tests for #294 2017-12-27 17:06:46 +01:00
JocelynDelalande
f2a53eb1e3 Position flash messages with CSS rather than JS (#292)
Visual result is exactly the same, but less black magic :-).
2017-12-27 16:10:29 +01:00
JocelynDelalande
4d359ce11b Fix PUT api/project/:code/members/:id (#297)
* Fix PUT api/project/:code/members/:id

Before that commit, every PUT *must* change the name of the members, so that was :
- no idempotence,
- no ability to change only weight

fix #295

* Remove redundant comment
2017-12-27 15:58:40 +01:00
JocelynDelalande
0189313c1f Remove un-needed sidebar block (#291)
{% block sidebar %} is used by sidebar_table_layout.html and its children, not by
layout.html nor its direct children.

This is dead code removal.
2017-12-23 01:38:12 +01:00
JocelynDelalande
b65ee59b1b Remove API password (#290)
* Remove the password from API GET responses

While keeping it for POST/PUT.

fix #289

* Add a test to check password change via API
2017-12-22 17:39:48 +01:00
JocelynDelalande
5160dac4a5 Replace some CSS by some JS (#288) 2017-12-21 20:35:18 +01:00
0livd
c6f72e112b Use hashed passwords for projects (#286)
- Remove all occurences of clear text project passwords.
- Migrate the database to hash the previously stored passwords.
Closes #232
2017-12-21 13:57:01 +01:00
0livd
8a68ac0d5b Use token based auth in invitation e-mails (#280)
* Use token based auth in invitation e-mails

Invitation e-mails no longer contain the clear
text project password

* Skip invite page after project creation

- Replace ``The project identifier is demo, remember it!``
by ``Invite other people to join this project!``
(linking to the invite page)
- Encourage users to share the project password via other
communication means in the reminder email
2017-12-15 17:10:28 +01:00
Alexandre Avenel
2866c868d5 Fix some typos using codespell (#285) 2017-11-11 18:11:15 +01:00
Lucas Verney
0453599752 Update installation doc to include doc about production values, fix #266. (#282) 2017-11-01 01:56:05 +01:00
0livd
b94bad829c Use token based auth to reset passwords (#269)
Send a mail containing a password reset
token link instead of sending a clear text
password.

Ref #232
2017-10-26 19:46:34 +02:00
0livd
293735eca7 Make authentication logic simpler and safer (#270)
* Fixed exposed password in session

The project password was set in clear text
in the session cookie. The cookie payload is
only base64 encoded so it must not be used to
store private information. The password is
simply replaced by a boolean.

* Simplify authentication logic
2017-10-23 23:03:44 +02:00
JocelynDelalande
e3285bef36 Enhance install process by generating config files from templates (#275)
* Add a command to generate configuration examples

Config files are generated from templates (which remplace previous example files).

- solve the issue of hard-to-explain configuration examples
- ease pkg path seeking (avoid it, actually)
- add working defaults for sqlite and unix socket paths (instead of
  /replace/me/path/example)
- move settings comments from default_settings.py to ihatemoney.cfg.j2, as it is
  the one that will be facing user.

* Use generate-config command  in install doc

Also follow the new working defaults of templates for socket and db path.

* Fix doc settings table

On the long term, plaintext tables might destroy humanity.

* Mention templates dir URL in documentation

As requested by @almet
2017-10-23 18:05:50 +02:00
0livd
efd2b66ac6 Do not import the whole werkzeug pkg (#271) 2017-09-07 11:02:12 +02:00
0livd
7a918c9349 Enhance the dashboard. (#262)
* Update to a more flexible admin authentication
* Admin can now access any project
* Add delete and edit options in the dashboard
* Add a link to the dashboard in the nav bar

This is a rework of the changes proposed by @Olivd, so they can apply on top of
the latest master without trouble. All credit goes to him for the code.
2017-09-04 15:44:20 +02:00
0livd
2ec4fb589f Add a statistics tab (#257) 2017-08-21 23:51:32 +02:00
0livd
ec4a099f18 Protect admin endpoints against brute force attacks (#249)
* Protect admin endpoints against brute force attacks

Add a throttling mechanism to prevent a client brute
forcing the authentication form, based on its ip address
Closes #245

* Reset attempt counters if they get memory hungry
2017-08-20 12:37:12 +02:00
0livd
a0d4917ac4 Fix misplaced datepicker configuration (#258)
Bootstrap-datepicker is only included in the
list_bills template but its configuration was
living in the layout template, leading to a
javascript error on every page except list_bills.

Fixes #256
2017-08-20 12:22:47 +02:00
0livd
c7815e4878 Fix #248: Database creation issue (#254)
In flask's development server, the route handlers
run in a different thread than the main thread
thus an in-memory database created in the main thread
cannot be acccessed by the route handlers.
Switching the default database location to a temporary
file solves the isssue.

See full explanation here:
https://gehrcke.de/2015/05/in-memory-sqlite-database-and-flask-a-threading-trap/
2017-08-06 04:06:21 +02:00
0livd
8fd53f827e Revert configuration tests deletion (#250)
Some supernatural power erased the configuration
tests, they're now back !
2017-07-09 22:29:57 +02:00
3a4282fd75 Absolute imports & some other improvements (#243)
* Use absolute imports and rename package to ihatemoney
* Add a ihatemoney command
* Factorize application creation logic
* Refactor the tests
* Update the wsgi.py module with the new create_app() function
* Fix some styling thanks to Flake8.
* Automate Flake8 check in the CI.
2017-07-07 00:06:56 +02:00