Migrations: instead of deleting old ganeti content types, now converting them to...
[ganeti_webmgr.git] / templates / menu_base.html
blob6a913e354840c609948b3ccad732b17d5e71aeab
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load object_permission_tags %}
4 {% load webmgr_tags %}
6 {% block basehead %}
7 <!-- Include CSS -->
8 <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/content.css"/>
9 <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/jquery-ui.css"/>
11 <!-- Include Javascript -->
12 <script type="text/javascript" src="{{MEDIA_URL}}/js/jquery.js">
13 </script>
14 <script type="text/javascript" src="{{MEDIA_URL}}/js/jquery-ui.min.js">
15 </script>
16 <script type="text/javascript" src="{{MEDIA_URL}}/js/jquery.qtip.js">
17 </script>
18 <script type="text/javascript" src="{{MEDIA_URL}}/js/ajax_csrf_protection.js">
19 </script>
20 <script type="text/javascript" src="{{MEDIA_URL}}/js/autocomplete_search.js">
21 </script>
23 <script type="text/javascript">
24 $(function(){
25 /* "main" */
27 // initialize the autocomplete search box
28 autocomplete_search($('#search_box'), $('#search_form'),
29 '{% url search-suggestions %}',
30 '{% url search-detail-lookup %}');
31 });
32 </script>
33 {% endblock %}
35 {% block inner_header %}
36 {% ifnotequal LANGUAGES|length 1 %}|{% endifnotequal %}
38 {% trans "You are logged in as" %} <a href="{% url profile %}">
39 {{user.username}}</a>,
41 <a href="{% url logout %}">{% trans "Logout" %}</a>
42 {% endblock %}
44 {% block navigation %}
45 {% if user.is_authenticated %}
46 <div id="mainmenu" class="menu">
47 <ul>
48 <li>
49 <a href="{% url overview %}">
50 {% trans "Overview" %}
51 </a>
52 </li>
54 {% if view_cluster %}
55 <li>
56 <a href="{% url cluster-list %}">
57 {% trans "Clusters" %}
58 </a>
59 </li>
60 {% endif %}
62 <li>
63 <a href="{% url virtualmachine-list %}">
64 {% trans "Virtual Machines" %}
65 </a>
66 </li>
67 {% if user.is_superuser or cluster_admin or create_vm %}
68 <li>
69 <a href="{% url instance-create %}">
70 {% trans "Create VM" %}
71 </a>
72 </li>
73 {% endif %}
74 </ul>
76 {% with user|group_admin as group_admin %}
77 {% if user.is_superuser or group_admin or cluster_admin %}
78 <h3>{% trans "Admin" %}</h3>
79 <ul>
80 {% if user.is_superuser or cluster_admin %}
81 <li>
82 <a href="{% url import-orphans %}">
83 {% trans "Orphan VMs" %}
84 </a>
85 </li>
86 <li>
87 <a href="{% url import-missing_db %}">
88 {% trans "Import VMs" %}
89 </a>
90 </li>
91 <li>
92 <a href="{% url import-missing %}">
93 {% trans "Missing VMs" %}
94 </a>
95 </li>
96 <li>
97 <a href="{% url import-nodes-missing_db %}">
98 {% trans "Import Nodes" %}
99 </a>
100 </li>
101 <li>
102 <a href="{% url import-nodes-missing %}">
103 {% trans "Missing Nodes" %}
104 </a>
105 </li>
106 {% endif %}
108 {% if user.is_superuser %}
109 <li>
110 <a href="{% url user-list %}">
111 {% trans "Users" %}
112 </a>
113 </li>
114 {% endif %}
116 {% if user.is_superuser or group_admin %}
117 <li>
118 <a href="{% url group-list %}">
119 {% trans "Groups" %}
120 </a>
121 </li>
122 {% endif %}
123 </ul>
124 {% endif %}
125 {% endwith %}
127 <!-- autocomplete search box -->
128 <h3>{% trans "Search" %}</h3>
129 <form id="search_form" action="{% url search %}" method="get">
130 <input id="search_box" type="text" name="q" />
131 </form>
133 </div>
134 {% endif %}
135 {% endblock %}