* get weight sum along with bills to scale
otherwise, we need to get the weight sum for each displayed bill.
Here, we are much more scalable
* add test
* format
* remove unused import
* oops, restore pagination to 100
* add comments
* format
* rename method to make it clearer
And also, make it static, since it doesn't rely on instance.
* improve comments and naming
* improve naming
* missing article
* Fixes#896
sidebar_table_layout switches to flex column layout
remove all 'float' buttons, replace them with nice flexboxes.
bill_table needs a flex-basis because with a very small width, it has a 0 height. I don't really know why, but adding a flex-basis: auto shows it.
* ensure new bill is on top of pagination
Fixes#875
Original showcase images are kept in another directory, and compressed
in webp in the distributed directory.
Since they won't change so much, let's keep them in git.
The style for top and bottom pagination was different, and the top part
was confusing.
Also translate bottom pagination text.
Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
* Make multiple currency optional
Fixes#848
A description is provided in project settings to make the feature self explanatory.
* I forgot the description.
Let's update translation altogether.
* black format
Fix#780
This a breaking change, the API for authentication is different, as it now requires `project_id`. Token is generated with only the project_id (so it's shorter than before), and signature is done by mixing password with secret key. Thus, it expires on every project code change.
Currently, we don't display the current language in the list. This is
confusing because the list changes when switching language.
Now we always display the full list, and we highlight the current
language.
* add the event listener only once, instead of every time the form is clicked
* use a standard button by default, so that the second state with a
"danger" button is more visible
* reset confirmation button to original state when losing focus
Co-authored-by: Glandos <bugs-github@antipoul.fr>
This is the same idea as deleting a project: deleting history is also a
major destructive action. We reuse the same form as for project deletion
to ask for the private code and provide CSRF validation.
Co-authored-by: Alexis Métaireau <alexis@notmyidea.org>
Currency switching is both simpler and less powerful. This was done primarily for users, to have a clear and logical understanding, but the code is also simpler. The main change is that it is now forbidden to switch a project to "no currency" if bills don't share the same currency.
Also, tests assume that projects are created without currency, as in the web UI.