* adds EMA tests * extends compensation tests * fixes bugs detected by testing * restructured tests for performance boost
63 lines
2.4 KiB
HTML
63 lines
2.4 KiB
HTML
{% load i18n l10n fontawesome_5 humanize %}
|
|
<div id="actions" class="card">
|
|
<div class="card-header rlp-r">
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<h5>
|
|
<span class="badge badge-light">{{actions.count}}</span>
|
|
{% trans 'Actions' context 'Compensation' %}
|
|
</h5>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="d-flex justify-content-end">
|
|
{% if is_default_member and has_access %}
|
|
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'compensation:acc-new-action' obj.id %}" title="{% trans 'Add new action' %}">
|
|
{% fa5_icon 'plus' %}
|
|
{% fa5_icon 'seedling' %}
|
|
</button>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body scroll-300">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">
|
|
{% trans 'Action type' %}
|
|
</th>
|
|
<th scope="col">
|
|
{% trans 'Amount' context 'Compensation' %}
|
|
</th>
|
|
<th scope="col">
|
|
{% trans 'Comment' %}
|
|
</th>
|
|
{% if default_member and has_access %}
|
|
<th scope="col">
|
|
{% trans 'Action' %}
|
|
</th>
|
|
{% endif %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for action in actions %}
|
|
<tr>
|
|
<td class="align-middle">
|
|
{{ action.action_type }}
|
|
</td>
|
|
<td class="align-middle">{{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }}</td>
|
|
<td class="align-middle">{{ action.comment|default_if_none:"" }}</td>
|
|
<td>
|
|
{% if is_default_member and has_access %}
|
|
<button data-form-url="{% url 'compensation:acc-action-remove' obj.id action.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove action' %}">
|
|
{% fa5_icon 'trash' %}
|
|
</button>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div> |