Hide notes to observers

This commit is contained in:
Gabriel Augendre 2022-11-06 15:36:53 +01:00
parent ba33291972
commit 855a853415
2 changed files with 11 additions and 10 deletions

View file

@ -469,5 +469,8 @@
</div>
<h2>Voies & Capacités</h2>
{% include "character/snippets/character_details/paths_and_capabilities.html" %}
{% include "character/snippets/character_details/notes_display.html" %}
{% if character|managed_by:user %}
{% include "character/snippets/character_details/notes_display.html" %}
{% endif %}
{% endblock %}

View file

@ -2,15 +2,13 @@
<div class="mt-3" id="notes">
<h2>
Notes
{% if character|managed_by:user %}
<a hx-get="{% url "character:notes_change" pk=character.pk %}"
hx-target="#notes"
hx-swap="outerHTML"
class="btn btn-primary btn-sm"
>
<i class="fa-solid fa-pen-to-square"></i> Edit
</a>
{% endif %}
<a hx-get="{% url "character:notes_change" pk=character.pk %}"
hx-target="#notes"
hx-swap="outerHTML"
class="btn btn-primary btn-sm"
>
<i class="fa-solid fa-pen-to-square"></i> Edit
</a>
</h2>
{{ character.get_formatted_notes|safe }}
</div>