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> </div>
<h2>Voies & Capacités</h2> <h2>Voies & Capacités</h2>
{% include "character/snippets/character_details/paths_and_capabilities.html" %} {% 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 %} {% endblock %}

View file

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