fix: Color the background of table rows for an AD based on their ballot (#3867)

Instead of just adding a colored bar on the right-hand side.
This commit is contained in:
Lars Eggert 2022-04-22 19:05:37 +03:00 committed by GitHub
parent f4b0b459cb
commit cd9a2ee229
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 17 deletions

View file

@ -362,6 +362,29 @@ td.position-empty {
border: none !important;
}
tr.position-moretime-row,
tr.position-notready-row,
tr.position-discuss-row,
tr.position-block-row {
background-color: tint-color($color-discuss, 90%);
}
tr.position-yes-row {
background-color: tint-color($color-yes, 90%);
}
tr.position-noobj-row {
background-color: tint-color($color-noobj, 90%);
}
tr.position-abstain-row {
background-color: tint-color($color-abstain, 90%);
}
tr.position-recuse-row {
background-color: tint-color($color-recuse, 90%);
}
/* === Edit Meeting Schedule ====================================== */

View file

@ -6,11 +6,7 @@
{% load ballot_icon %}
{% load person_filters %}
{% load django_bootstrap5 %}
<tr{% spaceless %}
{% if color_ad_position %} {% with doc|ballotposition:user as pos %} {% if pos %}class="position-{{ pos.slug }}-row"{% endif %}
{% endwith %}
{% endif %}
{% endspaceless %}>
<tr {% if color_ad_position %}{% with doc|ballotposition:user as pos %}{% if pos %}class="position-{{ pos.slug }}-row"{% endif %}{% endwith %}{% endif %}>
<td>
{% if user.is_authenticated %}
<a href="{% url "ietf.community.views.untrack_document" username=request.user.username name=doc.name %}"
@ -155,9 +151,4 @@
{% endif %}
</td>
{% endif %}
{% if color_ad_position %}
{% with doc|ballotposition:user as pos %}
<td {% if pos %}class="changebar position-{{ pos.slug }}"{% endif %}></td>
{% endwith %}
{% endif %}
</tr>

View file

@ -46,11 +46,7 @@
<tbody>
<tr class="table-info">
<td></td>
{% if color_ad_position %}
<th scope="col" colspan="{{ meta.headers|length }}">
{% else %}
<th scope="col" colspan="{{ meta.headers|length|add:"-1" }}">
{% endif %}
<th scope="col" colspan="{{ meta.headers|length|add:"-1" }}">
{{ doc_group.grouper|plural:doc_group.list }} ({{ doc_group.list|length }} {{"hit"|plural:doc_group.list }})
</th>
</tr>

View file

@ -51,7 +51,6 @@
<th scope="col" data-sort="status">Status</th>
<th scope="col" class="d-none d-sm-table-cell" data-sort="ipr">IPR</th>
<th scope="col" class="d-none d-sm-table-cell" data-sort="ad">AD/Shepherd</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
@ -71,4 +70,4 @@
{% endblock %}
{% block js %}
<script src="{% static "ietf/js/list.js" %}"></script>
{% endblock %}
{% endblock %}