minor cosmetic changes
This commit is contained in:
parent
4ff884272c
commit
21e30b4ac0
|
@ -67,6 +67,7 @@ class Note(models.Model):
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f" Note: {self.description}, by {self.user.username} @ {self.user.institution} - {self.date}, for {self.snapshot_uuid}"
|
return f" Note: {self.description}, by {self.user.username} @ {self.user.institution} - {self.date}, for {self.snapshot_uuid}"
|
||||||
|
|
||||||
|
|
||||||
class DeviceLog(models.Model):
|
class DeviceLog(models.Model):
|
||||||
institution = models.ForeignKey(Institution, on_delete=models.CASCADE)
|
institution = models.ForeignKey(Institution, on_delete=models.CASCADE)
|
||||||
user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True, blank=True)
|
user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True, blank=True)
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<input type="hidden" name="new_state" value="{{ state.state }}">
|
<input type="hidden" name="new_state" value="{{ state.state }}">
|
||||||
|
|
||||||
<a class="dropdown-item d-flex justify-content-between align-items-center" href="#" onclick="document.getElementById('changeStateForm{{ state.id }}').submit(); return false;">
|
<a class="dropdown-item d-flex justify-content-between align-items-center" href="#" onclick="document.getElementById('changeStateForm{{ state.id }}').submit(); return false;">
|
||||||
<span>{{ state.state }}</span>
|
<span class="font-monospace">{{ state.state }}</span>
|
||||||
<span class="badge bg-secondary rounded-pill-sm">{{ forloop.counter }}</span>
|
<span class="badge bg-secondary rounded-pill-sm">{{ forloop.counter }}</span>
|
||||||
</a>
|
</a>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
<div class="tab-pane fade" id="log">
|
<div class="tab-pane fade" id="log">
|
||||||
<h5 class="card-title mb-3">{% trans 'Log' %}</h5>
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped table-hover table-bordered bg-gradient">
|
<table class="table table-striped table-hover table-bordered bg-gradient">
|
||||||
<thead >
|
<thead >
|
||||||
|
@ -10,7 +9,7 @@
|
||||||
<th scope="col">{% trans 'Event' %}</th>
|
<th scope="col">{% trans 'Event' %}</th>
|
||||||
<th scope="col">{% trans 'User' %}</th>
|
<th scope="col">{% trans 'User' %}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for log in device_logs %}
|
{% for log in device_logs %}
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in a new issue