2015-04-21 11:46:58 +00:00
|
|
|
{% load i18n %}
|
2023-08-09 06:20:18 +00:00
|
|
|
{% load bootstrap_icons %}
|
2020-05-27 12:24:06 +00:00
|
|
|
{% load common_tags %}
|
|
|
|
<!-- Fixed navbar -->
|
2021-10-01 06:48:09 +00:00
|
|
|
<nav class="navbar sticky-top navbar-expand-md navbar-dark bg-primary mb-3" aria-label="Main top navbar">
|
2020-05-27 12:24:06 +00:00
|
|
|
<div class="container">
|
2020-05-19 16:53:54 +00:00
|
|
|
<a class="navbar-brand" href="{% url 'index' %}">WebVirtCloud</a>
|
2021-07-07 11:12:38 +00:00
|
|
|
<button type="button" class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#navbar" aria-expanded="false" aria-label="Toggle navigation">
|
2020-05-19 16:53:54 +00:00
|
|
|
<span class="navbar-toggler-icon"></span>
|
|
|
|
</button>
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="collapse navbar-collapse" id="navbar">
|
|
|
|
<ul class="navbar-nav">
|
2020-05-19 16:53:54 +00:00
|
|
|
<li class="nav-item {% class_active request '^/instances' %}">
|
2023-08-09 06:20:18 +00:00
|
|
|
<a class="nav-link" href="{% url 'instances:index' %}">{% bs_icon 'laptop' %} {% trans "Instances" %}</a>
|
2020-05-27 12:24:06 +00:00
|
|
|
</li>
|
|
|
|
{% if request.user.is_superuser %}
|
2020-05-24 16:20:43 +00:00
|
|
|
<li class="nav-item {% class_active request '^/computes' %}">
|
2023-08-09 06:20:18 +00:00
|
|
|
<a class="nav-link" href="{% url 'computes' %}">{% bs_icon 'server' %} {% trans "Computes" %}</a>
|
2020-05-24 16:20:43 +00:00
|
|
|
</li>
|
2020-05-27 12:24:06 +00:00
|
|
|
{% endif %}
|
|
|
|
</ul>
|
2021-07-07 11:12:38 +00:00
|
|
|
<ul class="navbar-nav ms-auto">
|
2020-05-24 16:20:43 +00:00
|
|
|
{% if request.user.is_superuser %}
|
|
|
|
<li class="nav-item dropdown {% app_active request 'admin' %}">
|
2021-07-07 11:12:38 +00:00
|
|
|
<a class="nav-link" id="administration" href="#" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
2023-08-09 06:20:18 +00:00
|
|
|
{% bs_icon 'wrench' %}
|
2020-05-24 16:20:43 +00:00
|
|
|
</a>
|
|
|
|
<div class="dropdown-menu" aria-labelledby="administration">
|
2023-08-09 06:20:18 +00:00
|
|
|
<a class="dropdown-item {% view_active request 'admin:user_list' %}" href="{% url 'admin:user_list' %}">{% bs_icon 'person-plus' %} {% trans "Users" %}</a>
|
|
|
|
<a class="dropdown-item {% view_active request 'admin:group_list' %}" href="{% url 'admin:group_list' %}">{% bs_icon 'people-fill' %} {% trans "Groups" %}</a>
|
|
|
|
<a class="dropdown-item {% view_active request 'admin:logs' %}" href="{% url 'admin:logs' %}">{% bs_icon 'card-list' %} {% trans "Logs" %}</a>
|
|
|
|
<a class="dropdown-item {% view_active request 'appsettings' %}" href="{% url 'appsettings' %}">{% bs_icon 'gear-wide-connected' %} {% trans "Settings" %}</i></a>
|
2020-05-24 16:20:43 +00:00
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
2020-05-19 16:53:54 +00:00
|
|
|
<li class="nav-item dropdown {% class_active request '^/accounts' %}">
|
2021-07-07 11:12:38 +00:00
|
|
|
<a class="nav-link dropdown-toggle" href="#" id="navbarUserDropdown" data-bs-toggle="dropdown" role="button" aria-expanded="false">
|
2023-08-09 06:20:18 +00:00
|
|
|
{% bs_icon 'person' %} {{ request.user.username }}
|
2020-05-19 16:53:54 +00:00
|
|
|
</a>
|
|
|
|
<div class="dropdown-menu" aria-labelledby="navbarUserDropdown">
|
2020-06-10 08:15:14 +00:00
|
|
|
{% get_current_language as LANGUAGE_CODE %}
|
|
|
|
<a class="dropdown-item disabled" href="#">
|
2021-07-07 11:12:38 +00:00
|
|
|
{% trans "Language" %}: <span class="badge bg-secondary">{{ LANGUAGE_CODE }}</span>
|
2020-06-10 08:15:14 +00:00
|
|
|
</a>
|
2023-08-09 06:20:18 +00:00
|
|
|
<a class="dropdown-item {% view_active request 'accounts:profile' %}" href="{% url 'accounts:profile' %}">{% bs_icon 'person-vcard' %} {% trans "Profile" %}</a>
|
2020-05-19 16:53:54 +00:00
|
|
|
<div class="dropdown-divider"></div>
|
2023-08-09 06:20:18 +00:00
|
|
|
<a class="dropdown-item" href="{% url 'accounts:logout' %}">{% bs_icon 'power' %} {% trans "Log Out" %}</a>
|
2020-05-19 16:53:54 +00:00
|
|
|
</div>
|
2020-05-27 12:24:06 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div><!--/.nav-collapse -->
|
|
|
|
</div>
|
|
|
|
</nav>
|