fix: Remove IESG-related about tabs from non-IETF-stream docs (#5515)

* fix: Remove IESG-related about tabs from non-IETF-stream docs

Fixes #5514

* Fix code review comments

* Address review comments

* Address code review comments
This commit is contained in:
Lars Eggert 2023-06-22 18:35:59 +03:00 committed by GitHub
parent 53b5e23612
commit f250a653a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,13 +114,46 @@ def render_document_top(request, doc, tab, name):
rsab_ballot,
None if rsab_ballot else "RSAB Evaluation Ballot has not been created yet"
))
if doc.type_id in ("draft","conflrev", "statchg"):
tabs.append(("IESG Evaluation Record", "ballot", urlreverse("ietf.doc.views_doc.document_ballot", kwargs=dict(name=name)), iesg_ballot, None if iesg_ballot else "IESG Evaluation Ballot has not been created yet"))
elif doc.type_id == "charter" and doc.group.type_id == "wg":
tabs.append(("IESG Review", "ballot", urlreverse("ietf.doc.views_doc.document_ballot", kwargs=dict(name=name)), iesg_ballot, None if iesg_ballot else "IESG Review Ballot has not been created yet"))
if doc.type_id == "draft" or (doc.type_id == "charter" and doc.group.type_id == "wg"):
tabs.append(("IESG Writeups", "writeup", urlreverse('ietf.doc.views_doc.document_writeup', kwargs=dict(name=name)), True, None))
if iesg_ballot or (doc.group and doc.group.type_id == "wg"):
if doc.type_id in ("draft", "conflrev", "statchg"):
tabs.append(
(
"IESG Evaluation Record",
"ballot",
urlreverse(
"ietf.doc.views_doc.document_ballot", kwargs=dict(name=name)
),
iesg_ballot,
None,
)
)
elif doc.type_id == "charter" and doc.group and doc.group.type_id == "wg":
tabs.append(
(
"IESG Review",
"ballot",
urlreverse(
"ietf.doc.views_doc.document_ballot", kwargs=dict(name=name)
),
iesg_ballot,
None,
)
)
if doc.type_id == "draft" or (
doc.type_id == "charter" and doc.group and doc.group.type_id == "wg"
):
tabs.append(
(
"IESG Writeups",
"writeup",
urlreverse(
"ietf.doc.views_doc.document_writeup", kwargs=dict(name=name)
),
True,
None,
)
)
tabs.append(("Email expansions","email",urlreverse('ietf.doc.views_doc.document_email', kwargs=dict(name=name)), True, None))
tabs.append(("History", "history", urlreverse('ietf.doc.views_doc.document_history', kwargs=dict(name=name)), True, None))