mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-06 13:01:50 +02:00

Co-authored-by: Alexis Métaireau <alexis@notmyidea.org> Currency switching is both simpler and less powerful. This was done primarily for users, to have a clear and logical understanding, but the code is also simpler. The main change is that it is now forbidden to switch a project to "no currency" if bills don't share the same currency. Also, tests assume that projects are created without currency, as in the web UI.
35 lines
1.6 KiB
HTML
35 lines
1.6 KiB
HTML
{% extends "layout.html" %}
|
|
{% block content %}
|
|
{% if is_admin_dashboard_activated %}
|
|
<table id="bill_table" class="table table-striped">
|
|
<thead><tr><th>{{ _("Project") }}</th><th>{{ _("Number of members") }}</th><th>{{ _("Number of bills") }}</th><th>{{_("Newest bill")}}</th><th>{{_("Oldest bill")}}</th><th>{{_("Actions")}}</th></tr></thead>
|
|
<tbody>{% for project in projects|sort(attribute='name') %}
|
|
<tr>
|
|
<td><a href="{{ url_for(".list_bills", project_id=project.id) }}" title="{{ project.name }}">{{ project.name }}</a></td><td>{{ project.members | count }}</td><td>{{ project.get_bills_unordered().count() }}</td>
|
|
{% if project.has_bills() %}
|
|
<td>{{ project.get_bills().all()[0].date }}</td>
|
|
<td>{{ project.get_bills().all()[-1].date }}</td>
|
|
{% else %}
|
|
<td></td>
|
|
<td></td>
|
|
{% endif %}
|
|
<td class="project-actions">
|
|
<a class="edit" href="{{ url_for(".edit_project", project_id=project.id) }}" title="{{ _("edit") }}">{{ _('edit') }}</a>
|
|
<a class="delete" href="{{ url_for(".delete_project", project_id=project.id) }}" title="{{ _("delete") }}">{{ _('delete') }}</a>
|
|
<a class="show" href="{{ url_for(".list_bills", project_id=project.id) }}" title="{{ _("show") }}">{{ _('show') }}</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<script language="JavaScript">
|
|
$(document).ready(function() {
|
|
$('#bill_table').DataTable({
|
|
paging: true
|
|
});
|
|
})
|
|
</script>
|
|
{% else %}
|
|
<div class="alert alert-danger">{{ _("The Dashboard is currently deactivated.") }}</div>
|
|
{% endif %}
|
|
{% endblock %}
|