Merge branch 'develop' of git.osuosl.org:ganeti/ganeti_webmgr into develop
[ganeti_webmgr.git] / templates / menu_base.html
blob7ca5cef740abb4e5eb09d0cb3f359c9878a6da0b
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load object_permission_tags %}
4 {% load webmgr_tags %}
7 {% block basehead %}
8 <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/content.css"/>
10 <script type="text/javascript" src="{{MEDIA_URL}}/js/jquery.qtip.js"></script>
11 <script type="text/javascript" src="{{MEDIA_URL}}/js/ajax_csrf_protection.js"></script>
12 {% endblock %}
14 {% block inner_header %}
15 {% ifnotequal LANGUAGES|length 1 %}|{% endifnotequal %}
16 {% trans "You are logged in as" %} <a href="{% url profile %}">{{user.username}}</a>,
17 <a href="{% url logout %}">{% trans "Logout" %}</a>
18 {% endblock %}
20 {% block navigation %}
21 {% if user.is_authenticated %}
22 <div id="mainmenu" class="menu">
23 <ul>
24 <li><a href="{% url overview %}">{% trans "Overview" %}</a></li>
25 {% if view_cluster %}
26 <li><a href="{% url cluster-list %}">{% trans "Clusters" %}</a></li>
27 {% endif %}
28 <li><a href="{% url virtualmachine-list %}">{% trans "Virtual Machines" %}</a></li>
29 {% if user.is_superuser or cluster_admin or create_vm %}
30 <li><a href="{% url instance-create %}">{% trans "Create VM" %}</a></li>
31 {% endif %}
32 </ul>
33 {% with user|group_admin as group_admin %}
34 {% if user.is_superuser or group_admin or cluster_admin %}
35 <h3>{% trans "Admin" %}</h3>
36 <ul>
37 {% if user.is_superuser or cluster_admin %}
38 <li><a href="{% url import-orphans %}">{% trans "Orphan VMs" %}</a></li>
39 <li><a href="{% url import-missing_db %}">{% trans "Import VMs" %}</a></li>
40 <li><a href="{% url import-missing %}">{% trans "Missing VMs" %}</a></li>
41 <li><a href="{% url import-nodes-missing_db %}">{% trans "Import Nodes" %}</a></li>
42 <li><a href="{% url import-nodes-missing %}">{% trans "Missing Nodes" %}</a></li>
43 {% endif %}
44 {% if user.is_superuser %}
45 <li><a href="{% url user-list %}">{% trans "Users" %}</a></li>
46 {% endif %}
47 {% if user.is_superuser or group_admin %}
48 <li><a href="{% url group-list %}">{% trans "Groups" %}</a></li>
49 {% endif %}
50 </ul>
51 {% endif %}
52 {% endwith %}
53 </div>
54 {% endif %}
55 {% endblock %}