showing only unarchived bills

This commit is contained in:
Huda Baig 2022-11-10 10:35:51 +03:00
parent 677fda6002
commit d5b7fe739b

View file

@ -102,6 +102,7 @@
</div> </div>
{% if bills.total > 0 %} {% if bills.total > 0 %}
<h3>Active Bills</h3>
<table id="bill_table" class="col table table-striped table-hover table-responsive-sm"> <table id="bill_table" class="col table table-striped table-hover table-responsive-sm">
<thead> <thead>
<tr><th>{{ _("When?") }} <tr><th>{{ _("When?") }}
@ -113,6 +114,7 @@
</thead> </thead>
<tbody> <tbody>
{% for (weights, bill) in bills.items %} {% for (weights, bill) in bills.items %}
{% if bill.archive == false %}
<tr owers="{{bill.owers|join(',','id')}}" payer="{{bill.payer.id}}"> <tr owers="{{bill.owers|join(',','id')}}" payer="{{bill.payer.id}}">
<td> <td>
<span data-toggle="tooltip" data-placement="top" <span data-toggle="tooltip" data-placement="top"
@ -141,11 +143,16 @@
{{ csrf_form.csrf_token }} {{ csrf_form.csrf_token }}
<button class="action delete" type="submit" title="{{ _("delete") }}"></button> <button class="action delete" type="submit" title="{{ _("delete") }}"></button>
</form> </form>
<form action="{{ url_for(".archive_bill", bill_id=bill.id) }}" method="POST">
{{ csrf_form.csrf_token }}
<button class="archive" type="submit" title="{{ _("archive") }}"></button>
</form>
{% if bill.external_link %} {% if bill.external_link %}
<a class="show" href="{{ bill.external_link }}" ref="noopener" target="_blank" title="{{ _("show") }}">{{ _('show') }} </a> <a class="show" href="{{ bill.external_link }}" ref="noopener" target="_blank" title="{{ _("show") }}">{{ _('show') }} </a>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
{% endif %}
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
@ -169,4 +176,5 @@
</div> </div>
</div></div> </div></div>
{% endif %} {% endif %}
<a href="{{ url_for('.list_bills_archived')}}">archived</a>
{% endblock %} {% endblock %}