Skip to content

Commit 6b7beb1

Browse files
committed
panel -> card
- Legacy-Id: 19618
1 parent e632cc7 commit 6b7beb1

42 files changed

Lines changed: 215 additions & 236 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ietf/dbtemplate/templates/dbtemplate/template_show.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ <h2>Meta information</h2>
3333

3434
<h2>Template content</h2>
3535

36-
<div class = "panel panel-default">
36+
<div class = "card">
3737
<p class='pasted'>{{ template.content }}</p>
3838
</div>
3939

40-
{% endblock content %}
40+
{% endblock content %}

ietf/doc/templatetags/ietf_filters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,14 +497,14 @@ def pos_to_label(text):
497497
"""Return a valid Bootstrap label type for a ballot position."""
498498
return {
499499
'Yes': 'success',
500-
'No Objection': 'pass',
500+
'No Objection': 'info',
501501
'Abstain': 'warning',
502502
'Discuss': 'danger',
503503
'Block': 'danger',
504504
'Recuse': 'primary',
505505
'Not Ready': 'danger',
506506
'Need More Time': 'danger',
507-
}.get(str(text), 'blank')
507+
}.get(str(text), 'secondary')
508508

509509
@register.filter
510510
def capfirst_allcaps(text):

ietf/doc/tests.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2429,7 +2429,7 @@ def test_markdown_and_text(self):
24292429
r = self.client.get(url)
24302430
self.assertEqual(r.status_code,200)
24312431
q = PyQuery(r.content)
2432-
self.assertEqual(q('#materials-content .panel-body a').attr['href'],'https://unusual.example')
2432+
self.assertEqual(q('#materials-content .card-body a').attr['href'],'https://unusual.example')
24332433

24342434
class Idnits2SupportTests(TestCase):
24352435
settings_temp_path_overrides = TestCase.settings_temp_path_overrides + ['DERIVED_DIR']
@@ -2601,6 +2601,4 @@ def test_rfc_with_tombstone(self):
26012601

26022602
# Some old rfcs had tombstones that shouldn't be used for comparisons
26032603
received = self.getJson(dict(name=rfc.canonical_name()))
2604-
self.assertTrue(received['previous'].endswith('00'))
2605-
2606-
2604+
self.assertTrue(received['previous'].endswith('00'))

ietf/meeting/tests_views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5097,12 +5097,12 @@ def _assert_button_ok(btn, expected_label=None, expected_filter_item=None,
50975097
# Test with/without custom button text
50985098
context = Context({'customize_button_text': None, 'filter_categories': []})
50995099
q = PyQuery(template.render(context))
5100-
self.assertIn('Customize...', q('h4.panel-title').text())
5100+
self.assertIn('Customize...', q('h4.card-title').text())
51015101
self.assertEqual(q('table'), []) # no filter_categories, so no button table
51025102

51035103
context['customize_button_text'] = 'My custom text...'
51045104
q = PyQuery(template.render(context))
5105-
self.assertIn(context['customize_button_text'], q('h4.panel-title').text())
5105+
self.assertIn(context['customize_button_text'], q('h4.card-title').text())
51065106
self.assertEqual(q('table'), []) # no filter_categories, so no button table
51075107

51085108
# Now add a non-trivial set of filters
@@ -5176,7 +5176,7 @@ def _assert_button_ok(btn, expected_label=None, expected_filter_item=None,
51765176
]
51775177

51785178
q = PyQuery(template.render(context))
5179-
self.assertIn(context['customize_button_text'], q('h4.panel-title').text())
5179+
self.assertIn(context['customize_button_text'], q('h4.card-title').text())
51805180
self.assertNotEqual(q('table'), []) # should now have table
51815181

51825182
# Check that buttons are present for the expected things

ietf/static/css/ietf.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $enable-negative-margins: true;
3030
@import "~/node_modules/bootstrap/scss/button-group";
3131
@import "~/node_modules/bootstrap/scss/nav";
3232
@import "~/node_modules/bootstrap/scss/navbar";
33-
// @import "~/node_modules/bootstrap/scss/card";
33+
@import "~/node_modules/bootstrap/scss/card";
3434
@import "~/node_modules/bootstrap/scss/accordion";
3535
// @import "~/node_modules/bootstrap/scss/breadcrumb";
3636
// @import "~/node_modules/bootstrap/scss/pagination";

ietf/static/ietf/js/edit-meeting-timeslots-and-misc-sessions.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jQuery(document).ready(function () {
3939
content.find(".selected").removeClass("selected");
4040

4141
schedulingPanel.hide();
42-
schedulingPanel.find(".panel-content").children().remove();
42+
schedulingPanel.find(".card-content").children().remove();
4343
// if we came from a failed POST, that's no longer relevant so overwrite history
4444
history.replaceState(null, document.title, window.location.pathname + window.location.search);
4545
}
@@ -67,7 +67,7 @@ jQuery(document).ready(function () {
6767

6868
jQuery(this).find(".timeline").addClass("selected");
6969

70-
schedulingPanel.find(".panel-content").append(content.find(".add-timeslot-template").html());
70+
schedulingPanel.find(".card-content").append(content.find(".add-timeslot-template").html());
7171
schedulingPanel.find("[name=day]").val(this.dataset.day);
7272
schedulingPanel.find("[name=location]").val(this.dataset.room);
7373
schedulingPanel.find("[name=type]").trigger("change");
@@ -100,7 +100,7 @@ jQuery(document).ready(function () {
100100
cancelCurrentActivity();
101101
element.addClass("selected");
102102

103-
schedulingPanel.find(".panel-content").append(response.form);
103+
schedulingPanel.find(".card-content").append(response.form);
104104
schedulingPanel.find(".timeslot-form [name=type]").trigger("change");
105105
schedulingPanel.find(".timeslot-form").show();
106106
schedulingPanel.show();
@@ -153,4 +153,4 @@ jQuery(document).ready(function () {
153153
});
154154

155155
schedulingPanel.find('.timeslot-form [name=type]').trigger("change");
156-
});
156+
});

ietf/templates/doc/bofreq/bof_requests.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ <h1>BOF Requests</h1>
2020
{% else %}
2121
{% regroup reqs by get_state_slug as grouped_reqs %}
2222
{% for req_group in grouped_reqs %}
23-
<div class="panel panel-default">
24-
<div class="panel-heading">{{req_group.grouper|capfirst}} BOF Requests</div>
25-
<div class="panel-body">
23+
<div class="panel ">
24+
<div class="card-header">{{req_group.grouper|capfirst}} BOF Requests</div>
25+
<div class="card-body">
2626
<table id="bofreqs-{{req_group.grouper}}" class="table table-sm table-striped tablesorter">
2727
<thead>
2828
<tr><th class="col-sm-4">Name</th><th class="col-sm-1">Date</th><th>Title</th><th>Responsible</th><th>Editors</th></tr>

ietf/templates/doc/document_ballot_content.html

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ <h4 class="anchor-target" id="{{ doc.name|slugify }}_{{ p.balloter.plain_name|sl
8383
</span>
8484
</h4>
8585
{% if p.pos.blocking and p.discuss %}
86-
<div class="panel panel-danger">
87-
<div class="panel-heading">
88-
<h5 class="panel-title"><b>{{ p.pos.name }}</b> ({{ p.discuss_time|date:"Y-m-d" }}{% if not p.for_current_revision %} for -{{ p.get_dochistory.rev }}{% endif %})
86+
<div class="card border-danger">
87+
<div class="card-header bg-danger">
88+
<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 %})
8989
{% if p.send_email %}
9090
<span class="bi bi-envelope float-end" title="Email requested to be sent for this discuss"></span>
9191
{% elif p.any_email_sent == True %}
@@ -95,28 +95,28 @@ <h5 class="panel-title"><b>{{ p.pos.name }}</b> ({{ p.discuss_time|date:"Y-m-d"
9595
{% else %}
9696
<span class="bi bi-chat-o float-end" title="No email send requests for this discuss"></span>
9797
{% endif %}
98-
</h5>
98+
</div>
9999
</div>
100-
<div class="panel-body"><pre class="ballot pasted">{{ p.discuss|linkify }}</pre></div>
100+
<div class="card-body"><pre class="ballot pasted">{{ p.discuss|linkify }}</pre></div>
101101
</div>
102102
{% endif %}
103103

104104
{% if p.comment %}
105-
<div class="panel panel-{{ p.pos|pos_to_label }}">
106-
<div class="panel-heading">
107-
<h5 class="panel-title"><b>Comment</b> ({{ p.comment_time|date:"Y-m-d" }}{% if not p.for_current_revision %} for -{{ p.get_dochistory.rev }}{% endif %})
105+
<div class="card border-{{ p.pos|pos_to_label }}">
106+
<div class="card-header bg-{{ p.pos|pos_to_label }}">
107+
<div><b>Comment</b> ({{ p.comment_time|date:"Y-m-d" }}{% if not p.for_current_revision %} for -{{ p.get_dochistory.rev }}{% endif %})
108108
{% if p.send_email %}
109109
<span class="bi bi-envelope float-end" title="Email requested to be sent for this comment"></span>
110110
{% elif p.any_email_sent == True %}
111111
<span class="bi bi-envelope float-end" title="Email requested to be sent for earlier comment"></span>
112112
{% elif p.any_email_sent == False %}
113113
<span class="bi bi-chat-o float-end" title="No email send requests for this comment"></span>
114114
{% else %}
115-
<div class="float-end small italic" style="margin-top: -0.3em;" title="No ballot position send log available">No email<br/>send info</div>
115+
<div class="float-end small italic" title="No ballot position send log available">No email<br/>send info</div>
116116
{% endif %}
117-
</h5>
117+
</div>
118118
</div>
119-
<div class="panel-body"><pre class="ballot pasted">{{ p.comment|linkify }}</pre></div>
119+
<div class="card-body"><pre class="ballot pasted">{{ p.comment|linkify }}</pre></div>
120120
</div>
121121
{% endif %}
122122
{% endif %}
@@ -136,9 +136,9 @@ <h4 class="anchor-target" id="{{ doc.name|slugify }}_{{ p.balloter.plain_name|sl
136136
{% endif %}
137137
</span>
138138
</h4>
139-
<div class="panel panel-{{ p.pos|pos_to_label }}">
140-
<div class="panel-heading">
141-
<h5 class="panel-title"><b>{{ p.pos.name }} </b>
139+
<div class="card border-{{ p.pos|pos_to_label }}">
140+
<div class="card-header bg-{{ p.pos|pos_to_label }}">
141+
<div><b>{{ p.pos.name }} </b>
142142
{% if p.pos.blocking and p.discuss %}
143143
<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 %})
144144
{% else %}
@@ -151,18 +151,18 @@ <h5 class="panel-title"><b>{{ p.pos.name }} </b>
151151
{% elif p.any_email_sent == False %}
152152
<span class="bi bi-chat-o float-end" title="No email send requests for this ballot position"></span>
153153
{% else %}
154-
<div class="float-end small italic" style="margin-top: -0.3em;" title="No ballot position send log available">No email<br/>send info</div>
154+
<div class="float-end small italic" title="No ballot position send log available">No email<br/>send info</div>
155155
{% endif %}
156-
</h5>
156+
</div>
157157
</div>
158158
{% if p.pos.blocking and p.discuss %}
159-
<div class="panel-body"><pre class="ballot pasted">{{ p.discuss|linkify }}</pre></div>
159+
<div class="card-body"><pre class="ballot pasted">{{ p.discuss|linkify }}</pre></div>
160160
{% else %}
161-
<div class="panel-body"><pre class="ballot pasted">{{ p.comment|linkify }}</pre></div>
161+
<div class="card-body"><pre class="ballot pasted">{{ p.comment|linkify }}</pre></div>
162162
{% endif %}
163163
</div>
164164
{% endif %}
165165
{% endfor %}
166166
{% endfor %}
167167
</div>
168-
</div>
168+
</div>

ietf/templates/doc/document_bofreq.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@
164164
{% endif %}
165165
{% endif %}
166166

167-
<div class="panel panel-default">
168-
<div class="panel-heading">{{doc.name}}-{{doc.rev}}</div>
169-
<div class="panel-body">
167+
<div class="panel ">
168+
<div class="card-header">{{doc.name}}-{{doc.rev}}</div>
169+
<div class="card-body">
170170
{{ content|sanitize|safe }}
171171
</div>
172172
</div>

ietf/templates/doc/document_draft.html

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -725,39 +725,38 @@
725725

726726
{% else %}
727727
<p></p>
728-
<div class="panel panel-warning">
729-
<div class="panel-heading">
728+
<div class="card border-warning">
729+
<div class="card-header bg-warning">
730730
This Internet-Draft is no longer active. A copy of
731731
the expired Internet-Draft can be found at<br/>
732732
<a href="{{doc.get_href}}">{{doc.get_href}}</a>
733733
</div>
734-
<div class="panel-body">
735-
<p>
736-
737-
<h4>Abstract</h4>
738-
<p>{{ doc.abstract }}</p>
739-
740-
<h4>Authors</h4>
741-
<p>
742-
{% for author in doc.documentauthor_set.all %}
743-
{% if author.email %}
744-
<span class="bi bi-envelope"></span>
745-
<a href="mailto:{{ author.email.address }}">
746-
{% endif %}
747-
{{ author.person }}
748-
{% if author.email %}
749-
({{ author.email.address }})</a>
750-
{% endif %}
751-
{% if not forloop.last %}<br>{% endif %}
752-
{% endfor %}
753-
</p>
754-
<p>(Note: The e-mail addresses provided for the authors of this Internet-Draft may no longer be valid.)</p>
755-
</div>
734+
<div class="card-body">
735+
736+
<h5 class="card-title">Abstract</h5>
737+
<p class="card-text">{{ doc.abstract }}</p>
738+
739+
<h5 class="card-title">Authors</h5>
740+
<p class="card-text">
741+
{% for author in doc.documentauthor_set.all %}
742+
{% if author.email %}
743+
<span class="bi bi-envelope"></span>
744+
<a href="mailto:{{ author.email.address }}">
745+
{% endif %}
746+
{{ author.person }}
747+
{% if author.email %}
748+
({{ author.email.address }})</a>
749+
{% endif %}
750+
{% if not forloop.last %}<br>{% endif %}
751+
{% endfor %}
752+
</p>
753+
<p class="card-text">(Note: The e-mail addresses provided for the authors of this Internet-Draft may no longer be valid.)</p>
756754
</div>
755+
</div>
757756
{% endif %}
758757
{% endblock %}
759758

760759
{% block js %}
761760
<script src="{% static 'ietf/js/d3.js' %}"></script>
762761
<script src="{% static 'ietf/js/document_timeline.js' %}"></script>
763-
{% endblock %}
762+
{% endblock %}

0 commit comments

Comments
 (0)