mirror of
https://github.com/netbox-community/netbox.git
synced 2026-02-04 06:16:23 -06:00
CI / build (20.x, 3.12) (push) Waiting to run
CI / build (20.x, 3.13) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
* Closes #16137: Remove is_staff boolean from User model * Remove default is_staff value from UserManager.create_user() * Restore staff_only on MenuItem * Introduce IsSuperuser API permission to replace IsAdminUser * Update and improve RQ task API view tests * Remove is_staff attribute assignment from RemoteUserBackend
65 lines
2.5 KiB
HTML
65 lines
2.5 KiB
HTML
{% load i18n %}
|
|
{% load navigation %}
|
|
|
|
{% if settings.RELEASE.features.help_center %}
|
|
{# Help center control #}
|
|
<a href="#" class="nav-link px-1" aria-label="{% trans "Help center" %}">
|
|
<i class="mdi mdi-forum-outline"></i>
|
|
</a>
|
|
{% endif %}
|
|
|
|
{% if request.user.is_authenticated %}
|
|
{# Notifications #}
|
|
{% with notifications=request.user.notifications.unread.exists %}
|
|
<div class="dropdown">
|
|
<button class="nav-link fs-2 p-0" data-bs-toggle="dropdown" hx-get="{% url 'extras:notifications' %}" hx-target="next .notifications" aria-label="{% trans "Notifications" %}">
|
|
{% include 'inc/notification_bell.html' %}
|
|
</button>
|
|
<div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow notifications"></div>
|
|
</div>
|
|
{% endwith %}
|
|
|
|
{# User menu #}
|
|
<div class="nav-item dropdown">
|
|
<a href="#" class="nav-link d-flex lh-1 text-reset p-0" data-bs-toggle="dropdown" aria-label="Open user menu">
|
|
<div class="d-xl-block ps-2">
|
|
<div>{{ request.user }}</div>
|
|
<div class="mt-1 small text-secondary">
|
|
{% if request.user.is_superuser %}
|
|
{% trans "Admin" %}
|
|
{% else %}
|
|
{% trans "User" %}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</a>
|
|
<div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow" {% htmx_boost %}>
|
|
<a href="{% url 'account:profile' %}" class="dropdown-item">
|
|
<i class="mdi mdi-account"></i> {% trans "Profile" %}
|
|
</a>
|
|
<a href="{% url 'account:bookmarks' %}" class="dropdown-item">
|
|
<i class="mdi mdi-bookmark"></i> {% trans "Bookmarks" %}
|
|
</a>
|
|
<a href="{% url 'account:subscriptions' %}" class="dropdown-item">
|
|
<i class="mdi mdi-bell"></i> {% trans "Subscriptions" %}
|
|
</a>
|
|
<a href="{% url 'account:preferences' %}" class="dropdown-item">
|
|
<i class="mdi mdi-wrench"></i> {% trans "Preferences" %}
|
|
</a>
|
|
<a href="{% url 'account:usertoken_list' %}" class="dropdown-item">
|
|
<i class="mdi mdi-key"></i> {% trans "API Tokens" %}
|
|
</a>
|
|
<hr class="dropdown-divider" />
|
|
<a href="{% url 'logout' %}" hx-disable="true" class="dropdown-item">
|
|
<i class="mdi mdi-logout-variant"></i> {% trans "Log Out" %}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="btn-group align-items-center ps-2">
|
|
<a class="btn btn-primary" type="button" href="{% url 'login' %}?next={{ request.path }}">
|
|
<i class="mdi mdi-login-variant"></i> {% trans "Log In" %}
|
|
</a>
|
|
</div>
|
|
{% endif %}
|