Skip to content

Commit 7f918b0

Browse files
committed
More test fixes
- Legacy-Id: 19784
1 parent c68446a commit 7f918b0

File tree

5 files changed

+138
-98
lines changed

5 files changed

+138
-98
lines changed

ietf/group/tests_info.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,6 @@ def test_add_milestone_as_chair(self):
11671167
'm-1-desc': "Test 3",
11681168
'm-1-due': due.strftime("%B %Y"),
11691169
'm-1-resolved': "",
1170-
'm-1-docs': "",
11711170
'action': "save",
11721171
})
11731172
self.assertEqual(r.status_code, 302)
@@ -1404,7 +1403,6 @@ def test_add_first_milestone(self):
14041403
'm-1-desc': "Test 3",
14051404
'm-1-order': 1,
14061405
'm-1-resolved': "",
1407-
'm-1-docs': "",
14081406
'action': "save",
14091407
})
14101408
self.assertEqual(r.status_code, 302)

ietf/static/js/edit-milestones.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ $(document)
142142
.closest(".edit-milestone")
143143
.find("[name$=resolved]");
144144
if (resolved) {
145-
reason.closest(".form-group")
145+
reason.closest(".row")
146146
.removeClass("visually-hidden");
147147
if (!reason.val())
148148
reason.val(reason.data("default"));
149149
} else {
150-
reason.closest(".form-group")
150+
reason.closest(".row")
151151
.addClass("visually-hidden");
152152
reason.val("");
153153
}

ietf/static/js/list.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ function replace_with_internal(table, internal_table, i) {
2020
.replaceWith(internal_table[i]
2121
.children("table")
2222
.children("tbody")
23-
.clone());}
23+
.clone());
24+
}
2425

2526
function field_magic(i, e, fields) {
2627
if (fields[i] == "date" || fields[i] == "num") {
@@ -172,10 +173,12 @@ $(document)
172173
}
173174

174175
list_instance.push(
175-
new List(hook, {
176+
new List(hook, pagination ? {
176177
valueNames: fields,
177178
pagination: pagination,
178179
page: items_per_page
180+
} : {
181+
valueNames: fields
179182
}));
180183
});
181184

Lines changed: 64 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,65 @@
1-
<table class="table table-sm table-striped">
2-
<tbody>
3-
{% for s in sessions %}
4-
<tr>
5-
<td>
6-
{% ifchanged s.meeting %}
7-
{% if s.meeting.type.slug == 'ietf' %}
8-
IETF {{s.meeting.number}}
9-
{% else %}
10-
{{s.meeting.number}}
11-
{% endif %}
12-
{% endifchanged %}
13-
</td>
14-
<td class="text-right">
15-
{% if s.name %}{{ s.name }}<br>{% endif %}
16-
{% if s.current_status == "sched" %}
17-
{{s.time|date:"D"}} &nbsp; {{s.time|date:"Y-m-d"}}
18-
{% else %}
19-
{{s.current_status_name}}
20-
{% endif %}
21-
{% if show_request and s.meeting.type_id == 'ietf' %}
22-
{% if can_edit %}
23-
<br>
24-
<a class="btn btn-primary btn-sm" href="{% url 'ietf.secr.sreq.views.view' num=s.meeting.number acronym=s.group.acronym %}">Edit Session Request</a>
25-
{% endif %}
26-
{% endif %}
27-
</td>
28-
<td class="text-left padded-left ">
29-
{% if show_ical %}
30-
{% if s.meeting.type_id == 'ietf' %}
31-
{{s.time|date:"H:i"}}
32-
&nbsp;<a href="{% url 'ietf.meeting.views.agenda_ical' num=s.meeting.number session_id=s.id %}"><span class="bi bi-calendar"></span></a>
33-
{% else %}
34-
&nbsp;<a href="{% url 'ietf.meeting.views.agenda_ical' num=s.meeting.number acronym=s.group.acronym %}"><span class="bi bi-calendar"></span></a>
35-
{% endif %}
36-
{% endif %}
37-
</td>
38-
<td>{% if s.agenda %}<a href="{{ s.agenda.get_absolute_url }}">Agenda</a>{% endif %}</td>
39-
<td>{% if s.minutes %}<a href="{{ s.minutes.get_absolute_url }}">Minutes</a>{% endif %}</td>
40-
<td>
41-
<a href="{% url 'ietf.meeting.views.session_details' num=s.meeting.number acronym=s.group.acronym %}">
42-
{% if can_always_edit or can_edit_materials %}Edit {% endif %}Materials
1+
{# bs5ok #}
2+
{% for s in sessions %}
3+
<tr>
4+
<td>
5+
{% if s.meeting.type.slug == 'ietf' %}
6+
IETF {{ s.meeting.number }}
7+
{% else %}
8+
{{ s.meeting.number }}
9+
{% endif %}
10+
</td>
11+
<td>
12+
{% if s.name %}{{ s.name }}{% endif %}
13+
{% if s.current_status == "sched" %}
14+
{{ s.time|date:"Y-m-d" }}
15+
{% else %}
16+
<i>{{ s.current_status_name }}</i>
17+
{% endif %}
18+
{% if show_request and s.meeting.type_id == 'ietf' %}
19+
{% if can_edit %}
20+
<a class="btn btn-primary btn-sm"
21+
href="{% url 'ietf.secr.sreq.views.view' num=s.meeting.number acronym=s.group.acronym %}">
22+
Edit Session Request
4323
</a>
44-
</td>
45-
{% endfor %}
46-
</tbody>
47-
</table>
24+
{% endif %}
25+
{% endif %}
26+
</td>
27+
<td>
28+
{% if s.current_status == "sched" %}{{ s.time|date:"D" }}{% endif %}
29+
</td>
30+
<td>
31+
{% if show_ical %}
32+
{% if s.meeting.type_id == 'ietf' %}
33+
{{ s.time|date:"H:i" }}
34+
<a class="btn btn-primary btn-sm"
35+
href="{% url 'ietf.meeting.views.agenda_ical' num=s.meeting.number session_id=s.id %}">
36+
<span class="bi bi-calendar"></span>
37+
</a>
38+
{% else %}
39+
<a class="btn btn-primary btn-sm"
40+
href="{% url 'ietf.meeting.views.agenda_ical' num=s.meeting.number acronym=s.group.acronym %}">
41+
<span class="bi bi-calendar"></span>
42+
</a>
43+
{% endif %}
44+
{% endif %}
45+
<a class="btn btn-sm {% if not s.agenda %}btn-secondary disabled{% else %}btn-primary{% endif %}"
46+
{% if s.agenda %}bhref="{{ s.agenda.get_absolute_url }}"{% endif %}>
47+
Agenda
48+
</a>
49+
<a class="btn btn-sm {% if not s.minutes %}btn-secondary disabled{% else %}btn-primary{% endif %}"
50+
{% if s.minutes %}href="{{ s.minutes.get_absolute_url }}"{% endif %}>
51+
Minutes
52+
</a>
53+
<a class="btn btn-primary btn-sm"
54+
href="{% url 'ietf.meeting.views.session_details' num=s.meeting.number acronym=s.group.acronym %}">
55+
Materials
56+
</a>
57+
{% if can_always_edit or can_edit_materials %}
58+
<a class="btn btn-info btn-sm float-end"
59+
href="{% url 'ietf.meeting.views.session_details' num=s.meeting.number acronym=s.group.acronym %}">
60+
Edit Materials
61+
</a>
62+
{% endif %}
63+
</td>
64+
</tr>
65+
{% endfor %}

ietf/templates/group/meetings.html

Lines changed: 67 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,88 @@
1+
{# bs5ok #}
12
{% extends "group/group_base.html" %}
23
{# Copyright The IETF Trust 2015, All Rights Reserved #}
34
{% load origin %}
4-
5-
{% block title %}Meetings{% if group %} for {{group.acronym}}{% endif %}{% endblock %}
6-
5+
{% block title %}
6+
Meetings
7+
{% if group %}for {{ group.acronym }}{% endif %}
8+
{% endblock %}
79
{% block buttonlist %}
810
{{ block.super }}
9-
<br>
10-
<a class="btn btn-primary" href="{% url 'ietf.meeting.views.meeting_requests' %}">Session requests</a>
11+
<a class="btn btn-primary"
12+
href="{% url 'ietf.meeting.views.meeting_requests' %}">Session requests</a>
1113
{% if can_edit or can_always_edit %}
1214
<a class="btn btn-primary" href="{% url 'ietf.secr.sreq.views.main' %}">Request a session</a>
13-
<a class="btn btn-primary" href="{% url 'ietf.meeting.views.interim_request' %}?group={{group.id}}">Request an interim meeting</a>
15+
<a class="btn btn-primary"
16+
href="{% url 'ietf.meeting.views.interim_request' %}?group={{ group.id }}">
17+
Request an interim meeting
18+
</a>
1419
{% endif %}
1520
{% endblock buttonlist %}
16-
1721
{% block group_content %}
1822
{% origin %}
19-
2023
{% if in_progress %}
21-
<div class="card" id="inprogressmeets">
22-
<div class="card-header">
23-
Meetings in progress
24-
</div>
25-
<div class="card-body">
26-
{% with sessions=in_progress show_request=True show_ical=True can_edit_materials=can_edit %}
24+
<h2 class="mt-3" id="inprogressmeets">Meetings in progress</h2>
25+
{% with sessions=in_progress show_request=True show_ical=True can_edit_materials=can_edit %}
26+
<table class="table table-sm table-striped tablesorter">
27+
<thead>
28+
<tr>
29+
<th data-sort="meeting">Meeting</th>
30+
<th data-sort="date">Date</th>
31+
<th></th>
32+
<th>Materials</th>
33+
</tr>
34+
</thead>
35+
<tbody>
2736
{% include "group/meetings-row.html" %}
28-
{% endwith %}
29-
</div>
30-
</div>
37+
</tbody>
38+
</table>
39+
{% endwith %}
3140
{% endif %}
32-
3341
{% if future %}
34-
<div class="card" id="futuremeets">
35-
<div class="card-header">
36-
Future Meetings
37-
<a class="regular float-end" title="icalendar entry for all scheduled future {{group.acronym}} meetings" href="{% url 'ietf.meeting.views.upcoming_ical' %}?show={{group.acronym}}"><span class="bi bi-calendar"></span></a>
38-
</div>
39-
<div class="card-body">
42+
<h2 class="mt-3" id="futuremeets">
43+
Future Meetings
44+
<a title="icalendar entry for all scheduled future {{ group.acronym }} meetings"
45+
href="{% url 'ietf.meeting.views.upcoming_ical' %}?show={{ group.acronym }}">
46+
<span class="bi bi-calendar"></span>
47+
</a>
48+
<table class="table table-sm table-striped tablesorter">
49+
<thead>
50+
<tr>
51+
<th data-sort="meeting">Meeting</th>
52+
<th data-sort="date">Date</th>
53+
<th></th>
54+
<th>Materials</th>
55+
</tr>
56+
</thead>
4057
{% with sessions=future show_request=True show_ical=True can_edit_materials=can_edit %}
41-
{% include "group/meetings-row.html" %}
58+
<tbody>
59+
{% include "group/meetings-row.html" %}
60+
</tbody>
4261
{% endwith %}
43-
</div>
44-
</div>
45-
{% endif %}
46-
47-
{% if past or recent %}
48-
<div class="card" id="pastmeets">
49-
<div class="card-header">
50-
Past Meetings
51-
</div>
52-
<div class="card-body">
53-
{% if can_edit %}
62+
</table>
63+
{% endif %}
64+
{% if past or recent %}
65+
<h2 class="mt-3" id="pastmeets">Past Meetings</h2>
66+
<table class="table table-sm table-striped tablesorter">
67+
<thead>
68+
<tr>
69+
<th data-sort="meeting">Meeting</th>
70+
<th data-sort="date">Date</th>
71+
<th></th>
72+
<th>Materials</th>
73+
</tr>
74+
</thead>
75+
<tbody>
5476
{% with sessions=recent can_edit_materials=can_edit %}
5577
{% include "group/meetings-row.html" %}
5678
{% endwith %}
79+
{% with sessions=past can_edit_materials=False %}
80+
{% include "group/meetings-row.html" %}
81+
{% endwith %}
82+
<tbody>
83+
</table>
5784
{% endif %}
58-
{% with sessions=past can_edit_materials=False %}
59-
{% include "group/meetings-row.html" %}
60-
{% endwith %}
61-
</div>
62-
</div>
63-
{% endif %}
64-
65-
<p>This page shows meetings within the last four years. For earlier meetings, please see the proceedings.</p>
66-
67-
{% endblock %}
85+
<p>
86+
This page shows meetings within the last four years. For earlier meetings, please see the proceedings.
87+
</p>
88+
{% endblock %}

0 commit comments

Comments
 (0)