Skip to content

Commit c65f681

Browse files
committed
Finalize some bs5 templates
- Legacy-Id: 19714
1 parent 7042038 commit c65f681

10 files changed

Lines changed: 343 additions & 360 deletions

File tree

ietf/static/js/list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $(document)
3232
})
3333
.toArray();
3434

35-
if (fields.length && fields.filter(field => field != "")) {
35+
if (fields.length == 0 || !fields.filter(field => field != "")) {
3636
console.log("No table fields defined, disabling search/sort.");
3737

3838
} else {
Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,86 @@
1-
{# Copyright The IETF Trust 2015, All Rights Reserved #}{% load origin %}{% origin %}
1+
{# Copyright The IETF Trust 2015, All Rights Reserved #}
2+
{% load origin %}
3+
{% origin %}
24
{% load ietf_filters ballot_icon person_filters %}
3-
45
<td>
5-
<div class="float-end" id="ballot-icon-{{doc.name}}">
6-
{% if doc.ballot %}{% ballot_icon doc %}{% endif %}
6+
<div class="float-end mx-3 mb-3" id="ballot-icon-{{ doc.name }}">
7+
{% if doc.ballot %}
8+
{% ballot_icon doc %}
9+
{% endif %}
710
</div>
8-
911
{% if not doc.get_state_slug == "rfc" %}
1012
{% if '::' in doc.friendly_state %}
1113
{{ doc.friendly_state|safe|split:"::"|join:"::<wbr>" }}
1214
{% else %}
1315
{{ doc.friendly_state|safe }}
1416
{% endif %}
15-
1617
{% if doc|state:"draft-rfceditor" %}
1718
<wbr>: <a href="https://www.rfc-editor.org/queue2.html#{{ doc.name }}">{{ doc|state:"draft-rfceditor" }}</a>
1819
{% endif %}
19-
20-
<wbr>{{ doc|auth48_alert_badge }}
21-
22-
<wbr>{{ doc|state_age_colored }}
23-
20+
{{ doc|auth48_alert_badge }}
21+
{{ doc|state_age_colored }}
2422
{% if doc.telechat_date %}
25-
<br>IESG telechat: {{ doc.telechat_date }}
23+
<br>
24+
IESG telechat: {{ doc.telechat_date }}
2625
{% endif %}
27-
2826
{% with doc.active_defer_event as defer %}
2927
{% if defer %}
30-
<br>Deferred by {{ defer.by }} on {{ defer.time|date:"Y-m-d" }})
28+
<br>
29+
Deferred by {{ defer.by }} on {{ defer.time|date:"Y-m-d" }})
3130
{% endif %}
3231
{% endwith %}
33-
3432
{% if doc.stream %}
3533
<br>
3634
{% if doc|state:"stream" %}
37-
{{ doc|state:"stream" }}{% if doc.intended_std_level %}:<wbr>{% endif %}
35+
{{ doc|state:"stream" }}
36+
{% if doc.intended_std_level %}
37+
:<wbr>
38+
{% endif %}
3839
{% else %}
39-
{{ doc.stream }} stream{% if doc.intended_std_level %}:<wbr>{% endif %}
40+
{{ doc.stream }} stream
41+
{% if doc.intended_std_level %}
42+
:<wbr>
43+
{% endif %}
4044
{% endif %}
4145
{% endif %}
42-
43-
{% if doc.intended_std_level %}
44-
{{ doc.intended_std_level }}
45-
{% endif %}
46-
46+
{% if doc.intended_std_level %}{{ doc.intended_std_level }}{% endif %}
4747
{% if doc.duedate %}
4848
<br>
4949
Due date: {{ doc.duedate }}
50-
{%endif %}
51-
50+
{% endif %}
5251
{% if doc.reviewed_by_teams %}
53-
<br>Reviews:
52+
<br>
53+
Reviews:
5454
{% spaceless %}
55-
{% for acronym in doc.reviewed_by_teams %}
56-
<a href="{% url "ietf.group.views.group_home" acronym=acronym %}">{{ acronym }}</a>{% if not forloop.last %}, {% endif %}
57-
{% endfor %}
55+
{% for acronym in doc.reviewed_by_teams %}
56+
<a href="{% url "ietf.group.views.group_home" acronym=acronym %}">{{ acronym }}</a>
57+
{% if not forloop.last %},{% endif %}
58+
{% endfor %}
5859
{% endspaceless %}
5960
{% endif %}
60-
6161
{% for m in doc.milestones %}
6262
{% if forloop.first %}<br>{% endif %}
63-
<span title="Part of {{ m.group.acronym }} milestone: {{ m.desc }}" class="milestone">{{ m.due|date:"M Y" }}</span>{% if not forloop.last %}, {% endif %}
63+
<span title="Part of {{ m.group.acronym }} milestone: {{ m.desc }}"
64+
class="milestone">{{ m.due|date:"M Y" }}</span>
65+
{% if not forloop.last %},{% endif %}
6466
{% endfor %}
65-
6667
{% if doc.action_holders_enabled and doc.action_holders.exists %}
67-
<br>Action Holders:
68+
<br>
69+
Action Holders:
6870
{% for action_holder in doc.documentactionholder_set.all %}
69-
<wbr>{% person_link action_holder.person title=action_holder.role_for_doc %}{{ action_holder|action_holder_badge }}{% if not forloop.last %}, {% endif %}
71+
{% person_link action_holder.person title=action_holder.role_for_doc %} {{ action_holder|action_holder_badge }}{% if not forloop.last %},{% endif %}
7072
{% endfor %}
7173
{% endif %}
72-
{% else %}{# RFC #}
74+
{% else %}
75+
{# RFC #}
7376
{{ doc.std_level|safe }} RFC
74-
7577
{% if doc.obsoleted_by_list %}
76-
<br>Obsoleted by {{ doc.obsoleted_by_list|join:", "|urlize_ietf_docs }}
78+
<br>
79+
Obsoleted by {{ doc.obsoleted_by_list|join:", "|urlize_ietf_docs }}
7780
{% endif %}
78-
7981
{% if doc.updated_by_list %}
80-
<br>Updated by {{ doc.updated_by_list|join:", "|urlize_ietf_docs }}
82+
<br>
83+
Updated by {{ doc.updated_by_list|join:", "|urlize_ietf_docs }}
8184
{% endif %}
8285
{% endif %}
83-
84-
85-
8686
</td>

ietf/templates/iesg/agenda.html

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,7 @@
1111
{% block content %}
1212
{% origin %}
1313
<h1>IESG agenda: {{ date }}</h1>
14-
<ul class="nav nav-tabs mb-3">
15-
<li class="nav-item">
16-
<a class="nav-link active" href="{% url 'ietf.iesg.views.agenda' %}">IESG Agenda</a>
17-
</li>
18-
<li class="nav-item">
19-
<a class="nav-link" href="{% url 'ietf.iesg.views.agenda_documents' %}">Documents on future agendas</a>
20-
</li>
21-
<li class="nav-item">
22-
<a class="nav-link" href="{% url 'ietf.iesg.views.discusses' %}">DISCUSS positions</a>
23-
</li>
24-
<li class="nav-item">
25-
<a class="nav-link" href="{% url 'ietf.iesg.views.past_documents' %}">Documents on recent agendas</a>
26-
</li>
27-
<li class="nav-item">
28-
<a class="nav-link" href="{% url 'ietf.iesg.views.photos' %}">IESG Photos</a>
29-
</li>
30-
</ul>
14+
{% include "iesg/nav.html" with active="agenda" %}
3115
{% for num, section in sections %}
3216
{% if num|sectionlevel == 1 %}
3317
<h2 class="anchor-target" id="sec-{{ num|slugify }}">{{ num }}. {{ section.title|safe }}</h2>
Lines changed: 51 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,74 @@
11
{% extends "base.html" %}
2+
{% comment %}bs5ok{% endcomment %}
23
{# Copyright The IETF Trust 2015, All Rights Reserved #}
34
{% load origin static %}
4-
55
{% load ballot_icon %}
66
{% load ietf_filters %}
77
{% load django_bootstrap5 %}
8-
98
{% block pagehead %}
109
<link rel="alternate" type="application/atom+xml" href="/feed/iesg-agenda/">
1110
<link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
1211
{% endblock %}
13-
1412
{% block title %}Documents on future IESG telechat agendas{% endblock %}
15-
1613
{% block content %}
1714
{% origin %}
1815
<h1>Documents on future IESG telechat agendas</h1>
19-
20-
<ul class="nav nav-tabs mb-3">
21-
<li class="nav-item "><a class="nav-link" href="{% url 'ietf.iesg.views.agenda' %}">IESG Agenda</a></li>
22-
<li class="nav-item"><a class="nav-link active" href="{% url 'ietf.iesg.views.agenda_documents' %}">Documents on future agendas</a></li>
23-
<li class="nav-item "><a class="nav-link" href="{% url 'ietf.iesg.views.discusses' %}">DISCUSS positions</a></li>
24-
<li class="nav-item "><a class="nav-link" href="{% url 'ietf.iesg.views.past_documents' %}">Documents on recent agendas</a></li>
25-
<li class="nav-item "><a class="nav-link" href="{% url 'ietf.iesg.views.photos' %}">IESG Photos</a></li>
26-
</ul>
27-
16+
{% include "iesg/nav.html" with active="agenda_documents" %}
2817
{% if user|has_role:"Secretariat" %}
2918
<form class="form-inline" method="post">
3019
{% csrf_token %}
31-
{% endif %}
32-
33-
{% for t in telechats %}
34-
<h2>IESG telechat {{t.date}}
35-
<br><small class="text-muted">{{t.pages}} page{{t.pages|pluralize}}</small>
36-
</h2>
37-
<div class="buttonlist">
38-
<a class="btn btn-primary" role="button" href="/iesg/agenda/">
39-
<span class="bi bi-list"></span>
40-
Full IESG agenda
41-
</a>
42-
43-
<a class="btn btn-primary" role="button" href="/iesg/agenda/telechat-{{t.date|date:"Y"}}-{{t.date|date:"m"}}-{{t.date|date:"d"}}-docs.tgz">
44-
<span class="bi bi-download"></span>
45-
Download documents
46-
</a>
47-
</div>
48-
49-
{% for num, section in t.sections %}
50-
{% if "docs" not in section or section.docs %}
51-
{% if num|sectionlevel == 1 %}<h3 class="mt-3">{{ num }}. {{ section.title|safe }}</h3>{% endif %}
52-
{% if num|sectionlevel == 2 %}<h4 class="mt-3">{{ num }} {{ section.title|safe }}</h4>{% endif %}
53-
{% if num|sectionlevel == 3 %}<h5 class="mt-3">{{ num }} {{ section.title|safe }}</h5>{% endif %}
54-
{% endif %}
55-
56-
{% if "docs" in section and section.docs %}
57-
<table class="table table-sm table-striped tablesorter">
58-
<thead>
59-
<tr>
60-
<th></th>
61-
<th data-sort="document">Document</th>
62-
<th data-sort="date">Date</th>
63-
<th data-sort="status">Status</th>
64-
<th data-sort="ipr">IPR</th>
65-
<th data-sort="ad">AD/Shepherd</th>
66-
</tr>
67-
</thead>
68-
<tbody>
69-
{% for doc in section.docs %}
70-
{% include "doc/search/search_result_row.html" with color_row_positions=True %}
71-
{% endfor %}
72-
</tbody>
73-
</table>
74-
{% endif %}
20+
{% endif %}
21+
{% for t in telechats %}
22+
<h2>
23+
IESG telechat {{ t.date }}
24+
<br>
25+
<small class="text-muted">{{ t.pages }} page{{ t.pages|pluralize }}</small>
26+
</h2>
27+
<div class="buttonlist">
28+
<a class="btn btn-primary" role="button" href="/iesg/agenda/">
29+
<span class="bi bi-list"></span>
30+
Full IESG agenda
31+
</a>
32+
<a class="btn btn-primary"
33+
role="button"
34+
href="/iesg/agenda/telechat-{{ t.date|date:'Y' }}-{{ t.date|date:'m' }}-{{ t.date|date:'d' }}-docs.tgz">
35+
<span class="bi bi-download"></span>
36+
Download documents
37+
</a>
38+
</div>
39+
{% for num, section in t.sections %}
40+
{% if "docs" not in section or section.docs %}
41+
{% if num|sectionlevel == 1 %}<h3 class="mt-3">{{ num }}. {{ section.title|safe }}</h3>{% endif %}
42+
{% if num|sectionlevel == 2 %}<h4 class="mt-3">{{ num }} {{ section.title|safe }}</h4>{% endif %}
43+
{% if num|sectionlevel == 3 %}<h5 class="mt-3">{{ num }} {{ section.title|safe }}</h5>{% endif %}
44+
{% endif %}
45+
{% if "docs" in section and section.docs %}
46+
<table class="table table-sm table-striped tablesorter">
47+
<thead>
48+
<tr>
49+
<th></th>
50+
<th data-sort="document">Document</th>
51+
<th data-sort="date">Date</th>
52+
<th data-sort="status">Status</th>
53+
<th data-sort="ipr">IPR</th>
54+
<th data-sort="ad">AD/Shepherd</th>
55+
</tr>
56+
</thead>
57+
<tbody>
58+
{% for doc in section.docs %}
59+
{% include "doc/search/search_result_row.html" with color_row_positions=True %}
60+
{% endfor %}
61+
</tbody>
62+
</table>
63+
{% endif %}
64+
{% endfor %}
65+
<hr>
7566
{% endfor %}
76-
<hr>
77-
{% endfor %}
78-
79-
{% if user|has_role:"Secretariat" %}
80-
{% bootstrap_button button_type="submit" content="Save reschedules" title="Save reschedule changes done with the drop-down boxes below" %}
67+
{% if user|has_role:"Secretariat" %}
68+
{% bootstrap_button button_type="submit" content="Save reschedules" title="Save reschedule changes done with the drop-down boxes below" %}
8169
</form>
8270
{% endif %}
83-
8471
{% endblock content %}
85-
8672
{% block js %}
8773
<script src="{% static "ietf/js/list.js" %}"></script>
88-
{% endblock %}
74+
{% endblock %}

0 commit comments

Comments
 (0)