Skip to content

Commit cd9a2ee

Browse files
authored
fix: Color the background of table rows for an AD based on their ballot (ietf-tools#3867)
Instead of just adding a colored bar on the right-hand side.
1 parent f4b0b45 commit cd9a2ee

File tree

4 files changed

+26
-17
lines changed

4 files changed

+26
-17
lines changed

ietf/static/css/ietf.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,29 @@ td.position-empty {
362362
border: none !important;
363363
}
364364

365+
tr.position-moretime-row,
366+
tr.position-notready-row,
367+
tr.position-discuss-row,
368+
tr.position-block-row {
369+
background-color: tint-color($color-discuss, 90%);
370+
}
371+
372+
tr.position-yes-row {
373+
background-color: tint-color($color-yes, 90%);
374+
}
375+
376+
tr.position-noobj-row {
377+
background-color: tint-color($color-noobj, 90%);
378+
}
379+
380+
tr.position-abstain-row {
381+
background-color: tint-color($color-abstain, 90%);
382+
}
383+
384+
tr.position-recuse-row {
385+
background-color: tint-color($color-recuse, 90%);
386+
}
387+
365388

366389
/* === Edit Meeting Schedule ====================================== */
367390

ietf/templates/doc/search/search_result_row.html

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@
66
{% load ballot_icon %}
77
{% load person_filters %}
88
{% load django_bootstrap5 %}
9-
<tr{% spaceless %}
10-
{% if color_ad_position %} {% with doc|ballotposition:user as pos %} {% if pos %}class="position-{{ pos.slug }}-row"{% endif %}
11-
{% endwith %}
12-
{% endif %}
13-
{% endspaceless %}>
9+
<tr {% if color_ad_position %}{% with doc|ballotposition:user as pos %}{% if pos %}class="position-{{ pos.slug }}-row"{% endif %}{% endwith %}{% endif %}>
1410
<td>
1511
{% if user.is_authenticated %}
1612
<a href="{% url "ietf.community.views.untrack_document" username=request.user.username name=doc.name %}"
@@ -155,9 +151,4 @@
155151
{% endif %}
156152
</td>
157153
{% endif %}
158-
{% if color_ad_position %}
159-
{% with doc|ballotposition:user as pos %}
160-
<td {% if pos %}class="changebar position-{{ pos.slug }}"{% endif %}></td>
161-
{% endwith %}
162-
{% endif %}
163154
</tr>

ietf/templates/doc/search/search_results.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@
4646
<tbody>
4747
<tr class="table-info">
4848
<td></td>
49-
{% if color_ad_position %}
50-
<th scope="col" colspan="{{ meta.headers|length }}">
51-
{% else %}
52-
<th scope="col" colspan="{{ meta.headers|length|add:"-1" }}">
53-
{% endif %}
49+
<th scope="col" colspan="{{ meta.headers|length|add:"-1" }}">
5450
{{ doc_group.grouper|plural:doc_group.list }} ({{ doc_group.list|length }} {{"hit"|plural:doc_group.list }})
5551
</th>
5652
</tr>

ietf/templates/iesg/agenda_documents.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ <h2>
5151
<th scope="col" data-sort="status">Status</th>
5252
<th scope="col" class="d-none d-sm-table-cell" data-sort="ipr">IPR</th>
5353
<th scope="col" class="d-none d-sm-table-cell" data-sort="ad">AD/Shepherd</th>
54-
<th scope="col"></th>
5554
</tr>
5655
</thead>
5756
<tbody>
@@ -71,4 +70,4 @@ <h2>
7170
{% endblock %}
7271
{% block js %}
7372
<script src="{% static "ietf/js/list.js" %}"></script>
74-
{% endblock %}
73+
{% endblock %}

0 commit comments

Comments
 (0)