* adds access checks depending on the current group confgiguration of a user * removes buttons for adding/editing or removing data if default group is not set for a user * removes buttons for adding/removing related data in unshared interventions * removes shared-user setting from share menu of an intervention if user is not zb or ets * renames has_access() from intervention Model into is_shared_with() for more clarity * fixes bug in group check in_group() from utils.py
61 lines
2.2 KiB
HTML
61 lines
2.2 KiB
HTML
{% load i18n l10n fontawesome_5 %}
|
|
<div id="related-compensations" class="card">
|
|
<div class="card-header rlp-r">
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<h5>
|
|
<span class="badge badge-light">{{compensations.count}}</span>
|
|
{% trans 'Compensations' %}
|
|
</h5>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="d-flex justify-content-end">
|
|
{% if is_default_member and has_access %}
|
|
<a href="{% url 'compensation:new' %}" title="{% trans 'Add new compensation' %}">
|
|
<button class="btn btn-outline-default">
|
|
{% fa5_icon 'plus' %}
|
|
{% fa5_icon 'leaf' %}
|
|
</button>
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body scroll-300">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">
|
|
{% trans 'Identifier' %}
|
|
</th>
|
|
<th scope="col">
|
|
{% trans 'Title' %}
|
|
</th>
|
|
<th scope="col">
|
|
{% trans 'Action' %}
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for comp in compensations %}
|
|
<tr>
|
|
<td class="align-middle">
|
|
<a href="{% url 'compensation:open' comp.id %}">
|
|
{{ comp.identifier }}
|
|
</a>
|
|
</td>
|
|
<td class="align-middle">{{ comp.title }}</td>
|
|
<td>
|
|
{% if is_default_member and has_access %}
|
|
<button data-form-url="{% url 'compensation:remove' comp.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove compensation' %}">
|
|
{% fa5_icon 'trash' %}
|
|
</button>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div> |