bornhack-website/src/economy/templates/includes/revenue_list_panel.html

45 lines
1.6 KiB
HTML

{% if revenue_list %}
<table class="table table-hover">
<thead>
<tr>
<th>Created By</th>
<th>Debtor</th>
<th>Amount</th>
<th>Invoice Date</th>
<th>Description</th>
<th>Responsible Team</th>
<th>Approved</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for revenue in revenue_list %}
<tr>
<td>{{ revenue.user }}</td>
<td>{{ revenue.debtor }}</td>
<td>{{ revenue.amount }} DKK</td>
<td>{{ revenue.invoice_date }}</td>
<td>{{ revenue.description }}</td>
<td>{{ revenue.responsible_team.name }} Team</td>
<td>{{ revenue.approval_status }}</td>
<td>
{% if request.resolver_match.app_name == "backoffice" %}
<a class="btn btn-primary" href="{% url 'backoffice:revenue_detail' camp_slug=camp.slug pk=revenue.uuid %}"><i class="fas fa-search"></i> Details</a>
{% if request.user.is_staff %}
<a class="btn btn-primary" href="{% url 'admin:index' %}economy/revenue/{{ revenue.uuid }}/change/"><i class="fas fa-edit"></i> Admin</a>
{% endif %}
{% else %}
<a class="btn btn-primary" href="{% url 'economy:revenue_detail' camp_slug=camp.slug pk=revenue.uuid %}"><i class="fas fa-search"></i> Details</a>
<a class="btn btn-primary" href="{% url 'economy:revenue_update' camp_slug=camp.slug pk=revenue.uuid %}"><i class="fas fa-edit"></i> Update</a>
<a class="btn btn-danger" href="{% url 'economy:revenue_delete' camp_slug=camp.slug pk=revenue.uuid %}"><i class="fas fa-times"></i> Delete</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<h4>No revenues found.</h4>
{% endif %}