Skip to content
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
1 change: 0 additions & 1 deletion ietf/doc/templatetags/ietf_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ def link_other_doc_match(match):
url = urlreverse("ietf.doc.views_doc.document_main", kwargs=dict(name=doc + rev))
return f'<a href="{url}">{match[1]}</a>'


@register.filter(name="urlize_ietf_docs", is_safe=True, needs_autoescape=True)
def urlize_ietf_docs(string, autoescape=None):
"""
Expand Down
29 changes: 29 additions & 0 deletions ietf/name/migrations/0011_adjust_important_dates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright The IETF Trust 2023, All Rights Reserved

from django.db import migrations

def markdown_names(apps, schema_editor):
ImportantDateName = apps.get_model("name", "ImportantDateName")
changes = [
('bofproposals', "Preliminary BOF proposals requested. To request a __BoF__ session use the [IETF BoF Request Tool](/doc/bof-requests)."),
('openreg', "IETF Online Registration Opens [Register Here](https://www.ietf.org/how/meetings/register/)."),
('opensched', "Working Group and BOF scheduling begins. To request a Working Group session, use the [IETF Meeting Session Request Tool](/secr/sreq/). If you are working on a BOF request, it is highly recommended to tell the IESG now by sending an [email to iesg@ietf.org](mailtp:iesg@ietf.org) to get advance help with the request."),
('cutoffwgreq', "Cut-off date for requests to schedule Working Group Meetings at UTC 23:59. To request a __Working Group__ session, use the [IETF Meeting Session Request Tool](/secr/sreq/)."),
('idcutoff', "Internet-Draft submission cut-off (for all Internet-Drafts, including -00) by UTC 23:59. Upload using the [I-D Submission Tool](/submit/)."),
('cutoffwgreq', "Cut-off date for requests to schedule Working Group Meetings at UTC 23:59. To request a __Working Group__ session, use the [IETF Meeting Session Request Tool](/secr/sreq/)."),
('bofprelimcutoff', "Cut-off date for BOF proposal requests. To request a __BoF__ session use the [IETF BoF Request Tool](/doc/bof-requests)."),
('cutoffbofreq', "Cut-off date for BOF proposal requests to Area Directors at UTC 23:59. To request a __BoF__ session use the [IETF BoF Request Tool](/doc/bof-requests)."),
]
for slug, newDescription in changes:
datename = ImportantDateName.objects.get(pk=slug) # If the slug does not exist, then Django will throw an exception :-)
datename.desc = newDescription
datename.save()

class Migration(migrations.Migration):
dependencies = [
("name", "0010_subseries"),
]

operations = [
migrations.RunPython(markdown_names),
]
27 changes: 2 additions & 25 deletions ietf/templates/meeting/important-dates.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{# Copyright The IETF Trust 2017, All Rights Reserved #}
{% load origin %}
{% load ietf_filters static textfilters ietf_filters %}
{% load ietf_filters static textfilters htmlfilters %}
{% block pagehead %}
<link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
{% endblock %}
Expand Down Expand Up @@ -45,30 +45,7 @@ <h2 class="mt-5">
{% endif %}
</td>
<td>
{{ d.name.desc|urlize_ietf_docs|linkify }}{% if d.name.desc|slice:"-1:" != "." %}.{% endif %}
{% if first and d.name.slug == 'openreg' or first and d.name.slug == 'earlybird' %}
<a href="https://www.ietf.org/how/meetings/register/">Register here</a>.
{% endif %}
{% if d.name.slug == 'opensched' %}
To request a Working Group session, use the
<a href="{% url 'ietf.secr.sreq.views.main' %}">IETF Meeting Session Request Tool</a>.
If you are working on a BOF request, it is highly recommended
to tell the IESG now by sending an email to
<a href="mailto:iesg@ietf.org">iesg@ietf.org</a>
to get advance help with the request.
{% endif %}
{% if d.name.slug == 'cutoffwgreq' %}
To request a Working Group session, use the
<a href="{% url 'ietf.secr.sreq.views.main' %}">IETF Meeting Session Request Tool</a>.
{% endif %}
{% if d.name.slug == 'cutoffbofreq' %}
To request a BOF, please see instructions on
<a href="https://www.ietf.org/how/bofs/bof-procedures/">Requesting a BOF</a>.
{% endif %}
{% if d.name.slug == 'idcutoff' %}
Upload using the
<a href="{% url 'ietf.submit.views.upload_submission' %}">I-D Submission Tool</a>.
{% endif %}
{{ d.name.desc|urlize_ietf_docs|markdown|linkify }}{% if d.name.desc|slice:"-1:" != "." %}.{% endif %}
{% if d.name.slug == 'draftwgagenda' or d.name.slug == 'revwgagenda' or d.name.slug == 'procsub' or d.name.slug == 'revslug' %}
Upload using the
<a href="{% url 'ietf.meeting.views.materials' num=meeting.number %}">Meeting Materials Management Tool</a>.
Expand Down
7 changes: 7 additions & 0 deletions ietf/utils/templatetags/htmlfilters.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from django.template.defaultfilters import stringfilter

from ietf.utils.html import remove_tags
from ietf.utils.markdown import markdown as utils_markdown

register = Library()

Expand All @@ -16,3 +17,9 @@
def removetags(value, tags):
"""Removes a comma-separated list of [X]HTML tags from the output."""
return remove_tags(value, re.split(r"\s*,\s*", tags))

@register.filter(name="markdown", is_safe=True)
def markdown(string):
# One issue is that the string is enclosed in <p></p>... Let's remove the leading/trailing ones...
return utils_markdown(string)[3:-4]