1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-11-01 03:54:15 +00:00
webvirtcloud/templates/navbar.html
Real-Gecko 27f62dff6c Added admin application
- Manage users
- Manage groups
- Manage logs
2020-05-27 18:24:06 +06:00

59 lines
No EOL
2.8 KiB
HTML

{% load i18n %}
{% load font_awesome %}
{% load common_tags %}
<!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">{% trans 'Toggle navigation' %}</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% url 'index' %}">WebVirtCloud</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li {% class_active request '^/instance' %}>
<a href="{% url 'allinstances' %}"><i class="fa fa-fw fa-desktop"></i> {% trans "Instances" %}</a>
</li>
{% if request.user.is_superuser %}
<li {% class_active request "^/compute" %}>
<a href="{% url 'computes' %}"><i class="fa fa-fw fa-server"></i> {% trans "Computes" %}</a>
</li>
<li class="dropdown {% app_active request 'admin' %}">
<a id="administration" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% trans "Administration" %} {% icon 'caret-down' %}
</a>
<ul class="dropdown-menu" aria-labelledby="administration">
<li class="{% view_active request 'admin:user_list' %}">
<a href="{% url 'admin:user_list' %}">{% icon 'user-plus' %} {% trans "Users" %}</a>
</li>
<li class="{% view_active request 'admin:group_list' %}">
<a href="{% url 'admin:group_list' %}">{% icon 'users' %} {% trans "Groups" %}</a>
</li>
<li class="{% view_active request 'admin:logs' %}">
<a href="{% url 'admin:logs' %}">{% icon 'list-alt' %} {% trans "Logs" %}</a>
</li>
</ul>
</li>
{% endif %}
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-fw fa-user"></i> {{ request.user.username }} <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="{% url 'profile' %}"><i class="fa fa-fw fa-pencil-square-o"></i> {% trans "Profile" %}</a>
</li>
<li class="divider"></li>
<li>
<a href="{% url 'logout' %}"><i class="fa fa-fw fa-power-off"></i> {% trans "Log Out" %}</a>
</li>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>