Skip to content

Commit

Permalink
Merge pull request #5795 from rjsparks/markdowncharters
Browse files Browse the repository at this point in the history
feat: render charters on about page using markdown
  • Loading branch information
rjsparks authored Jun 13, 2023
2 parents f3831de + c3da308 commit a3db61c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions ietf/group/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def fill_in_charter_info(group, include_drafts=False):
group.charter_text = get_charter_text(group)
else:
group.charter_text = "Not chartered yet."
group.charter_html = markdown.markdown(group.charter_text)

def extract_last_name(role):
return role.person.name_parts()[3]
Expand Down
3 changes: 1 addition & 2 deletions ietf/templates/group/group_about.html
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,7 @@ <h2 class="mt-3">
{% if group.state_id == "proposed" %}proposed{% endif %}
{{ group.type.desc.title }}
</h2>
{# the linebreaks filter adds <p>, no surrounding <p> necessary: #}
{{ group.charter_text|urlize_ietf_docs|linkify|linebreaks }}
{{ group.charter_html }}
{% else %}
<h2 class="mt-3">
{% if requested_close or group.state_id == "conclude" %}Final{% endif %}
Expand Down
6 changes: 3 additions & 3 deletions ietf/templates/group/group_about_rendertest.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
{% block js %}
<script>
$(document).ready(function() {
$('input[name=widthconstraint]').trigger("change", function() {
$('input[name=widthconstraint]').on("change", function() {
if ($(this).is(':checked')) {
$('.rightcontent').css('max-width','700px')
} else {
$('.rightcontent').css('max-width','')
}
});
$('input[name=widthconstraint').prop('checked', true);
$('.rightcontent').css('max-width','700px')
$('input[name=widthconstraint').prop('checked', false);
$('.rightcontent').css('max-width','')
});
</script>
{% endblock %}

0 comments on commit a3db61c

Please sign in to comment.