Skip to content

Commit

Permalink
Merge branch 'main' into helpurls
Browse files Browse the repository at this point in the history
  • Loading branch information
jimfenton committed Mar 16, 2024
2 parents 4c03e98 + 21f467f commit 9c7d81d
Show file tree
Hide file tree
Showing 7 changed files with 142 additions and 130 deletions.
12 changes: 11 additions & 1 deletion ietf/doc/tests_draft.py
Expand Up @@ -20,7 +20,7 @@
import debug # pyflakes:ignore

from ietf.doc.expire import get_expired_drafts, send_expire_notice_for_draft, expire_draft
from ietf.doc.factories import IndividualDraftFactory, WgDraftFactory, RgDraftFactory, DocEventFactory
from ietf.doc.factories import EditorialDraftFactory, IndividualDraftFactory, WgDraftFactory, RgDraftFactory, DocEventFactory
from ietf.doc.models import ( Document, DocReminder, DocEvent,
ConsensusDocEvent, LastCallDocEvent, RelatedDocument, State, TelechatDocEvent,
WriteupDocEvent, DocRelationshipName, IanaExpertDocEvent )
Expand Down Expand Up @@ -2161,3 +2161,13 @@ def test_shepherd_writeup_generation(self):
self.assertContains(r, "for Group Documents", status_code=200)
r = self.client.post(url,dict(reset_text=''))
self.assertContains(r, "for Group Documents", status_code=200)

class EditorialDraftMetadataTests(TestCase):
def test_editorial_metadata(self):
draft = EditorialDraftFactory()
url = urlreverse("ietf.doc.views_doc.document_main", kwargs=dict(name=draft.name))
r = self.client.get(url)
q = PyQuery(r.content)
top_level_metadata_headings = q("tbody>tr>th:first-child").text()
self.assertNotIn("IESG", top_level_metadata_headings)
self.assertNotIn("IANA", top_level_metadata_headings)
8 changes: 4 additions & 4 deletions ietf/meeting/tests_views.py
Expand Up @@ -8598,7 +8598,7 @@ def test_session_attendance(self):
self.assertEqual(r.status_code, 200)
self.assertContains(r, '3 attendees')
for person in persons:
self.assertContains(r, person.name)
self.assertContains(r, person.plain_name())

# Test for the "I was there" button.
def _test_button(person, expected):
Expand All @@ -8618,14 +8618,14 @@ def _test_button(person, expected):
# attempt to POST anyway is ignored
r = self.client.post(attendance_url)
self.assertEqual(r.status_code, 200)
self.assertNotContains(r, persons[3].name)
self.assertNotContains(r, persons[3].plain_name())
self.assertEqual(session.attended_set.count(), 3)
# button is shown, and POST is accepted
meeting.importantdate_set.update(name_id='revsub',date=date_today() + datetime.timedelta(days=20))
_test_button(persons[3], True)
r = self.client.post(attendance_url)
self.assertEqual(r.status_code, 200)
self.assertContains(r, persons[3].name)
self.assertContains(r, persons[3].plain_name())
self.assertEqual(session.attended_set.count(), 4)

# When the meeting is finalized, a bluesheet file is generated,
Expand All @@ -8639,7 +8639,7 @@ def _test_button(person, expected):
text = doc.text()
self.assertIn('4 attendees', text)
for person in persons:
self.assertIn(person.name, text)
self.assertIn(person.plain_name(), text)
r = self.client.get(session_url)
self.assertContains(r, doc.get_href())
self.assertNotContains(r, attendance_url)
Expand Down
2 changes: 1 addition & 1 deletion ietf/secr/templates/includes/activities.html
@@ -1,4 +1,4 @@
<h2>Activies Log</h2>
<h2>Activities Log</h2>
<div class="inline-related last-related">
<table class="full-width">
<thead>
Expand Down
236 changes: 119 additions & 117 deletions ietf/templates/doc/document_draft.html
Expand Up @@ -267,7 +267,7 @@
</tr>
{% endif %}
</tbody>
{% if not doc.stream_id == 'iab' %}
{% if doc.stream_id != 'iab' and doc.stream_id != 'editorial' %}
<tbody class="meta border-top">
<tr>
<th scope="row">
Expand Down Expand Up @@ -447,125 +447,127 @@
</tr>
</tbody>
{% endif %}
{% if can_edit_iana_state or iana_review_state or iana_experts_state or iana_experts_comment %}
<tbody class="meta border-top">
{% if iana_review_state or can_edit_iana_state %}
<tr>
<th scope="row">
IANA
</th>
<th scope="row">
<a href="{% url "ietf.doc.views_help.state_help" type="draft-iana-review" %}">
IANA review state
</a>
</th>
<td class="edit">
{% if can_edit_iana_state and not snapshot %}
<a class="btn btn-primary btn-sm"
href="{% url 'ietf.doc.views_draft.change_iana_state' name=doc.name state_type="iana-review" %}">
Edit
</a>
{% endif %}
</td>
<td class="{% if iana_review_state|slugify|slice:7 != "iana-ok" %}text-danger{% else %}text-success{% endif %}">
{% if not iana_review_state %}
<span class="text-body-secondary">
(None)
</span>
{% else %}
{{ iana_review_state }}
{% endif %}
</td>
</tr>
{% endif %}
{% if iana_action_state or can_edit_iana_state %}
<tr>
<th scope="row">
{% if not can_edit_iana_state and not iana_review_state %}IANA{% endif %}
</th>
<th scope="row">
<a href="{% url "ietf.doc.views_help.state_help" type="draft-iana-action" %}">
IANA action state
</a>
</th>
<td class="edit">
{% if can_edit_iana_state and not snapshot %}
<a class="btn btn-primary btn-sm"
href="{% url 'ietf.doc.views_draft.change_iana_state' name=doc.name state_type="iana-action" %}">
Edit
{% if doc.stream_id != 'editorial' %}
{% if can_edit_iana_state or iana_review_state or iana_experts_state or iana_experts_comment %}
<tbody class="meta border-top">
{% if iana_review_state or can_edit_iana_state %}
<tr>
<th scope="row">
IANA
</th>
<th scope="row">
<a href="{% url "ietf.doc.views_help.state_help" type="draft-iana-review" %}">
IANA review state
</a>
{% endif %}
</td>
<td>
{% if not iana_action_state %}
<span class="text-body-secondary">
(None)
</span>
{% else %}
{{ iana_action_state }}
{% endif %}
</td>
</tr>
{% endif %}
{% if iana_experts_state or can_edit_iana_state %}
<tr>
<th scope="row">
{% if not can_edit_iana_state and not iana_review_state and not iana_action_state %}IANA{% endif %}
</th>
<th scope="row">
<a href="{% url "ietf.doc.views_help.state_help" type="draft-iana-experts" %}">
IANA expert review state
</a>
</th>
<td class="edit">
{% if can_edit_iana_state and not snapshot %}
<a class="btn btn-primary btn-sm"
href="{% url 'ietf.doc.views_draft.change_iana_state' name=doc.name state_type="iana-experts" %}">
Edit
</th>
<td class="edit">
{% if can_edit_iana_state and not snapshot %}
<a class="btn btn-primary btn-sm"
href="{% url 'ietf.doc.views_draft.change_iana_state' name=doc.name state_type="iana-review" %}">
Edit
</a>
{% endif %}
</td>
<td class="{% if iana_review_state|slugify|slice:7 != "iana-ok" %}text-danger{% else %}text-success{% endif %}">
{% if not iana_review_state %}
<span class="text-body-secondary">
(None)
</span>
{% else %}
{{ iana_review_state }}
{% endif %}
</td>
</tr>
{% endif %}
{% if iana_action_state or can_edit_iana_state %}
<tr>
<th scope="row">
{% if not can_edit_iana_state and not iana_review_state %}IANA{% endif %}
</th>
<th scope="row">
<a href="{% url "ietf.doc.views_help.state_help" type="draft-iana-action" %}">
IANA action state
</a>
{% endif %}
</td>
<td class="{% if iana_experts_state|slugify|slice:"-2:" != "ok" %}text-danger{% else %}text-success{% endif %}">
{% if not iana_experts_state %}
<span class="text-body-secondary">
(None)
</span>
{% else %}
{{ iana_experts_state }}
{% endif %}
</td>
</tr>
{% endif %}
{% if iana_experts_comment or can_edit_iana_state %}
<tr>
<th scope="row">
{% if not can_edit_iana_state and not iana_review_state and not iana_action_state and not iana_experts_state %}
IANA
{% endif %}
</th>
<th scope="row">
IANA expert review comments
</th>
<td class="edit">
{% if can_edit_iana_state and not snapshot %}
<a class="btn btn-primary btn-sm"
href="{% url 'ietf.doc.views_draft.add_iana_experts_comment' name=doc.name %}">
Edit
</th>
<td class="edit">
{% if can_edit_iana_state and not snapshot %}
<a class="btn btn-primary btn-sm"
href="{% url 'ietf.doc.views_draft.change_iana_state' name=doc.name state_type="iana-action" %}">
Edit
</a>
{% endif %}
</td>
<td>
{% if not iana_action_state %}
<span class="text-body-secondary">
(None)
</span>
{% else %}
{{ iana_action_state }}
{% endif %}
</td>
</tr>
{% endif %}
{% if iana_experts_state or can_edit_iana_state %}
<tr>
<th scope="row">
{% if not can_edit_iana_state and not iana_review_state and not iana_action_state %}IANA{% endif %}
</th>
<th scope="row">
<a href="{% url "ietf.doc.views_help.state_help" type="draft-iana-experts" %}">
IANA expert review state
</a>
{% endif %}
</td>
<td>
{% if not iana_experts_comment %}
<span class="text-body-secondary">
(None)
</span>
{% else %}
{{ iana_experts_comment }}
{% endif %}
</td>
</tr>
{% endif %}
</tbody>
</th>
<td class="edit">
{% if can_edit_iana_state and not snapshot %}
<a class="btn btn-primary btn-sm"
href="{% url 'ietf.doc.views_draft.change_iana_state' name=doc.name state_type="iana-experts" %}">
Edit
</a>
{% endif %}
</td>
<td class="{% if iana_experts_state|slugify|slice:"-2:" != "ok" %}text-danger{% else %}text-success{% endif %}">
{% if not iana_experts_state %}
<span class="text-body-secondary">
(None)
</span>
{% else %}
{{ iana_experts_state }}
{% endif %}
</td>
</tr>
{% endif %}
{% if iana_experts_comment or can_edit_iana_state %}
<tr>
<th scope="row">
{% if not can_edit_iana_state and not iana_review_state and not iana_action_state and not iana_experts_state %}
IANA
{% endif %}
</th>
<th scope="row">
IANA expert review comments
</th>
<td class="edit">
{% if can_edit_iana_state and not snapshot %}
<a class="btn btn-primary btn-sm"
href="{% url 'ietf.doc.views_draft.add_iana_experts_comment' name=doc.name %}">
Edit
</a>
{% endif %}
</td>
<td>
{% if not iana_experts_comment %}
<span class="text-body-secondary">
(None)
</span>
{% else %}
{{ iana_experts_comment }}
{% endif %}
</td>
</tr>
{% endif %}
</tbody>
{% endif %}
{% endif %}
{% if rfc_editor_state %}
<tbody class="meta border-top">
Expand Down
6 changes: 3 additions & 3 deletions ietf/templates/nomcom/feedback.html
Expand Up @@ -81,7 +81,7 @@ <h2 class="navskip mt-4">
<small class="text-body-secondary">{{ form.nominee.email.person.name }} for {{ form.position.name }}</small>
</h2>
<p class="mt-3">
Provide feedback about {% person_link form.nominee.person %}
Provide feedback about {% person_link form.nominee.person with_email=False %}
for the <b>{{ form.position.name }}</b> position.
</p>
{% elif form.topic %}
Expand All @@ -97,8 +97,8 @@ <h2 >
{% endif %}
<p>
This feedback will only be available to
<a href="{% url 'ietf.nomcom.views.year_index' year=year %}">NomCom {{ year }}</a>.
You may have the feedback mailed back to you by selecting the option below.
<a href="{% url 'ietf.nomcom.views.year_index' year=year %}">the current NomCom</a>.
You can have the feedback mailed back to you by selecting the option below.
</p>
<form class="float-start" id="feedbackform" method="post">
{% csrf_token %}
Expand Down
6 changes: 3 additions & 3 deletions ietf/templates/person/person_link.html
@@ -1,8 +1,8 @@
{% if email and email == "system@datatracker.ietf.org" or name and name == "(System)" %}<span class="text-body-secondary">(System)</span>{% else %}<span {% if class %}class="{{ class }}"
{% endif %}>{% if email or name %}<a {% if class %}class="text-reset"{% endif %}
title="{% if title %}{{ title }}{% else %}Datatracker profile of {{ name }}.{% endif %}"
title="{% if title %}{{ title }}{% else %}Datatracker profile of {{ name }}{% endif %}"
{% if email %} href="{% url 'ietf.person.views.profile' email_or_name=email %}" {% else %} href="{% url 'ietf.person.views.profile' email_or_name=name %}" {% endif %}>{{ name }}</a>{% if email and with_email %} <a {% if class %}class="text-reset"{% endif %}
href="mailto:{{ email|urlencode }}"
aria-label="Compose email to {{ email }}."
title="Compose email to {{ email }}.">
aria-label="Compose email to {{ email }}"
title="Compose email to {{ email }}">
<i class="bi bi-envelope"></i></a>{% endif %}{% else %}<span class="text-body-secondary">(None)</span>{% endif %}</span>{% endif %}

0 comments on commit 9c7d81d

Please sign in to comment.