ui: Add rounded-pill to a few more badges (#4539)

This commit is contained in:
Lars Eggert 2022-10-10 16:37:58 +03:00 committed by GitHub
parent 2981242a7b
commit eed58c9753
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View file

@ -224,7 +224,7 @@ def state_age_colored(doc):
else:
title = ""
return mark_safe(
'<span class="badge %s" %s><i class="bi bi-clock-fill"></i> %d</span>'
'<span class="badge rounded-pill %s" %s><i class="bi bi-clock-fill"></i> %d</span>'
% (class_name, title, days)
)
else:

View file

@ -641,10 +641,10 @@ def action_holder_badge(action_holder):
''
>>> action_holder_badge(DocumentActionHolderFactory(time_added=datetime.datetime.now() - datetime.timedelta(days=16)))
'<span class="badge bg-danger" title="In state for 16 days; goal is &lt;15 days."><i class="bi bi-clock-fill"></i> 16</span>'
'<span class="badge rounded-pill bg-danger" title="In state for 16 days; goal is &lt;15 days."><i class="bi bi-clock-fill"></i> 16</span>'
>>> action_holder_badge(DocumentActionHolderFactory(time_added=datetime.datetime.now() - datetime.timedelta(days=30)))
'<span class="badge bg-danger" title="In state for 30 days; goal is &lt;15 days."><i class="bi bi-clock-fill"></i> 30</span>'
'<span class="badge rounded-pill bg-danger" title="In state for 30 days; goal is &lt;15 days."><i class="bi bi-clock-fill"></i> 30</span>'
>>> settings.DOC_ACTION_HOLDER_AGE_LIMIT_DAYS = old_limit
"""
@ -652,7 +652,7 @@ def action_holder_badge(action_holder):
age = (datetime.datetime.now() - action_holder.time_added).days
if age > age_limit:
return mark_safe(
'<span class="badge bg-danger" title="In state for %d day%s; goal is &lt;%d days."><i class="bi bi-clock-fill"></i> %d</span>'
'<span class="badge rounded-pill bg-danger" title="In state for %d day%s; goal is &lt;%d days."><i class="bi bi-clock-fill"></i> %d</span>'
% (age, "s" if age != 1 else "", age_limit, age)
)
else:

View file

@ -241,7 +241,7 @@
</td>
<td>
{% if doc.get_state_slug != "active" and doc.get_state_slug != "rfc" %}
<div class="float-end badge bg-warning">
<div class="badge rounded-pill bg-warning float-end">
Expired &amp; archived
</div>
{% endif %}

View file

@ -69,7 +69,7 @@
</div>
{% endif %}
{% if session.group.state.slug != "active" %}
<br><span class="badge bg-success">{{ session.group.state.name }}</span>
<br><span class="badge rounded-pill bg-success">{{ session.group.state.name }}</span>
{% endif %}
</td>
<td class="d-none d-lg-table-cell">