aboutsummaryrefslogtreecommitdiff
path: root/ihatemoney/templates/list_bills.html
diff options
context:
space:
mode:
authorAdrien CLERC <adrien@antipoul.fr>2019-09-07 00:25:36 +0200
committerAlexis Metaireau <alexis@notmyidea.org>2019-09-30 23:57:02 +0200
commit54ce277db52d4a2f5170bee5bbd9e011112c6582 (patch)
tree46d3e82a7b7ed312881d33194508400387ff653c /ihatemoney/templates/list_bills.html
parentad6c6a4abb14df83b1a5ae72be9849f23bcb91b3 (diff)
downloadihatemoney-mirror-54ce277db52d4a2f5170bee5bbd9e011112c6582.zip
ihatemoney-mirror-54ce277db52d4a2f5170bee5bbd9e011112c6582.tar.gz
ihatemoney-mirror-54ce277db52d4a2f5170bee5bbd9e011112c6582.tar.bz2
Add more human "for who?" description.
The limit for displaying "Everyone but …" instead of the ower's list is completely empirical.
Diffstat (limited to 'ihatemoney/templates/list_bills.html')
-rw-r--r--ihatemoney/templates/list_bills.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/ihatemoney/templates/list_bills.html b/ihatemoney/templates/list_bills.html
index e42ec37..dddef4d 100644
--- a/ihatemoney/templates/list_bills.html
+++ b/ihatemoney/templates/list_bills.html
@@ -123,7 +123,13 @@
</td>
<td>{{ bill.payer }}</td>
<td>{{ bill.what }}</td>
- <td>{{ bill.owers|join(', ', 'name') }} </td>
+ <td>{% if bill.owers|length == g.project.members|length -%}
+ {{ _("Everyone") }}
+ {%- elif bill.owers|length > g.project.members|length / 2 + 1 -%}
+ {{ _("Everyone but %(excluded)s", excluded=g.project.members|reject('in', bill.owers)|join(', ', 'name')) }}
+ {%- else -%}
+ {{ bill.owers|join(', ', 'name') }}
+ {%- endif %}</td>
<td>{{ "%0.2f"|format(bill.amount) }} ({{ "%0.2f"|format(bill.pay_each()) }} {{ _("each") }})</td>
<td class="bill-actions">
<a class="edit" href="{{ url_for(".edit_bill", bill_id=bill.id) }}" title="{{ _("edit") }}">{{ _('edit') }}</a>