Skip to content

Commit f51fa55

Browse files
committed
Tweaks to the empty IPR doc search result text
- Legacy-Id: 780
1 parent 9571a31 commit f51fa55

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

ietf/ipr/search.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,23 +89,26 @@ def search(request, type="", q="", id=""):
8989
start = InternetDraft.objects.filter(filename__contains=q)
9090
if id:
9191
start = InternetDraft.objects.filter(id_document_tag=id)
92+
doc = q
9293
if type == "rfc_search":
9394
if q:
9495
start = Rfc.objects.filter(rfc_number=q)
96+
doc = "RFC%04d" % int(q)
9597
if start.count() == 1:
9698
first = start[0]
99+
doc = str(start)
97100
# get all related drafts, then search for IPRs on all
98101

99102
docs = related_docs(first, [])
100103
#docs = get_doclist.get_doclist(first)
101104
iprs, docs = iprs_from_docs(docs)
102-
return render("ipr/search_doc_result.html", {"q": q, "first": first, "iprs": iprs, "docs": docs},
105+
return render("ipr/search_doc_result.html", {"q": q, "first": first, "docs": docs, "doc": doc },
103106
context_instance=RequestContext(request) )
104107
elif start.count():
105-
return render("ipr/search_doc_list.html", {"q": q, "docs": start },
108+
return render("ipr/search_doc_list.html", {"q": q, "docs": start, "doc": doc },
106109
context_instance=RequestContext(request) )
107110
else:
108-
return render("ipr/search_doc_result.html", {"q": q, "first": {}, "iprs": {}, "docs": {}},
111+
return render("ipr/search_doc_result.html", {"q": q, "first": {}, "iprs": {}, "docs": {}, "doc": doc },
109112
context_instance=RequestContext(request) )
110113

111114
# Search by legal name

ietf/templates/ipr/search_doc_result.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{% if not iprs %}
88
<tr>
99
<td></td>
10-
<td colspan="2"><b>{% block search_failed %}No IPR disclosures were found relating to <i>{{ q }}</i>{% endblock %}</b></td>
10+
<td colspan="2"><b>{% block search_failed %}No IPR disclosures were found related to <i>{{ doc }}</i> have been submitted{% endblock %}</b></td>
1111
</tr>
1212
{% else %}
1313
<tr><td colspan="3">Total number of IPR disclosures found: {{ iprs|length }} </td></tr>

0 commit comments

Comments
 (0)