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

42 lines
1.6 KiB
HTML

{% if reimbursement_list %}
<table class="table table-hover">
<thead>
<tr>
<th>Camp</th>
<th>Created By</th>
<th>Created For</th>
<th>Economy Team Notes</th>
<th>Amount</th>
<th>Paid</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for reim in reimbursement_list %}
<tr>
<td>{{ reim.camp }}</td>
<td>{{ reim.user }}</td>
<td>{{ reim.reimbursement_user }}</td>
<td>{{ reim.notes|default:"N/A" }}</td>
<td>{{ reim.amount }} DKK</td>
<td>{{ reim.paid }}</td>
<td>
{% if request.resolver_match.app_name == "backoffice" %}
<a class="btn btn-primary" href="{% url "backoffice:reimbursement_detail" camp_slug=camp.slug pk=reim.pk %}"><i class="fas fa-search"></i> Details</a>
<a class="btn btn-primary" href="{% url "backoffice:reimbursement_update" camp_slug=camp.slug pk=reim.pk %}"><i class="fas fa-edit"></i> Update</a>
{% if not reim.paid %}
<a class="btn btn-danger" href="{% url "backoffice:reimbursement_delete" camp_slug=camp.slug pk=reim.pk %}"><i class="fas fa-times"></i> Delete</a>
{% endif %}
{% else %}
<a class="btn btn-primary" href="{% url "economy:reimbursement_detail" camp_slug=camp.slug pk=reim.pk %}"><i class="fas fa-search"></i> Details</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<h4>No reimbursements found for {{ camp.title }}</h4>
{% endif %}