# Variable refactoring
* renames variable `has_access` into `is_entry_shared` for better understanding in various places (mostly html related)
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="d-flex justify-content-end">
|
||||
{% if is_default_member and has_access %}
|
||||
{% if is_default_member and is_entry_shared %}
|
||||
<a href="{% url 'compensation:new' obj.id %}" title="{% trans 'Add new compensation' %}">
|
||||
<button class="btn btn-outline-default">
|
||||
{% fa5_icon 'plus' %}
|
||||
@@ -32,7 +32,7 @@
|
||||
<th scope="col">
|
||||
{% trans 'Title' %}
|
||||
</th>
|
||||
{% if is_default_member and has_access %}
|
||||
{% if is_default_member and is_entry_shared %}
|
||||
<th class="w-10" scope="col">
|
||||
<span class="float-right">
|
||||
{% trans 'Action' %}
|
||||
@@ -51,7 +51,7 @@
|
||||
</td>
|
||||
<td class="align-middle">{{ comp.title }}</td>
|
||||
<td>
|
||||
{% if is_default_member and has_access %}
|
||||
{% if is_default_member and is_entry_shared %}
|
||||
<button data-form-url="{% url 'intervention:remove-compensation' obj.id comp.id %}" class="btn btn-default btn-modal float-right" title="{% trans 'Remove compensation' %}">
|
||||
{% fa5_icon 'trash' %}
|
||||
</button>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
{% fa5_icon 'file-alt' %}
|
||||
</button>
|
||||
</a>
|
||||
{% if has_access %}
|
||||
{% if is_entry_shared %}
|
||||
<button class="btn btn-default btn-modal mr-2" title="{% trans 'Resubmission' %}" data-form-url="{% url 'intervention:resubmission-create' obj.id %}">
|
||||
{% fa5_icon 'bell' %}
|
||||
</button>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="d-flex justify-content-end">
|
||||
{% if is_default_member and has_access %}
|
||||
{% if is_default_member and is_entry_shared %}
|
||||
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'intervention:new-deduction' obj.id %}" title="{% trans 'Add new deduction' %}">
|
||||
{% fa5_icon 'plus' %}
|
||||
{% fa5_icon 'tree' %}
|
||||
@@ -33,7 +33,7 @@
|
||||
<th scope="col">
|
||||
{% trans 'Created' %}
|
||||
</th>
|
||||
{% if is_default_member and has_access %}
|
||||
{% if is_default_member and is_entry_shared %}
|
||||
<th class="w-10" scope="col">
|
||||
<span class="float-right">
|
||||
{% trans 'Action' %}
|
||||
@@ -56,7 +56,7 @@
|
||||
<td class="align-middle">{{ deduction.surface|floatformat:2|intcomma }} m²</td>
|
||||
<td class="align-middle">{{ deduction.created.timestamp|default_if_none:""|naturalday}}</td>
|
||||
<td class="align-middle float-right">
|
||||
{% if is_default_member and has_access %}
|
||||
{% if is_default_member and is_entry_shared %}
|
||||
<button data-form-url="{% url 'intervention:edit-deduction' obj.id deduction.id %}" class="btn btn-default btn-modal" title="{% trans 'Edit Deduction' %}">
|
||||
{% fa5_icon 'edit' %}
|
||||
</button>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="d-flex justify-content-end">
|
||||
{% if is_default_member and has_access %}
|
||||
{% if is_default_member and is_entry_shared %}
|
||||
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'intervention:new-doc' obj.id %}" title="{% trans 'Add new document' %}">
|
||||
{% fa5_icon 'plus' %}
|
||||
{% fa5_icon 'file' %}
|
||||
@@ -38,7 +38,7 @@
|
||||
<th scope="col">
|
||||
{% trans 'Comment' %}
|
||||
</th>
|
||||
{% if is_default_member and has_access %}
|
||||
{% if is_default_member and is_entry_shared %}
|
||||
<th class="w-10" scope="col">
|
||||
<span class="float-right">
|
||||
{% trans 'Action' %}
|
||||
@@ -66,7 +66,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class="align-middle float-right">
|
||||
{% if is_default_member and has_access %}
|
||||
{% if is_default_member and is_entry_shared %}
|
||||
<button data-form-url="{% url 'intervention:edit-doc' obj.id doc.id %}" class="btn btn-default btn-modal" title="{% trans 'Edit document' %}">
|
||||
{% fa5_icon 'edit' %}
|
||||
</button>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="d-flex justify-content-end">
|
||||
{% if is_default_member and has_access %}
|
||||
{% if is_default_member and is_entry_shared %}
|
||||
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'compensation:pay:new' obj.id %}" title="{% trans 'Add new payment' %}">
|
||||
{% fa5_icon 'plus' %}
|
||||
{% fa5_icon 'money-bill-wave' %}
|
||||
@@ -33,7 +33,7 @@
|
||||
<th class="w-50" scope="col">
|
||||
{% trans 'Comment' %}
|
||||
</th>
|
||||
{% if is_default_member and has_access %}
|
||||
{% if is_default_member and is_entry_shared %}
|
||||
<th class="w-10" scope="col">
|
||||
<span class="float-right">
|
||||
{% trans 'Action' %}
|
||||
@@ -46,7 +46,7 @@
|
||||
{% for pay in obj.payments.all %}
|
||||
<tr>
|
||||
<td class="align-middle">
|
||||
{% if has_access %}
|
||||
{% if is_entry_shared %}
|
||||
{{ pay.amount|floatformat:2 }} €
|
||||
{% else %}
|
||||
***
|
||||
@@ -55,7 +55,7 @@
|
||||
<td class="align-middle">{{ pay.due_on|default_if_none:"---" }}</td>
|
||||
<td class="align-middle">
|
||||
<div class="scroll-150">
|
||||
{% if has_access %}
|
||||
{% if is_entry_shared %}
|
||||
{{ pay.comment }}
|
||||
{% else %}
|
||||
{% trans 'This data is not shared with you' %}
|
||||
@@ -63,7 +63,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class="align-middle float-right">
|
||||
{% if is_default_member and has_access %}
|
||||
{% if is_default_member and is_entry_shared %}
|
||||
<button data-form-url="{% url 'compensation:pay:edit' obj.id pay.id %}" class="btn btn-default btn-modal" title="{% trans 'Edit payment' %}">
|
||||
{% fa5_icon 'edit' %}
|
||||
</button>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
{% comment %}
|
||||
Only show add-button if no revocation exists, yet.
|
||||
{% endcomment %}
|
||||
{% if is_default_member and has_access and not obj.legal.revocation %}
|
||||
{% if is_default_member and is_entry_shared and not obj.legal.revocation %}
|
||||
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'intervention:new-revocation' obj.id %}" title="{% trans 'Add revocation' %}">
|
||||
{% fa5_icon 'plus' %}
|
||||
{% fa5_icon 'ban' %}
|
||||
@@ -36,7 +36,7 @@
|
||||
<th scope="col">
|
||||
{% trans 'Comment' %}
|
||||
</th>
|
||||
{% if is_default_member and has_access %}
|
||||
{% if is_default_member and is_entry_shared %}
|
||||
<th class="w-10" scope="col">
|
||||
<span class="float-right">
|
||||
{% trans 'Action' %}
|
||||
@@ -64,7 +64,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class="align-middle float-right">
|
||||
{% if is_default_member and has_access %}
|
||||
{% if is_default_member and is_entry_shared %}
|
||||
<button data-form-url="{% url 'intervention:edit-revocation' obj.id rev.id %}" class="btn btn-default btn-modal" title="{% trans 'Edit revocation' %}">
|
||||
{% fa5_icon 'edit' %}
|
||||
</button>
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
{% include 'user/includes/team_data_modal_button.html' %}
|
||||
{% endfor %}
|
||||
<hr>
|
||||
{% if has_access %}
|
||||
{% if is_entry_shared %}
|
||||
{% for user in obj.users.all %}
|
||||
{% include 'user/includes/contact_modal_button.html' %}
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user