Grey out legacy database tables in the admin
This commit is contained in:
parent
3bbcf2c21c
commit
fa44b31f51
@ -22,6 +22,7 @@ class BrickCounter(object):
|
|||||||
table: str
|
table: str
|
||||||
icon: str
|
icon: str
|
||||||
count: int
|
count: int
|
||||||
|
legacy: bool
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -44,3 +45,5 @@ class BrickCounter(object):
|
|||||||
self.name = name
|
self.name = name
|
||||||
|
|
||||||
self.icon = icon
|
self.icon = icon
|
||||||
|
|
||||||
|
self.legacy = '(legacy)' in self.name
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
<div class="d-flex justify-content-start">
|
<div class="d-flex justify-content-start">
|
||||||
<ul class="list-group me-2">
|
<ul class="list-group me-2">
|
||||||
{% for counter in database_counters %}
|
{% for counter in database_counters %}
|
||||||
<li class="list-group-item d-flex justify-content-between align-items-start">
|
<li class="list-group-item d-flex justify-content-between align-items-start {% if counter.legacy %}list-group-item-dark{% endif %}">
|
||||||
<span><i class="ri-{{ counter.icon }}"></i> {{ counter.name }}</span> <span class="badge text-bg-primary rounded-pill ms-2">{{ counter.count }}</span>
|
<span><i class="ri-{{ counter.icon }}"></i> {{ counter.name }}</span> <span class="badge {% if counter.legacy %}text-bg-light border{% else %}text-bg-primary{% endif %} rounded-pill ms-2">{{ counter.count }}</span>
|
||||||
</li>
|
</li>
|
||||||
{% if not (loop.index % 5) %}
|
{% if not (loop.index % 5) %}
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user