bornhack-website/src/backoffice/templates/reimbursement_list.html

56 lines
1.5 KiB
HTML

{% extends 'base.html' %}
{% load staticfiles %}
{% block extra_head %}
<script src="{% static "js/jquery.dataTables.min.js" %}"></script>
<link rel="stylesheet" href="{% static 'css/jquery.dataTables.min.css' %}">
{% endblock extra_head %}
{% block content %}
<div class="row">
<h2>Reimbursements for {{ camp.title }}</h2>
</div>
<br>
<div class="row">
<table class="table table-hover">
<thead>
<tr>
<th>Camp</th>
<th>Created by</th>
<th>Reimbursement User</th>
<th>Economy Team Notes</th>
<th>Amount</th>
<th>Paid</th>
<th>Expenses</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>{% for expense in reim.expenses.all %}{{ expense.pk }}<br>{% endfor %}</td>
<td>
<a class="btn btn-primary" href="{% url "backoffice:reimbursement_detail" camp_slug=camp.slug pk=reim.pk %}">Details</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<a class="btn btn-success" href="{% url "backoffice:reimbursement_create_userselect" camp_slug=camp.slug %}">Create New Reimbursement</a>
<script>
$(document).ready(function(){
$('.table').DataTable();
});
</script>
{% endblock content %}