feat: Don't display edit buttons when no permission
This commit is contained in:
parent
87188dbd4f
commit
739418feb6
@ -8,11 +8,14 @@
|
|||||||
<div class="tag species">{{ animal.species }}</div>
|
<div class="tag species">{{ animal.species }}</div>
|
||||||
<div class="tag sex">{{ animal.get_sex_display }}</div>
|
<div class="tag sex">{{ animal.get_sex_display }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!--- Assume a user does not have edit permissions on animal if they have no other edit permission --->
|
||||||
|
{% if has_edit_permission %}
|
||||||
<div class="container-edit-buttons">
|
<div class="container-edit-buttons">
|
||||||
<a class="btn" href="{% url 'animal-edit' animal_id=animal.pk %}">{% translate 'Bearbeiten' %}</a>
|
<a class="btn" href="{% url 'animal-edit' animal_id=animal.pk %}">{% translate 'Bearbeiten' %}</a>
|
||||||
<a class="btn" href="{% url 'animal-add-photo' animal_id=animal.pk %}">{% translate 'Foto hinzufügen' %}</a>
|
<a class="btn"
|
||||||
|
href="{% url 'animal-add-photo' animal_id=animal.pk %}">{% translate 'Foto hinzufügen' %}</a>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if animal.description %}
|
{% if animal.description %}
|
||||||
|
Loading…
Reference in New Issue
Block a user