Skip to content

Commit d2edc5b

Browse files
authored
fix: Misc template fixes (ietf-tools#3813)
* fix: Remove extra whitespace around parentheses * fix: Make heading capitalization consistent, colorize a "No" * fix: Pagination element, spacing, replace text with icon
1 parent 4f1dcd6 commit d2edc5b

2 files changed

Lines changed: 20 additions & 43 deletions

File tree

ietf/templates/doc/document_ballot_content.html

Lines changed: 15 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,7 @@
1111
</p>
1212
{% for p in positions %}
1313
<div class="balloter-name mb-2">
14-
{% if p.is_old_pos %}
15-
<span class="text-muted">
16-
(
17-
{% endif %}
18-
{% if p.comment or p.discuss %}<a href="#{{ doc.name|slugify }}_{{ p.balloter.plain_name|slugify }}">{% endif %}
19-
{{ p.balloter.plain_name }}
20-
{% if p.comment or p.discuss %}</a>{% endif %}
21-
{% if p.is_old_pos %}
22-
)
23-
</span>
24-
{% endif %}
14+
{% if p.is_old_pos %}<span class="text-muted">({% endif %}{% if p.comment or p.discuss %}<a href="#{{ doc.name|slugify }}_{{ p.balloter.plain_name|slugify }}">{% endif %}{{ p.balloter.plain_name }}{% if p.comment or p.discuss %}</a>{% endif %}{% if p.is_old_pos %})</span>{% endif %}
2515
</div>
2616
{% empty %}
2717
<span class="text-muted">(None)</span>
@@ -31,15 +21,11 @@
3121
</div>
3222
<div class="col-md-10">
3323
{% if all_ballots and all_ballots|length > 1 %}
24+
<label class="my-1 fw-bold">Ballots:</label>
3425
<ul class="pagination pagination-sm">
35-
<li class="disabled">
36-
<span>
37-
<b>Ballots</b>
38-
</span>
39-
</li>
4026
{% for b in all_ballots %}
41-
<li {% if b == ballot %}class="active"{% endif %}>
42-
<a href="{% url "ietf.doc.views_doc.document_ballot" name=doc.name ballot_id=b.pk %}">
27+
<li class="page-item{% if b == ballot %} active{% endif %}">
28+
<a class="page-link" href="{% url "ietf.doc.views_doc.document_ballot" name=doc.name ballot_id=b.pk %}">
4329
{{ b.ballot_type.name }} ({{ b.rev }})
4430
</a>
4531
</li>
@@ -118,9 +104,8 @@
118104
<div class="card border-danger {% if p.comment %} mb-2{% endif %}">
119105
<div class="card-header bg-danger text-light">
120106
<div>
121-
<b>{{ p.pos.name }}</b> ({{ p.discuss_time|date:"Y-m-d" }}
122-
{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %}
123-
)
107+
<b>{{ p.pos.name }}</b>
108+
({{ p.discuss_time|date:"Y-m-d " }}{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %})
124109
{% if p.send_email %}
125110
<i class="bi bi-envelope float-end"
126111
title="Email requested to be sent for this discuss"></i>
@@ -145,9 +130,8 @@
145130
<div class="card {{ p.pos|pos_to_border_format }}">
146131
<div class="card-header {{ p.pos|pos_to_label_format }}">
147132
<div>
148-
<b>Comment</b> ({{ p.comment_time|date:"Y-m-d" }}
149-
{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %}
150-
)
133+
<b>Comment</b>
134+
({{ p.comment_time|date:"Y-m-d " }}{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %})
151135
{% if p.send_email %}
152136
<i class="bi bi-envelope-check float-end"
153137
title="Email requested to be sent for this comment"></i>
@@ -174,7 +158,7 @@
174158
{% for n, positions in position_groups %}
175159
{% for p in positions %}
176160
{% if p.is_old_pos %}
177-
<p class="h5" id="{{ doc.name|slugify }}_{{ p.balloter.plain_name|slugify }}">
161+
<p class="h5 mt-4" id="{{ doc.name|slugify }}_{{ p.balloter.plain_name|slugify }}">
178162
<span class="text-muted">({{ p.balloter.plain_name }}; former steering group member)</span>
179163
<span class="float-end">
180164
{% if p.old_positions %}<span class="text-muted small">(was {{ p.old_positions|join:", " }})</span>{% endif %}
@@ -193,13 +177,10 @@
193177
<div>
194178
<b>{{ p.pos.name }} </b>
195179
{% if p.pos.blocking and p.discuss %}
196-
<b>[Treat as non-blocking comment]</b> ({{ p.discuss_time|date:"Y-m-d" }}
197-
{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %}
198-
)
180+
<b>[Treat as non-blocking comment]</b>
181+
({{ p.discuss_time|date:"Y-m-d " }}{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %})
199182
{% else %}
200-
({{ p.comment_time|date:"Y-m-d" }}
201-
{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %}
202-
)
183+
({{ p.comment_time|date:"Y-m-d " }}{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %})
203184
{% endif %}
204185
{% if p.send_email %}
205186
<i class="bi bi-envelope float-end"
@@ -211,12 +192,8 @@
211192
<i class="bi bi-chat float-end"
212193
title="No email send requests for this ballot position"></i>
213194
{% else %}
214-
<div class="float-end small italic"
215-
title="No ballot position send log available">
216-
No email
217-
<br>
218-
send info
219-
</div>
195+
<i class="bi bi-envelope-slash float-end"
196+
title="No ballot position send log available"></i>
220197
{% endif %}
221198
</div>
222199
</div>
@@ -234,4 +211,4 @@
234211
{% endfor %}
235212
{% endfor %}
236213
</div>
237-
</div>
214+
</div>

ietf/templates/registration/edit_profile.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ <h1>Profile information for {{ user.person.name }}</h1>
5454
</div>
5555
{% endif %}
5656
<div class="row mb-3">
57-
<label class="col-sm-2 col-form-label fw-bold">NomCom Eligible</label>
57+
<label class="col-sm-2 col-form-label fw-bold">NomCom eligible</label>
5858
<div class="col-sm-10">
5959
{% with person|is_nomcom_eligible|yesno:'Yes,No,No' as is_eligible %}
60-
<p class="form-control-plaintext {% if is_eligible == 'Yes' %}text-success fw-bold{% endif %}">
60+
<p class="form-control-plaintext {% if is_eligible == 'Yes' %}text-success fw-bold{% else %}text-danger{% endif %}">
6161
{{ is_eligible }}
6262
</p>
6363
{% endwith %}
@@ -95,7 +95,7 @@ <h1>Profile information for {{ user.person.name }}</h1>
9595
</div>
9696
<div class="row mb-3">
9797
<label class="col-sm-2 col-form-label fw-bold">
98-
External Resources
98+
External resources
9999
<a href="#pi" aria-label="!">
100100
<i class="bi bi-exclamation-circle"></i>
101101
</a>
@@ -158,7 +158,7 @@ <h1>Profile information for {{ user.person.name }}</h1>
158158
<i class="bi bi-exclamation-circle"></i>
159159
</a>
160160
{% endif %}
161-
{{ email }}
161+
{{ email|linkify }}
162162
</td>
163163
<td>{{ email.origin|default:'(unknown)'|urlize_ietf_docs }}</td>
164164
</tr>
@@ -271,4 +271,4 @@ <h1>Profile information for {{ user.person.name }}</h1>
271271
});
272272

273273
</script>
274-
{% endblock %}
274+
{% endblock %}

0 commit comments

Comments
 (0)