mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-09 19:56:48 +00:00
Rendered through every URL on libvirt's test driver, the pages had duplicate IDs and markup browsers repaired silently: - Each flavor modal's "Advanced" button toggled #flav-add-collapse, the first modal's section; every modal now has its own. The flavor and template copies of the custom tab's control IDs, and the template tab's unused images input, are gone. - The VM page's action icons and the XML editors were styled by repeated IDs; they use classes. - Modal forms opened inside modal-body and closed after modal-footer; they wrap both. Stray end tags and duplicate attributes are removed, paragraphs no longer hold modals or rows, table heads have a row, and the create page closes its row and column. - html lang is the active language instead of "en". A test walks every URL as a superuser and fails on a repeated ID. The console page still has no doctype: its full-height layout relies on quirks mode and needs its own check.
60 lines
No EOL
3.7 KiB
HTML
60 lines
No EOL
3.7 KiB
HTML
{% load i18n %}
|
|
{% load bootstrap_icons %}
|
|
{% load common_tags %}
|
|
<!-- Fixed navbar -->
|
|
<nav class="navbar sticky-top navbar-expand-md navbar-dark bg-primary mb-3" aria-label="Main top navbar">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="{% url 'index' %}">WebVirtCloud</a>
|
|
<button type="button" class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#navbar" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbar">
|
|
<ul class="navbar-nav">
|
|
<li class="nav-item {% class_active request '^/instances' %}">
|
|
<a class="nav-link" href="{% url 'instances:index' %}">{% bs_icon 'pc-display-horizontal' %} {% trans "Instances" %}</a>
|
|
</li>
|
|
{% if request.user.is_superuser %}
|
|
<li class="nav-item {% class_active request '^/computes' %}">
|
|
<a class="nav-link" href="{% url 'computes' %}">{% bs_icon 'pc-display' %} {% trans "Computes" %}</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
<ul class="navbar-nav ms-auto">
|
|
<li class="nav-item {% class_active request '^/jobs' %}">
|
|
<a class="nav-link" href="{% url 'operations:jobs' %}" aria-label="{% trans 'Jobs' %}">{% bs_icon 'list-task' %}</a>
|
|
</li>
|
|
{% if request.user.is_superuser %}
|
|
<li class="nav-item dropdown {% app_active request 'admin' %}">
|
|
<a class="nav-link" id="administration" href="#" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
{% bs_icon 'wrench-adjustable' %}
|
|
</a>
|
|
<div class="dropdown-menu" aria-labelledby="administration">
|
|
<a class="dropdown-item {% view_active request 'admin:user_list' %}" href="{% url 'admin:user_list' %}">{% bs_icon 'person-plus' %} {% trans "Users" %}</a>
|
|
<a class="dropdown-item {% view_active request 'admin:group_list' %}" href="{% url 'admin:group_list' %}">{% bs_icon 'people-fill' %} {% trans "Groups" %}</a>
|
|
<a class="dropdown-item {% view_active request 'admin:logs' %}" href="{% url 'admin:logs' %}">{% bs_icon 'card-list' %} {% trans "Logs" %}</a>
|
|
<a class="dropdown-item {% view_active request 'admin:tombstone_list' %}" href="{% url 'admin:tombstone_list' %}">{% bs_icon 'trash' %} {% trans "Removed VMs" %}</a>
|
|
<a class="dropdown-item {% view_active request 'appsettings' %}" href="{% url 'appsettings' %}">{% bs_icon 'gear-wide-connected' %} {% trans "Settings" %}</a>
|
|
</div>
|
|
</li>
|
|
{% endif %}
|
|
<li class="nav-item dropdown {% class_active request '^/accounts' %}">
|
|
<a class="nav-link dropdown-toggle" href="#" id="navbarUserDropdown" data-bs-toggle="dropdown" role="button" aria-expanded="false">
|
|
{% bs_icon 'person-square' %} {{ request.user.username }}
|
|
</a>
|
|
<div class="dropdown-menu" aria-labelledby="navbarUserDropdown">
|
|
{% get_current_language as LANGUAGE_CODE %}
|
|
<a class="dropdown-item disabled" href="#">
|
|
{% trans "Language" %}: <span class="badge bg-secondary">{{ LANGUAGE_CODE }}</span>
|
|
</a>
|
|
<a class="dropdown-item {% view_active request 'accounts:profile' %}" href="{% url 'accounts:profile' %}">{% bs_icon 'person-vcard' %} {% trans "Profile" %}</a>
|
|
<div class="dropdown-divider"></div>
|
|
<form method="post" action="{% url 'accounts:logout' %}">
|
|
{% csrf_token %}
|
|
<button type="submit" class="dropdown-item">{% bs_icon 'power' %} {% trans "Log Out" %}</button>
|
|
</form>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div><!--/.nav-collapse -->
|
|
</div>
|
|
</nav> |