#25 Public reports
* prevents Actions column in tables from being rendered if there would be no buttons inside due to permission checking * enhances amount of sql requests for detail view and report view
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<h5>
|
||||
<span class="badge badge-light">{{obj.actions.count}}</span>
|
||||
<span class="badge badge-light">{{actions.count}}</span>
|
||||
{% trans 'Actions' context 'Compensation' %}
|
||||
</h5>
|
||||
</div>
|
||||
@@ -41,7 +41,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for action in obj.actions.all %}
|
||||
{% for action in actions %}
|
||||
<tr>
|
||||
<td class="align-middle">
|
||||
{{ action.action_type }}
|
||||
|
||||
@@ -33,9 +33,11 @@
|
||||
<th scope="col">
|
||||
{% trans 'Comment' %}
|
||||
</th>
|
||||
<th scope="col">
|
||||
{% trans 'Action' %}
|
||||
</th>
|
||||
{% if is_default_member and has_access %}
|
||||
<th scope="col">
|
||||
{% trans 'Action' %}
|
||||
</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -30,9 +30,11 @@
|
||||
<th scope="col">
|
||||
{% trans 'Comment' %}
|
||||
</th>
|
||||
<th scope="col">
|
||||
{% trans 'Action' %}
|
||||
</th>
|
||||
{% if is_default_member and has_access %}
|
||||
<th scope="col">
|
||||
{% trans 'Action' %}
|
||||
</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<h5>
|
||||
<span class="badge badge-light">{{obj.before_states.count}}</span>
|
||||
<span class="badge badge-light">{{before_states.count}}</span>
|
||||
{% trans 'States before' %}
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
@@ -23,10 +23,14 @@
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Funded by' %}</th>
|
||||
<td class="align-middle">
|
||||
{% for funding in obj.fundings.all %}
|
||||
{% with obj.fundings.all as fundings %}
|
||||
{% for funding in fundings %}
|
||||
<div class="badge pill-badge rlp-r-outline">{{funding.short_name}}</div>
|
||||
<br>
|
||||
{% empty %}
|
||||
{% trans 'None' %}
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user