Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Replace deprecated bootstrap CSS classes with 5.3 ones #6166

Merged
merged 3 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ietf/doc/templatetags/ietf_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,7 @@ def badgeify(blob):
(r"has issues", "warning", "exclamation-lg"),
(r"assigned", "info", "person-plus-fill"),
(r"will not review|overtaken by events|withdrawn", "secondary", "dash-lg"),
(r"no response", "warning", "question-lg"),
]
text = str(blob)

Expand All @@ -868,7 +869,7 @@ def badgeify(blob):

return mark_safe(
f"""
<span class="badge rounded-pill text-bg-{color}">
<span class="badge rounded-pill text-bg-{color} text-wrap">
<i class="bi bi-{icon}"></i> {text.capitalize()}
</span>
"""
Expand Down
2 changes: 1 addition & 1 deletion ietf/group/tests_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def test_reviewer_overview(self):
r = self.client.get(url)
self.assertEqual(r.status_code, 200)
# We should see the new document with status of no response
self.assertContains(r, "No Response")
self.assertContains(r, "No response")
self.assertContains(r, review_req1.doc.name)
self.assertContains(r, review_req2.doc.name)
# None of the reviews should be completed this time,
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
data-group-menu-data-url="{% url 'ietf.group.views.group_menu_data' %}">
{% analytical_body_top %}
<a class="visually-hidden visually-hidden-focusable" href="#content">Skip to main content</a>
<nav class="navbar navbar-expand-lg fixed-top {% if server_mode and server_mode != "production" %}bg-danger-subtle{% else %}bg-secondary{% endif %}">
<nav class="navbar navbar-expand-lg fixed-top {% if server_mode and server_mode != "production" %}bg-danger-subtle{% else %}bg-secondary-subtle{% endif %}">
<div class="container-fluid">
<a class="navbar-brand" href="/">
{% include "logo.html" with org="ietf" classes="me-2" nor=True only %}
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/document_statement.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<td class="edit"></td>
<td>
<span id="statement-type">{% if doc.get_state.slug != "active" %}{{doc.get_state.name}} {% endif %}{% if doc.group %}{{doc.group.acronym|upper}} {%endif%}Statement</span>
{% if snapshot %}<span class="badge rounded-pill bg-warning">Snapshot</span>{% endif %}
{% if snapshot %}<span class="badge rounded-pill text-bg-warning">Snapshot</span>{% endif %}
{% if replaced_by %}<div>Replaced by {{ replaced_by|urlize_related_source_list:False|join:", " }}</div>{% endif %}
{% if replaces %}<div>Replaces {{ replaces|urlize_related_target_list:False|join:", " }}</div>{% endif %}
</td>
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/drafts_in_iesg_process.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1>{{ title }}</h1>
</thead>
{% for state, docs in grouped_docs %}
<tbody>
<tr class="bg-info-subtle">
<tr class="table-info">
<th scope="col" colspan="5">{{ state.name }}</th>
</tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/review_assignment_summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<a class="text-body-secondary"
href="{% url 'ietf.doc.views_review.review_request' review_assignment.review_request.doc.name review_assignment.review_request.pk %}">
{{ review_assignment.review_request.team.acronym|upper }} {{ review_assignment.review_request.type.name }} Review due {{ review_assignment.review_request.deadline|date:"Y-m-d" }}</a>
<span class="badge rounded-pill ms-1 bg-secondary">
<span class="badge rounded-pill text-bg-secondary ms-1">
Incomplete
</span>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions ietf/templates/doc/review_request_summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
href="{% url 'ietf.doc.views_review.review_request' review_request.doc.name review_request.pk %}">
{{ review_request.team.acronym|upper }} {{ review_request.type.name }} Review due {{ review_request.deadline|date:"Y-m-d" }}
</a>
<span class="badge rounded-pill ms-1 bg-secondary">
<span class="badge rounded-pill text-bg-secondary ms-1">
Requested
</span>
</div>
</div>
2 changes: 1 addition & 1 deletion ietf/templates/doc/search/search_results.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
{% regroup docs by search_heading as grouped_docs %}
{% for doc_group in grouped_docs %}
<tbody>
<tr class="bg-info-subtle">
<tr class="table-info">
<td></td>
<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 }})
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/status_change/status_changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1>RFC status changes</h1>
</thead>
{% for state in state_groups %}
<tbody>
<tr class="bg-info-subtle">
<tr class="table-info">
<th scope="col" colspan="2">{{ state.grouper }}</th>
</tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/group/active_adm.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h1>Active administrative groups</h1>
{% for grouptype in grouped_groups %}
<tbody>
<tr>
<th scope="col" colspan="2" class="bg-info">
<th scope="col" colspan="2" class="table-info">
Active {% firstof grouptype.grouper.verbose_name grouptype.grouper.name 'Top-level Administration' %}
</th>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/group/active_iabgroups.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h1>Active IAB groups</h1>
{% regroup iabgroups by type as grouped_groups %}
{% for grouptype in grouped_groups %}
<tbody>
<tr class="bg-info-subtle"><th scope="col" colspan="3">
<tr class="table-info"><th scope="col" colspan="3">
{% firstof grouptype.grouper.verbose_name grouptype.grouper.name %}{{ grouptype.list|pluralize }}
</th></tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/group/active_rfced.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h1>Active RFC Editor Groups</h1>
{% for grouptype in grouped_groups %}
<tbody>
<tr>
<th scope="col" colspan="2" class="bg-info">
<th scope="col" colspan="2" class="table-info">
Active {% firstof grouptype.grouper.verbose_name grouptype.grouper.name 'Top-level Organization' %} Groups
</th>
</tr>
Expand Down
8 changes: 4 additions & 4 deletions ietf/templates/group/review_requests.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h2 class="mt-5" id="unassigned-and-open-review-requests">Unassigned and open re
</tr>
</thead>
<tbody>
<tr class="bg-info-subtle" id="unassigned-review-requests">
<tr class="table-info" id="unassigned-review-requests">
<th scope="col" colspan="6">Unassigned review requests</th>
</tr>
</tbody>
Expand Down Expand Up @@ -79,7 +79,7 @@ <h2 class="mt-5" id="unassigned-and-open-review-requests">Unassigned and open re
</tr>
</thead>
<tbody>
<tr class="bg-info-subtle" id="open_review_assignments">
<tr class="table-info" id="open_review_assignments">
<th scope="col" colspan="7">Open review requests</th>
</tr>
</tbody>
Expand Down Expand Up @@ -147,7 +147,7 @@ <h2 class="mt-5" id="closed-review-requests">Closed review requests and assignme
</tr>
</thead>
<tbody>
<tr class="bg-info-subtle">
<tr class="table-info">
<th scope="col" colspan="6">
Closed review requests
</th>
Expand Down Expand Up @@ -211,7 +211,7 @@ <h2 class="mt-5" id="closed-review-requests">Closed review requests and assignme
</tr>
</thead>
<tbody>
<tr class="bg-info-subtle">
<tr class="table-info">
<th scope="col" colspan="8">
Closed review assignments
</th>
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/group/reviewer_overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h2 class="mt-3">Reviewers</h2>
<a href="{% url 'ietf.doc.views_review.review_request' name=doc_name request_id=req_pk %}">{{ deadline|date|split:"-"|join:"-<wbr>" }}</a>
</div>
<div class="col-md-2 me-1">
<span class="badge rounded-pill bg-{% if state.slug == 'completed' or state.slug == 'part-completed' %}success{% elif state.slug == 'no-response' %}danger{% elif state.slug == 'overtaken' %}warning{% elif state.slug == 'requested' or state.slug == 'accepted' %}primary{% else %}secondary{% endif %} text-wrap">{{ state.name }}</span>
{{ state.name|badgeify }}
</div>
<div class="col-md-1 me-1 text-end d-none d-lg-block">
{% if assignment_to_closure_days != None %}
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/ipr/search_doc_result.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
{% for doc in docs %}
<tbody>
<tr>
<th scope="col" class="bg-info" colspan="3">
<th scope="col" class="table-info" colspan="3">
Results for {{ doc.name|prettystdname|urlize_ietf_docs }} ("{{ doc.document.title }}"){% if not forloop.first %}{% if doc.related %}, which was {{ doc.relation|lower }} {{ doc.related.source|prettystdname|urlize_ietf_docs }} ("{{ doc.related.source.title }}"){% endif %}{% endif %}
</th>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/ipr/search_doctitle_result.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{% for alias in docs %}
<tbody>
<tr>
<th scope="col" class="bg-info" colspan="3">
<th scope="col" class="table-info" colspan="3">
IPR that is related to {{ alias.name|prettystdname:""|urlize_ietf_docs }} ("{{ alias.document.title }}")
{% if alias.related %}
that was {{ alias.relation|lower }} {{ alias.related.source.name|prettystdname:""|urlize_ietf_docs }} ("{{ alias.related.source.title }}")
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/ipr/search_result.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h2 class="mt-5">
{% endifchanged %}
{% endif %}
<tbody>
<tr class="bg-info-subtle">
<tr class="table-info">
<th scope="col" colspan="3">
{% block intro_prefix %}IPR that was submitted by "{{ q }}" and{% endblock %}
{% block related %}
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/ipr/search_wg_result.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</thead>
{% for alias in docs %}
<tbody>
<tr class="bg-info-subtle">
<tr class="table-info">
<th scope="col" colspan="3">
IPR related to {{ alias.name|prettystdname|urlize_ietf_docs }} ("{{ alias.document.title }}")
{% if alias.related %}
Expand Down
10 changes: 5 additions & 5 deletions ietf/templates/submit/tool_instructions.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h3 class="mt-4">Upload screen</h3>
</p>
<table class="table table-sm table-striped">
<tbody>
<tr class="bg-info-subtle">
<tr class="table-info">
<th scope="colgroup" colspan="2">Form buttons and resulting actions:</th>
</tr>
</tbody>
Expand Down Expand Up @@ -85,7 +85,7 @@ <h3 class="mt-4">Validation screen</h3>
</p>
<table class="table table-sm table-striped">
<tbody>
<tr class="bg-info-subtle">
<tr class="table-info">
<th scope="colgroup" colspan="2">Form buttons and resulting actions:</th>
</tr>
</tbody>
Expand All @@ -104,7 +104,7 @@ <h3 class="mt-4">Validation screen</h3>
</tr>
</tbody>
<tbody>
<tr class="bg-info-subtle">
<tr class="table-info">
<th scope="colgroup" colspan="2">
When no metadata error is detected:
</th>
Expand Down Expand Up @@ -145,7 +145,7 @@ <h3 class="mt-4">
</p>
<table class="table table-sm table-striped">
<tbody>
<tr class="bg-info-subtle">
<tr class="table-info">
<th scope="colgroup" colspan="2">
Form buttons and resulting actions:
</th>
Expand Down Expand Up @@ -186,7 +186,7 @@ <h3 class="mt-4">
</p>
<table class="table table-sm table-striped">
<tbody>
<tr class="bg-info-subtle">
<tr class="table-info">
<th scope="colgroup" colspan="2">
Form buttons and resulting actions:
</th>
Expand Down
Loading