society-self-service/sstreasury/jinja2/sstreasury/claim_list.html

75 lines
2.2 KiB
HTML

{% extends 'sstreasury/base.html' %}
{#
Society Self-Service
Copyright © 2018–2020 Yingtong Li (RunasSudo)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Your reimbursement claims{% endblock %}
{% macro listclaims(claims) %}
<table class="ui selectable celled table">
<thead>
<tr>
<th class="eleven wide">Purpose</th>
<th class="four wide">Status</th>
<th class="one wide">View</th>
</tr>
</thead>
<tbody>
{% for claim in claims %}
<tr>
<td class="selectable"><a href="{{ url('claim_view', kwargs={'id': claim.id}) }}">{{ claim.purpose }}</a></td>
<td class="selectable"><a href="{{ url('claim_view', kwargs={'id': claim.id}) }}">{{ claim.get_state_display() }}</a></td>
<td>
<a href="{{ url('claim_view', kwargs={'id': claim.id}) }}" class="ui tiny primary icon button"><i class="eye icon"></i></a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endmacro %}
{% block maincontent %}
<h1>Your reimbursement claims</h1>
{% if not claims_action and not claims_open and not claims_closed %}
<p>You have no reimbursement claims to view. To create a claim, click <a href="{{ url('claim_new') }}">Create new claim</a>.</p>
{% endif %}
{% if claims_action %}
<h2>Claims requiring action</h2>
{{ listclaims(claims_action) }}
{% endif %}
{% if claims_open %}
<h2>Open claims</h2>
{{ listclaims(claims_open) }}
{% endif %}
{% if claims_closed %}
<h2>Closed claims</h2>
{{ listclaims(claims_closed) }}
{% endif %}
{% endblock %}
{% block head %}
{{ super() }}
{% endblock %}