minor view changes

This commit is contained in:
Thomas Nahuel Rusiecki 2025-02-14 17:51:11 -03:00
parent 7514eb19b0
commit 21ef696057
7 changed files with 33 additions and 36 deletions

View file

@ -9,13 +9,9 @@
{% endblock %}
{% block content %}
<div class="row">
<div class="col">
<h3>{{ subtitle }}</h3>
</div>
</div>
<h3>{{ subtitle }}</h3>
<div class="row mt-4">
<div class="row">
<div class="col">
{% if state_definitions %}
<table class="table table-hover table-bordered align-middle">

View file

@ -219,13 +219,14 @@
</div>
</div>
<div class="d-flex flex-wrap gap-2 justify-content-end p-2 mb-2">
<div class="d-flex flex-wrap gap-2 justify-content-end m-2 mb-4">
{% block actions %}
{% endblock %}
</div>
<div class= "mx-2">
{% block content %}
{% endblock content %}
</div>
</main>
</div>
</div>

View file

@ -3,27 +3,32 @@
{% load paginacion %}
{% block actions %}
{% if lot %}
<a href="{% url 'lot:documents' object.id %}" type="button" class="btn btn-green-admin">
<a href="{#% url 'lot:documents' object.id %#}" type="button" class="btn btn-green-admin btn-todo" data-bs-toggle="tooltip" title="NOT IMPLEMENTED. Menu for adding documents for the lot">
<i class="bi bi-folder2"></i>
{% trans 'Documents' %}
</a>
{% endif %}
<a href="{# url 'dashboard:exports' object.id #}" type="button" class="btn btn-todo" data-bs-toggle="tooltip" title="NOT IMPLEMENTED. This action tries to emulate what devicehub-teal did, which was related to opening a dialog where you can select different options for export the devices as csv for all selected devices" >
{% if lot %}
<a href="{% url 'lot:properties' object.id %}" type="button" class="btn btn-green-admin" >
<i class="bi bi-tag"></i>
{% trans 'Properties' %}
</a>
{% endif %}
<a href="{# url 'dashboard:exports' object.id #}" type="button" class="btn btn-todo" data-bs-toggle="tooltip" title="NOT IMPLEMENTED. This action tries to emulate what devicehub-teal did, which was related to opening a dialog where you can select different options for export the devices as csv for all selected devices" >
<i class="bi bi-reply"></i>
{% trans 'Exports' %}
</a>
{% if lot %}
<a href="{% url 'lot:annotations' object.id %}" type="button" class="btn btn-green-admin" >
<i class="bi bi-tag"></i>
{% trans 'properties' %}
</a>
{% endif %}
{% endblock%}
{% block content %}
<h3>{{ subtitle }}</h3>
{% if lot.name %}
<h3 class="text-muted"> <i class="bi bi-folder2-open me-2"></i>{% trans "Lot" %} {{ lot.name }}</h3>
{% endif %}
<div class="dataTable-container mt-4">
<form method="post">
@ -91,7 +96,7 @@
{% elif dev.type == "SolidStateDrive" %}
<i class="bi bi-device-ssd"></i>
{% elif dev.type == "NetworkAdapter" %}
<i class="bi bi-ethernet"></i>
<i class="bi bi-pci-card-network"></i>
{% elif dev.type == "Processor" %}
<i class="bi bi-cpu"></i>
{% elif dev.type == "RamModule" %}
@ -104,8 +109,6 @@
<i class="bi bi-battery"></i>
{% elif dev.type == "Camera" %}
<i class="bi bi-camera"></i>
{% else %}
<i class="bi bi-question-circle"></i>
{% endif %}
{{dev.type}}
</td>
@ -132,10 +135,8 @@
</form>
</div>
<div class="row mt-3">
<div class="col">
<div class="mt-5 d-flex align-items-center justify-content-center">
{% render_pagination page total_pages limit %}
</div>
</div>
<script>

View file

@ -48,9 +48,8 @@
{% endblock %}
{% block content %}
<div class="col">
<h3>{{ object.shortid }}</h3>
</div>
<h3>{{ object.shortid }}</h3>
<div class="row">
<div class="col">

View file

@ -12,9 +12,9 @@
{% block content %}
<div class="row">
<div class="col-md-12 mb-3">
<div class="col-md-12 mb-4">
<div class="card d-flex flex-wrap">
<div class="card-header bg-light">
<div class="card-header">
<strong class="card-title">Evidence
<span class="text-muted" id="uuid">{{ object.uuid }}</span>
<button class="btn btn-sm btn-outline-secondary ms-1" onclick="copyToClipboard()">
@ -41,6 +41,10 @@
</div>
{% endif %}
<!-- submit button -->
<button class="btn btn-sm btn btn-outline-success" d-flex align-items-end gap-1" type="submit" name="submit_form2">
<i class="bi bi-floppy2-fill"></i> {% translate 'Save' %}
</button>
<!-- erase server switch -->
<div class="form-check form-switch m-0">
<input
@ -52,7 +56,6 @@
{% if form2.erase_server.value %}
checked
{% endif %}>
<label class="form-check-label ps-1" for="{{ form2.erase_server.id_for_label }}">
{% if form2.erase_server.value %}
<i class="pe-1 bi bi-eraser"></i>
@ -63,10 +66,7 @@
{% endif %}
</label>
</div>
<!-- submit button -->
<button class="btn btn-sm btn btn-outline-success" d-flex align-items-end gap-1" type="submit" name="submit_form2">
<i class="bi bi-floppy2-fill"></i> {% translate 'Save' %}
</button>
</form>
</div>

View file

@ -32,7 +32,7 @@
{% load django_bootstrap5 %}
<form role="form" method="post" enctype="multipart/form-data" class="needs-validation row d-flex justify-content-center " novalidate>
<form role="form" method="post" enctype="multipart/form-data" class="row d-flex justify-content-center ">
{% csrf_token %}
<!-- Drag n drop -->
@ -43,7 +43,7 @@
{# support for both evidence file and spreadsheet forms #}
{% if form.evidence_file %}
{% bootstrap_form form exclude="evidence_file" alert_error_type="none" error_css_class="alert alert-danger" %}
<input type="file" id="file-input" name="{{ form.evidence_file.html_name }}" class="visually-hidden" {% if form.evidence_file.field.widget.attrs.multiple %}multiple{% endif %}>
<input type="file" id="file-input" name="{{ form.evidence_file.html_name }}" class="visually-hidden" {% if form.evidence_file.field.widget.attrs.multiple %}multiple required{% endif %}>
{% elif form.file_import %}
{% bootstrap_form form exclude="file_import" alert_error_type="none" error_css_class="alert alert-danger" %}
<input type="file" id="file-input" name="{{ form.file_import.html_name }}" class="visually-hidden">

View file

@ -55,7 +55,7 @@
<h5 class="card-title mb-3">
<i class="bi bi-gear me-2"></i> {% translate 'Settings File' %}
</h5>
<p class="card-text flex-grow-1">{% translate 'Download a settings file for your account.' %}</p>
<p class="card-text flex-grow-1">{% translate 'Download a settings file for your Workbench.' %}</p>
<div class="text-end">
<a href="{% url 'user:settings' %}" class="btn btn-outline-dark btn-sm d-inline-flex align-items-center">
<span class="me-2">{% translate 'Go' %}</span>