Skip to content

Commit

Permalink
feat(core): enclose user-menu items in a block
Browse files Browse the repository at this point in the history
This allows to add additional items to the user-menu
  • Loading branch information
b1rger committed Jan 30, 2025
1 parent 954e49d commit 2046838
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions apis_core/core/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,19 @@
aria-haspopup="true"
aria-expanded="false">User: {{ user.get_username }}</a>
<div class="dropdown-menu dropdown-menu-right">
<div class="dropdown-item">
<form action="{% url 'apis_core:logout' %}?next=/" method="post">
{% csrf_token %}
<button type="submit" class="btn">
<span class="material-symbols-outlined material-symbols-align">logout</span>
log out
</button>
</form>
</div>

{% block user-menu-items %}
<div class="dropdown-item">
<form action="{% url 'apis_core:logout' %}?next=/" method="post">
{% csrf_token %}
<button type="submit" class="btn">
<span class="material-symbols-outlined material-symbols-align">logout</span>
log out
</button>
</form>
</div>
{% endblock user-menu-items %}

</div>
</li>
{% else %}
Expand Down

0 comments on commit 2046838

Please sign in to comment.