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
This commit is contained in:
Brice Maron 2019-07-26 16:34:41 +02:00 committed by Alexis Metaireau
parent 669b15b0ec
commit 89e78bb4d0
4 changed files with 15 additions and 5 deletions

View file

@ -175,8 +175,8 @@ class Project(db.Model):
.filter(Bill.payer_id == Person.id)\
.filter(Person.project_id == Project.id)\
.filter(Project.id == self.id)\
.order_by(Bill.creation_date.desc())\
.order_by(Bill.date.desc())\
.order_by(Bill.creation_date.desc())\
.order_by(Bill.id.desc())
def get_member_bills(self, member_id):

5
ihatemoney/static/js/popper.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -9,6 +9,7 @@
<script src="{{ url_for("static", filename="js/jquery-3.1.1.min.js") }}"></script>
<script src="{{ url_for("static", filename="js/ihatemoney.js") }}"></script>
<script src="{{ url_for("static", filename="js/tether.min.js") }}"></script>
<script src="{{ url_for("static", filename="js/popper.min.js") }}"></script>
<script src="{{ url_for("static", filename="js/bootstrap.min.js") }}"></script>
{% block head %}{% endblock %}
<script type="text/javascript" charset="utf-8">
@ -20,7 +21,7 @@
}, 4000);
$('.dropdown-toggle').dropdown();
$('[data-toggle="tooltip"]').tooltip();
{% block js %}{% endblock %}
});
</script>

View file

@ -98,12 +98,16 @@
{% if bills.count() > 0 %}
<table id="bill_table" class="col table table-striped table-hover table-responsive-sm">
<thead><tr><th>{{ _("Added on") }}</th><th>{{ _("When?") }}</th><th>{{ _("Who paid?") }}</th><th>{{ _("For what?") }}</th><th>{{ _("For whom?") }}</th><th>{{ _("How much?") }}</th><th>{{ _("Actions") }}</th></tr></thead>
<thead><tr><th>{{ _("When?") }}</th><th>{{ _("Who paid?") }}</<th><th>{{ _("For what?") }}</th><th>{{ _("For whom?") }}</th><th>{{ _("How much?") }}</th><th>{{ _("Actions") }}</th></tr></thead>
<tbody>
{% for bill in bills %}
<tr owers="{{bill.owers|join(',','id')}}" payer="{{bill.payer.id}}">
<td>{{ bill.creation_date if bill.creation_date else bill.date }}</td>
<td>{{ bill.date }}</td>
<td>
<span data-toggle="tooltip" data-placement="top"
title="{{ _('Added on %(date)s', date=bill.creation_date if bill.creation_date else bill.date) }}">
{{ bill.date }}
</span>
</td>
<td>{{ bill.payer }}</td>
<td>{{ bill.what }}</td>
<td>{{ bill.owers|join(', ', 'name') }} </td>