blob: d5551ae913970221a690bf884f50501d0e54b32e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
{% extends "base-sidebar.html" %}
{% load region_tags %}
{% load project_tags %}
{% block headerjs %}
{{ block.super }}
{% endblock %}
{% block region %}
<div id="region_selector">
{% load_regions %}
<span id="project_name"><strong>Project:</strong> {{ project.projectname }}</span>
<form id="frm_region" method="post" action="{% url region_change %}">
{% csrf_token %}
<fieldset>
<input name="redirect_url" type="hidden" value="{{ request.get_full_path }}" />
<noscript>
<input id="btn_region_change" type="submit" value="Change" />
</noscript>
<div id="region_form">
<label for="sel_region">Region: </label>
<select id="sel_region" name="region">
{% for region in regions %}
<option{% if region.name == current_region.name %} selected{% endif %}>
{{ region.name }}
</option>
{% endfor %}
</select>
</div>
</fieldset>
</form>
</div>
{% endblock %}
{% block nav_projects %}
{% load_projects %}
<li>
<h3 class="active"><a href="/">Projects</a></h3>
<div id="projects">
{% for p in projects %}
<div id="{{ p.projectname }}" class="project{% if p.projectname == project.projectname %} active{% endif %}">
<h4>
<a class="project_link" href="/project/{{ p.projectname }}">{{ p.projectname }}</a>
{% if p.projectManagerId == user.username %}
<a id="manage_project_{{p.projectname}}"
class="manage_link"
href="{% url nova_project_manage p.projectname %}"
title="Manage User Roles">Manage Project</a>
{% endif %}
</h4>
{% if project.projectname == p.projectname %}
<ul>
<li {% if p.projectname == project.projectname and sidebar_selected == "instances" %}class="active"{% endif %}>
<a id="lnk_instances_{{p.projectname}}" href="{% url nova_instances p.projectname %}">Instances</a>
</li>
<li {% if p.projectname == project.projectname and sidebar_selected == "images" %}class="active"{% endif %}>
<a id="lnk_images_{{p.projectname}}" href="{% url nova_images p.projectname %}">Images</a>
</li>
<li {% if p.projectname == project.projectname and sidebar_selected == "keys" %}class="active"{% endif %}>
<a id="lnk_keypairs_{{p.projectname}}" href="{% url nova_keypairs p.projectname %}">Keys</a>
</li>
<li {% if p.projectname == project.projectname and sidebar_selected == "volumes" %}class="active"{% endif %}>
<a id="lnk_volumes_{{p.projectname}}" href="{% url nova_volumes p.projectname %}">Volumes</a>
</li>
</ul>
{% endif %}
</div>
{% endfor %}
</div>
</li>
{% endblock %}
{% block footerjs %}
{{ block.super }}
<script type="text/javascript">
$(function() {
$('#sel_region').change(function() {
$('#frm_region').submit();
});
});
</script>
{% endblock %}
|