fix: Misc template fixes (#3813)

* fix: Remove extra whitespace around parentheses

* fix: Make heading capitalization consistent, colorize a "No"

* fix: Pagination element, spacing, replace text with icon
This commit is contained in:
Lars Eggert 2022-04-12 18:07:22 +03:00 committed by GitHub
parent 4f1dcd6f41
commit d2edc5bda3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 43 deletions

View file

@ -11,17 +11,7 @@
</p>
{% for p in positions %}
<div class="balloter-name mb-2">
{% 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 %}
{% 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 %}
</div>
{% empty %}
<span class="text-muted">(None)</span>
@ -31,15 +21,11 @@
</div>
<div class="col-md-10">
{% if all_ballots and all_ballots|length > 1 %}
<label class="my-1 fw-bold">Ballots:</label>
<ul class="pagination pagination-sm">
<li class="disabled">
<span>
<b>Ballots</b>
</span>
</li>
{% for b in all_ballots %}
<li {% if b == ballot %}class="active"{% endif %}>
<a href="{% url "ietf.doc.views_doc.document_ballot" name=doc.name ballot_id=b.pk %}">
<li class="page-item{% if b == ballot %} active{% endif %}">
<a class="page-link" href="{% url "ietf.doc.views_doc.document_ballot" name=doc.name ballot_id=b.pk %}">
{{ b.ballot_type.name }} ({{ b.rev }})
</a>
</li>
@ -118,9 +104,8 @@
<div class="card border-danger {% if p.comment %} mb-2{% endif %}">
<div class="card-header bg-danger text-light">
<div>
<b>{{ p.pos.name }}</b> ({{ p.discuss_time|date:"Y-m-d" }}
{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %}
)
<b>{{ p.pos.name }}</b>
({{ p.discuss_time|date:"Y-m-d " }}{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %})
{% if p.send_email %}
<i class="bi bi-envelope float-end"
title="Email requested to be sent for this discuss"></i>
@ -145,9 +130,8 @@
<div class="card {{ p.pos|pos_to_border_format }}">
<div class="card-header {{ p.pos|pos_to_label_format }}">
<div>
<b>Comment</b> ({{ p.comment_time|date:"Y-m-d" }}
{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %}
)
<b>Comment</b>
({{ p.comment_time|date:"Y-m-d " }}{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %})
{% if p.send_email %}
<i class="bi bi-envelope-check float-end"
title="Email requested to be sent for this comment"></i>
@ -174,7 +158,7 @@
{% for n, positions in position_groups %}
{% for p in positions %}
{% if p.is_old_pos %}
<p class="h5" id="{{ doc.name|slugify }}_{{ p.balloter.plain_name|slugify }}">
<p class="h5 mt-4" id="{{ doc.name|slugify }}_{{ p.balloter.plain_name|slugify }}">
<span class="text-muted">({{ p.balloter.plain_name }}; former steering group member)</span>
<span class="float-end">
{% if p.old_positions %}<span class="text-muted small">(was {{ p.old_positions|join:", " }})</span>{% endif %}
@ -193,13 +177,10 @@
<div>
<b>{{ p.pos.name }} </b>
{% if p.pos.blocking and p.discuss %}
<b>[Treat as non-blocking comment]</b> ({{ p.discuss_time|date:"Y-m-d" }}
{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %}
)
<b>[Treat as non-blocking comment]</b>
({{ p.discuss_time|date:"Y-m-d " }}{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %})
{% else %}
({{ p.comment_time|date:"Y-m-d" }}
{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %}
)
({{ p.comment_time|date:"Y-m-d " }}{% if not p.for_current_revision %}for -{{ p.get_dochistory.rev }}{% endif %})
{% endif %}
{% if p.send_email %}
<i class="bi bi-envelope float-end"
@ -211,12 +192,8 @@
<i class="bi bi-chat float-end"
title="No email send requests for this ballot position"></i>
{% else %}
<div class="float-end small italic"
title="No ballot position send log available">
No email
<br>
send info
</div>
<i class="bi bi-envelope-slash float-end"
title="No ballot position send log available"></i>
{% endif %}
</div>
</div>
@ -234,4 +211,4 @@
{% endfor %}
{% endfor %}
</div>
</div>
</div>

View file

@ -54,10 +54,10 @@
</div>
{% endif %}
<div class="row mb-3">
<label class="col-sm-2 col-form-label fw-bold">NomCom Eligible</label>
<label class="col-sm-2 col-form-label fw-bold">NomCom eligible</label>
<div class="col-sm-10">
{% with person|is_nomcom_eligible|yesno:'Yes,No,No' as is_eligible %}
<p class="form-control-plaintext {% if is_eligible == 'Yes' %}text-success fw-bold{% endif %}">
<p class="form-control-plaintext {% if is_eligible == 'Yes' %}text-success fw-bold{% else %}text-danger{% endif %}">
{{ is_eligible }}
</p>
{% endwith %}
@ -95,7 +95,7 @@
</div>
<div class="row mb-3">
<label class="col-sm-2 col-form-label fw-bold">
External Resources
External resources
<a href="#pi" aria-label="!">
<i class="bi bi-exclamation-circle"></i>
</a>
@ -158,7 +158,7 @@
<i class="bi bi-exclamation-circle"></i>
</a>
{% endif %}
{{ email }}
{{ email|linkify }}
</td>
<td>{{ email.origin|default:'(unknown)'|urlize_ietf_docs }}</td>
</tr>
@ -271,4 +271,4 @@
});
</script>
{% endblock %}
{% endblock %}