1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00
webvirtcloud/instances/templates/bottom_bar.html
catborise 44b3b6569a fix(instances): the VM page opens the tab a redirect points to, and host links are for administrators
Redirects to #access (root password, SSH key) and other top-level panes
opened nothing, and some sub-tab ids did not exist. static/js/instance_tabs.js
opens the pane and the tab that holds it from the page structure, and
opens Settings on its first section, without leaving the current tab;
guest OS info is loaded whenever it is the section opened. The bottom bar linked to
host pages, which only administrators may open, and showed host names to
everyone. A stray </li> is removed; the page's inline scripts and the tab
logic are checked with Node.
2026-10-08 08:50:21 +03:00

28 lines
1.5 KiB
HTML

{% load i18n %}
{% load bootstrap_icons %}
<nav class="navbar navbar-expand-sm fixed-bottom navbar-light bg-light" aria-label="Instance bottom navbar">
<div class="container">
<a class="navbar-brand" href="#">{% trans 'HOST' %}</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar_bottom" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div id="navbar_bottom" class="navbar-collapse collapse">
<ul class="navbar-nav">
{% if request.user.is_superuser %}{# host pages and names are for administrators #}
<li class="nav-item">
<a class="nav-link" href="{% url 'overview' compute.id %}">
{% bs_icon 'server'%}
{{ compute.name }} {% if compute.name != compute.hostname %} - {{ compute.hostname }}{% endif %}
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'instances' compute.id %}">{% bs_icon 'laptop'%} {% trans "Instances" %}</a>
</li>
{% endif %}
<li class="nav-item active">
<a class="nav-link" href="{% url 'instances:instance' instance.id %}">{% bs_icon 'device-hdd'%} {{ instance.name }}</a>
</li>
</ul>
</div>
</div>
</nav>