diff --git a/ihatemoney/static/css/main.css b/ihatemoney/static/css/main.css
index 9c02b283..135a6840 100644
--- a/ihatemoney/static/css/main.css
+++ b/ihatemoney/static/css/main.css
@@ -325,6 +325,13 @@ footer .footer-left {
margin-bottom: 30px;
}
+@media (min-width: 768px) {
+ .split_bills, #table_overflow.statistics {
+ /* The table is shifted to left, so add the spacer width on the right to match */
+ width: calc(100% + 15px);
+ }
+}
+
.project-actions > .delete,
.project-actions > .edit {
font-size: 0px;
@@ -397,6 +404,7 @@ tr.payer_line .balance-name {
.balance.table {
table-layout: fixed;
+ margin-top: 30px;
}
#bill-form > fieldset {
diff --git a/ihatemoney/templates/statistics.html b/ihatemoney/templates/statistics.html
index 539781ff..73211883 100644
--- a/ihatemoney/templates/statistics.html
+++ b/ihatemoney/templates/statistics.html
@@ -1,12 +1,14 @@
{% extends "sidebar_table_layout.html" %}
{% block sidebar %}
-
+
-
- |
- {{ _("Balance") }} |
-
+
+
+ {{ _("Who?") }} |
+ {{ _("Balance") }} |
+
+
{% for stat in members_stats| sort(attribute='member.name') %}
{{ stat.member.name }} |
@@ -21,30 +23,31 @@
{% block content %}
- {{ _("Balance") }}
-
- {{ _("Who?") }} | {{ _("Paid") }} | {{ _("Spent") }} |
-
- {% for stat in members_stats %}
-
- {{ stat.member.name }} |
- {{ "%0.2f"|format(stat.paid) }} |
- {{ "%0.2f"|format(stat.spent) }} |
-
- {% endfor %}
-
-
- {{ _("Expenses by Month") }}
-
- {{ _("Period") }} | {{ _("Spent") }} |
-
- {% for month in months %}
-
- {{ _(month.strftime("%B")) }} {{ month.year }} |
- {{ "%0.2f"|format(monthly_stats[month.year][month.month]) }} |
-
- {% endfor %}
-
-
+
+
+ {{ _("Who?") }} | {{ _("Paid") }} | {{ _("Spent") }} |
+
+ {% for stat in members_stats %}
+
+ {{ stat.member.name }} |
+ {{ "%0.2f"|format(stat.paid) }} |
+ {{ "%0.2f"|format(stat.spent) }} |
+
+ {% endfor %}
+
+
+
{{ _("Expenses by Month") }}
+
+ {{ _("Period") }} | {{ _("Spent") }} |
+
+ {% for month in months %}
+
+ {{ _(month.strftime("%B")) }} {{ month.year }} |
+ {{ "%0.2f"|format(monthly_stats[month.year][month.month]) }} |
+
+ {% endfor %}
+
+
+
{% endblock %}
diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py
index a12613c1..c4b1585c 100644
--- a/ihatemoney/tests/tests.py
+++ b/ihatemoney/tests/tests.py
@@ -931,22 +931,42 @@ class BudgetTestCase(IhatemoneyTestCase):
)
response = self.client.get("/raclette/statistics")
+ first_cell = ''
+ indent = "\n "
self.assertIn(
- " | alexis | \n "
- + "20.00 | \n "
+ first_cell
+ + "alexis"
+ + indent
+ + "20.00 | "
+ + indent
+ "31.67 | \n",
response.data.decode("utf-8"),
)
self.assertIn(
- "fred | \n " + "20.00 | \n " + "5.83 | \n",
+ first_cell
+ + "fred"
+ + indent
+ + "20.00 | "
+ + indent
+ + "5.83 | \n",
response.data.decode("utf-8"),
)
self.assertIn(
- "tata | \n " + "0.00 | \n " + "2.50 | \n",
+ first_cell
+ + "tata"
+ + indent
+ + "0.00 | "
+ + indent
+ + "2.50 | \n",
response.data.decode("utf-8"),
)
self.assertIn(
- "toto | \n " + "0.00 | \n " + "0.00 | \n",
+ first_cell
+ + "toto"
+ + indent
+ + "0.00 | "
+ + indent
+ + "0.00 | \n",
response.data.decode("utf-8"),
)