better bootstrap tables

This commit is contained in:
Thomas Nahuel Rusiecki 2025-01-08 01:49:22 -03:00 committed by Cayo Puigdefabregas
parent 28e17e3519
commit 841a9ee599
2 changed files with 30 additions and 32 deletions

View file

@ -52,9 +52,8 @@
<!-- action buttons --> <!-- action buttons -->
<td> <td>
<div class="btn-group float-end"> <div class="btn-group float-end">
<!-- Edit Button -->
<button <button
type="button " type="button"
class="btn btn-sm btn-outline-info d-flex align-items-center" class="btn btn-sm btn-outline-info d-flex align-items-center"
data-bs-toggle="modal" data-bs-target="#editStateModal{{ state_definition.id }}"> data-bs-toggle="modal" data-bs-target="#editStateModal{{ state_definition.id }}">
<i class="bi bi-pencil me-1"></i> <i class="bi bi-pencil me-1"></i>

View file

@ -2,30 +2,23 @@
{% load i18n %} {% load i18n %}
<div class="tab-pane fade" id="user_properties"> <div class="tab-pane fade" id="user_properties">
<div class="btn-group mt-1 mb-3"> <div class="d-flex justify-content-end mt-1 mb-3">
<a href="{% url 'device:add_user_property' object.pk %}" class="btn btn-primary"> <a href="{% url 'device:add_user_property' object.pk %}"
<i class="bi bi-plus"> class="btn btn-green-admin d-flex align-items-center">
</i> <i class="bi bi-plus me-1"></i>
{% trans 'New user property' %} {% trans 'New user property' %}
</a> </a>
</div> </div>
<h5 class="card-title">{% trans 'User properties' %} <h5 class="card-title">{% trans 'User properties' %}</h5>
</h5>
<table class="table table-striped"> <table class="table table-hover table-bordered table-responsive align-middle">
<thead> <thead class="table-light">
<tr> <tr>
<th scope="col"> <th scope="col">{% trans 'Key' %}</th>
{% trans 'Key' %} <th scope="col">{% trans 'Value' %}</th>
</th> <th scope="col" data-type="date" class="text-end" data-format="YYYY-MM-DD HH:mm">{% trans 'Created on' %}</th>
<th scope="col"> <th scope="col" width="5%" class="text-end" title="{% trans 'Actions' %}"></th>
{% trans 'Value' %}
</th>
<th scope="col" data-type="date" data-format="YYYY-MM-DD HH:mm">
{% trans 'Created on' %}
</th>
<th>
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -35,17 +28,23 @@
</td> </td>
<td>{{ a.value }} <td>{{ a.value }}
</td> </td>
<td>{{ a.created }} <td class="text-end">{{ a.created }}
</td> </td>
<td> <td>
<div class="btn-group float-end"> <div class="btn-group ">
<button type="button" class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#editModal{{ a.id }}"> <button
<i class="bi bi-pencil"> type="button"
</i> {% trans 'Edit' %} class="btn btn-sm btn-outline-info d-flex align-items-center" data-bs-toggle="modal"
data-bs-target="#editModal{{ a.id }}" >
<i class="bi bi-pencil me-1"></i>
{% trans 'Edit' %}
</button> </button>
<button type="button" class="btn btn-sm btn-danger" data-bs-toggle="modal" data-bs-target="#deleteModal{{ a.id }}"> <button
<i class="bi bi-trash"> type="button"
</i> class="btn btn-sm btn-outline-danger d-flex align-items-center"
data-bs-toggle="modal" data-bs-target="#deleteModal{{ a.id }}">
<i class="bi bi-trash me-1"></i>
{% trans 'Delete' %}
</button> </button>
</div> </div>
</td> </td>