2015-04-21 11:46:58 +00:00
|
|
|
{% load i18n %}
|
2020-06-15 08:46:13 +00:00
|
|
|
{% load icons %}
|
2020-05-27 12:24:06 +00:00
|
|
|
{% load common_tags %}
|
|
|
|
<!-- Fixed navbar -->
|
2020-05-26 13:18:38 +00:00
|
|
|
<nav class="navbar 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' %}">
|
2020-06-16 12:57:50 +00:00
|
|
|
<a class="nav-link" href="{% url 'instances:index' %}"><i class="fa fa-fw fa-desktop"></i> {% 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' %}">
|
|
|
|
<a class="nav-link" href="{% url 'computes' %}"><i class="fa fa-fw fa-server"></i> {% trans "Computes" %}</a>
|
|
|
|
</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">
|
2020-05-24 16:20:43 +00:00
|
|
|
{% icon 'wrench' %}
|
|
|
|
</a>
|
|
|
|
<div class="dropdown-menu" aria-labelledby="administration">
|
|
|
|
<a class="dropdown-item {% view_active request 'admin:user_list' %}" href="{% url 'admin:user_list' %}">{% icon 'user-plus' %} {% trans "Users" %}</a>
|
|
|
|
<a class="dropdown-item {% view_active request 'admin:group_list' %}" href="{% url 'admin:group_list' %}">{% icon 'users' %} {% trans "Groups" %}</a>
|
|
|
|
<a class="dropdown-item {% view_active request 'admin:logs' %}" href="{% url 'admin:logs' %}">{% icon 'list-alt' %} {% trans "Logs" %}</a>
|
|
|
|
<a class="dropdown-item {% view_active request 'appsettings' %}" href="{% url 'appsettings' %}">{% icon 'cogs' %} {% trans "Settings" %}</i></a>
|
|
|
|
</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">
|
2020-05-19 16:53:54 +00:00
|
|
|
<i class="fa fa-fw fa-user"></i> {{ request.user.username }}
|
|
|
|
</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>
|
2020-10-14 08:37:46 +00:00
|
|
|
<a class="dropdown-item {% view_active request 'accounts:profile' %}" href="{% url 'accounts:profile' %}">{% icon 'vcard' %} {% trans "Profile" %}</a>
|
2020-05-19 16:53:54 +00:00
|
|
|
<div class="dropdown-divider"></div>
|
2020-10-14 08:37:46 +00:00
|
|
|
<a class="dropdown-item" href="{% url 'accounts:logout' %}"><i class="fa fa-fw fa-power-off"></i> {% 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>
|