mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 19:26:48 +00:00
style(instances): the Disks tab's secondary buttons are outlined
Edit, Move, Detach, Unmount and a CD-ROM drive's Detach are outlined secondary buttons and Delete an outlined danger one, as on the Network and Snapshots tabs; Mount and Add disk stay the filled primary actions.
This commit is contained in:
parent
a06565fa0b
commit
f5cb6f3479
3 changed files with 6 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{% load i18n %}
|
||||
{% if request.user.is_superuser %}
|
||||
<button href="#editvol{{ id }}" type="button" class="btn btn-sm btn-secondary" data-bs-toggle="modal">{% trans "Edit" %}</button>
|
||||
<button href="#editvol{{ id }}" type="button" class="btn btn-sm btn-outline-secondary" data-bs-toggle="modal">{% trans "Edit" %}</button>
|
||||
|
||||
<div class="modal fade" id="editvol{{ id }}" tabindex="-1" role="dialog" aria-labelledby="editInstanceVolumeLabel{{ id }}" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{% load bootstrap_icons %}
|
||||
{% load operations %}
|
||||
{# the Move button of a disk and its dialog: another storage pool of this host #}
|
||||
<button type="button" class="btn btn-sm btn-secondary" data-bs-toggle="modal" data-bs-target="#movedisk{{ id }}" title="{% trans "Move to another pool" %}">{% trans "Move" %}</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary" data-bs-toggle="modal" data-bs-target="#movedisk{{ id }}" title="{% trans "Move to another pool" %}">{% trans "Move" %}</button>
|
||||
<div class="modal fade" id="movedisk{{ id }}" tabindex="-1" aria-labelledby="movedisk{{ id }}-label" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content text-wrap" action="{% url 'instances:move_disk' instance.id %}" method="post">
|
||||
|
|
|
|||
|
|
@ -161,14 +161,14 @@
|
|||
</div>
|
||||
</div>
|
||||
{% if not cd.image or cd.bus == "usb" %}
|
||||
<button type="submit" class="btn btn-sm btn-secondary" formaction="{% url 'instances:detach_cdrom' instance.id cd.dev %}" formmethod="post"{% if instance.status != 5 and cd.bus != "scsi" and cd.bus != "usb" %} disabled{% endif %}>{% trans "Detach" %}</button>
|
||||
<button type="submit" class="btn btn-sm btn-outline-secondary" formaction="{% url 'instances:detach_cdrom' instance.id cd.dev %}" formmethod="post"{% if instance.status != 5 and cd.bus != "scsi" and cd.bus != "usb" %} disabled{% endif %}>{% trans "Detach" %}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if cd.bus == "usb" %}
|
||||
{# libvirt has no empty USB drive: it is detached, not ejected #}
|
||||
{% elif cd.image %}
|
||||
<input type="hidden" name="path" value="{{ cd.path }}">
|
||||
<button type="submit" class="btn btn-sm btn-primary" value="{{ cd.dev }}" name="umount_iso">{% bs_icon 'eject' %} {% trans "Unmount" %}</button>
|
||||
<button type="submit" class="btn btn-sm btn-outline-secondary" value="{{ cd.dev }}" name="umount_iso">{% bs_icon 'eject' %} {% trans "Unmount" %}</button>
|
||||
{% else %}
|
||||
<label class="form-label small" for="media-{{ cd.dev }}">{% trans "ISO image" %}</label>
|
||||
<div class="row g-2">
|
||||
|
|
@ -240,7 +240,7 @@
|
|||
<input type="hidden" name="dev" value="{{ disk.dev }}">
|
||||
<input type="hidden" name="storage" value="{{ disk.storage }}">
|
||||
<input type="hidden" name="name" value="{{ disk.image }}">
|
||||
<button type="submit" class="btn btn-sm btn-secondary" value="{{ disk.dev }}"{% if instance.status != 5 %} disabled{% endif %} data-confirm="{% blocktrans with dev=disk.dev %}Detach {{ dev }}? Its file is kept.{% endblocktrans %}">{% trans "Detach" %}</button>
|
||||
<button type="submit" class="btn btn-sm btn-outline-secondary" value="{{ disk.dev }}"{% if instance.status != 5 %} disabled{% endif %} data-confirm="{% blocktrans with dev=disk.dev %}Detach {{ dev }}? Its file is kept.{% endblocktrans %}">{% trans "Detach" %}</button>
|
||||
</form>
|
||||
<form class="d-inline" action="{% url 'instances:delete_vol' instance.id %}" method="post">
|
||||
{% csrf_token %}
|
||||
|
|
@ -248,7 +248,7 @@
|
|||
<input type="hidden" name="dev" value="{{ disk.dev }}">
|
||||
<input type="hidden" name="storage" value="{{ disk.storage }}">
|
||||
<input type="hidden" name="name" value="{{ disk.image }}">
|
||||
<button type="submit" class="btn btn-sm btn-danger"{% if instance.status != 5 %} disabled{% endif %} data-confirm="{% blocktrans with dev=disk.dev %}Delete {{ dev }}? It is detached and its file and data are removed.{% endblocktrans %}">{% trans "Delete" %}</button>
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger"{% if instance.status != 5 %} disabled{% endif %} data-confirm="{% blocktrans with dev=disk.dev %}Delete {{ dev }}? It is detached and its file and data are removed.{% endblocktrans %}">{% trans "Delete" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue