Skip to content

Commit cb1e72a

Browse files
committed
Fix problem with related documents on the /rg/ pages
- Legacy-Id: 7540
1 parent ad357e0 commit cb1e72a

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

ietf/templates/doc/search/search_results.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
<div class="search-results">
3737

3838
{% if not docs %}
39-
<h2>No documents match your query.</h2>
39+
{% if not skip_no_matches_warning %}
40+
<h2>No documents match your query.</h2>
41+
{% endif %}
4042
{% else %}
4143

4244
{% if meta.max %}

ietf/templates/wginfo/group_documents.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
{% include "doc/search/search_results.html" %}
99

10-
{% include "doc/search/search_results.html" with docs=docs_related meta=meta_related %}
10+
{% include "doc/search/search_results.html" with docs=docs_related meta=meta_related skip_no_matches_warning=True %}
1111

1212
</div>
1313
{% endblock group_content %}

ietf/wginfo/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ def search_for_group_documents(group):
230230
docs_related = []
231231
for d in raw_docs_related:
232232
parts = d.name.split("-", 2);
233-
# canonical form draft-<name|ietf>-wg-etc
234-
if len(parts) >= 3 and parts[1] != "ietf" and parts[2].startswith(group.acronym + "-"):
233+
# canonical form draft-<name|ietf|irtf>-wg-etc
234+
if len(parts) >= 3 and parts[1] not in ("ietf", "irtf") and parts[2].startswith(group.acronym + "-"):
235235
d.search_heading = "Related Internet-Draft"
236236
docs_related.append(d)
237237

0 commit comments

Comments
 (0)