diff options
| author | Adrien CLERC <adrien@antipoul.fr> | 2019-09-07 00:25:36 +0200 |
|---|---|---|
| committer | Alexis Metaireau <alexis@notmyidea.org> | 2019-09-30 23:57:02 +0200 |
| commit | 54ce277db52d4a2f5170bee5bbd9e011112c6582 (patch) | |
| tree | 46d3e82a7b7ed312881d33194508400387ff653c /ihatemoney/templates/list_bills.html | |
| parent | ad6c6a4abb14df83b1a5ae72be9849f23bcb91b3 (diff) | |
| download | ihatemoney-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.html | 8 |
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> |
