2022-02-02 12:54:45 +01:00
|
|
|
{% load i18n l10n fontawesome_5 humanize ksp_filters %}
|
2021-08-19 13:44:06 +02:00
|
|
|
<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">{{obj.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 'ema:new-action' obj.id %}" title="{% trans 'Add new action' %}">
|
|
|
|
{% fa5_icon 'plus' %}
|
|
|
|
{% fa5_icon 'seedling' %}
|
|
|
|
</button>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-02-02 14:18:44 +01:00
|
|
|
<div class="card-body scroll-300 p-2">
|
2021-08-19 13:44:06 +02:00
|
|
|
<table class="table table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2022-01-31 12:58:55 +01:00
|
|
|
<th class="w-25" scope="col">
|
2021-08-19 13:44:06 +02:00
|
|
|
{% trans 'Action type' %}
|
|
|
|
</th>
|
|
|
|
<th scope="col">
|
|
|
|
{% trans 'Amount' context 'Compensation' %}
|
|
|
|
</th>
|
|
|
|
<th scope="col">
|
|
|
|
{% trans 'Comment' %}
|
|
|
|
</th>
|
|
|
|
<th scope="col">
|
2022-02-02 14:18:44 +01:00
|
|
|
<span class="float-right">
|
|
|
|
{% trans 'Action' %}
|
|
|
|
</span>
|
2021-08-19 13:44:06 +02:00
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for action in obj.actions.all %}
|
|
|
|
<tr>
|
2022-02-02 14:18:44 +01:00
|
|
|
<td class="">
|
|
|
|
<span>{{ action.action_type }}</span>
|
|
|
|
{% if action.action_type_details.count > 0 %}
|
2022-02-02 14:26:39 +01:00
|
|
|
<br>
|
2022-02-02 14:18:44 +01:00
|
|
|
{% for detail in action.action_type_details.all %}
|
2022-02-02 14:26:39 +01:00
|
|
|
<span class="badge badge-pill rlp-r" title="{{detail}}">{{detail.long_name}}</span>
|
2022-02-02 14:18:44 +01:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2022-01-31 12:58:55 +01:00
|
|
|
</td>
|
2022-02-02 14:18:44 +01:00
|
|
|
<td class="">{{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }}</td>
|
|
|
|
<td class="">
|
2022-02-02 12:54:45 +01:00
|
|
|
<div class="scroll-150">
|
|
|
|
{{ action.comment }}
|
|
|
|
</div>
|
|
|
|
</td>
|
2022-02-02 14:18:44 +01:00
|
|
|
<td class="">
|
2021-08-19 13:44:06 +02:00
|
|
|
{% if is_default_member and has_access %}
|
2022-02-02 14:18:44 +01:00
|
|
|
<button data-form-url="{% url 'ema:action-remove' obj.id action.id %}" class="btn btn-default btn-modal float-right" title="{% trans 'Remove action' %}">
|
2021-08-19 13:44:06 +02:00
|
|
|
{% fa5_icon 'trash' %}
|
|
|
|
</button>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|