Skip to content

Commit 90a414f

Browse files
committed
IPR search form. Search results not implemented yet.
- Legacy-Id: 383
1 parent c5f65ea commit 90a414f

4 files changed

Lines changed: 125 additions & 0 deletions

File tree

ietf/ipr/testurl.list

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
200 /ipr/new-generic/ https://datatracker.ietf.org/public/ipr_generic.cgi
77
200 /ipr/new-specific/ https://datatracker.ietf.org/public/ipr_notify.cgi
88
200 /ipr/update/ https://datatracker.ietf.org/public/ipr_update_list.cgi
9+
200 /ipr/search/ https://datatracker.ietf.org/public/ipr_search.cgi
910
# /ipr/update

ietf/ipr/urls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
(r'^update/$', views.updatelist),
99
(r'^update/(?P<ipr_id>\d+)/$', views.update),
1010
(r'^new-(?P<type>(specific|generic|third-party))/$', views.new),
11+
(r'^search/$', views.search),
12+
(r'^search/\?((option=(?P<option>[^&]*)|.*search=(?P<search>[^&]*)|submit=(?P<submit>[^&]*))&?)+/$', views.search),
1113
)
1214

1315
queryset = models.IprDetail.objects.all()

ietf/ipr/views.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from django.utils.html import escape
55
from ietf.ipr.view_sections import section_table
66
from ietf.ipr.view_new import new
7+
from ietf.idtracker.models import IETFWG
78

89
def linebreaks(value):
910
if value:
@@ -75,6 +76,11 @@ def update(request, ipr_id=None):
7576
return show(request, ipr_id)
7677

7778

79+
def search(request, option="", search="", submit=""):
80+
wgs = IETFWG.objects.filter(group_type__group_type_id=1).exclude(group_acronym__acronym='2000').select_related().order_by('acronym.acronym')
81+
return render("ipr/search.html", {"wgs": wgs})
82+
83+
7884

7985
# ---- Helper functions ------------------------------------------------------
8086

ietf/templates/ipr/search.html

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<html>
2+
<head><title>IPR Search Engine </title></head>
3+
<body>
4+
5+
<center><br><br>
6+
<font color="333366" size=4><b>Document Search</b></font>
7+
<hr width="600"><br>
8+
<table border="0" cellpadding="4" cellspacing="0" style="{padding:2px;border-width:1px;border-style:solid;border-color:305076}" width="580">
9+
<form method="get">
10+
<input type="hidden" name="option" value="document_search">
11+
<tr>
12+
13+
<td bgcolor="E2DFD3"><font color="000000" face="Arial" Size=3> Enter I-D Filename ( draft-...)</td>
14+
<td bgcolor="E2DFD3"><input type="text" name="document_search" size="40"></td>
15+
<td bgcolor="E2DFD3"><input type="submit" value="SEARCH" width="15"></td></tr>
16+
</form>
17+
<script language="javascript"><!--
18+
function IsNumeric(strString) {
19+
var strValidChars = "0123456789.-";
20+
var strChar;
21+
var blnResult = true;
22+
23+
if (strString.length == 0) return false;
24+
25+
for (i = 0; i < strString.length && blnResult == true; i++)
26+
{
27+
strChar = strString.charAt(i);
28+
if (strValidChars.indexOf(strChar) == -1)
29+
{
30+
blnResult = false;
31+
}
32+
}
33+
return blnResult;
34+
}
35+
36+
function check_numeric(val) {
37+
if (IsNumeric(val)) {
38+
return true;
39+
} else {
40+
alert ("Please enter numerics only");
41+
return false;
42+
}
43+
return false;
44+
}
45+
// -->
46+
</script>
47+
<form name="form_rfc_search" method="get">
48+
<input type="hidden" name="option" value="rfc_search">
49+
<tr>
50+
51+
<td bgcolor="E2DFD3"><font color="000000" face="Arial" Size=3> or Enter RFC Number</td>
52+
<td bgcolor="E2DFD3"><input type="text" name="rfc_search" size="8"></td>
53+
<td bgcolor="E2DFD3"><input type="submit" value="SEARCH" width="15" onClick="return check_numeric(document.form_rfc_search.rfc_search.value);"></td></tr>
54+
</form>
55+
</table>
56+
<hr width="600"><br><br><br><br>
57+
<font size=4 color="333366"><b>Keyword Search</b></font>
58+
59+
<hr width="600"><br>
60+
<table border="0" cellpadding="4" cellspacing="0" style="{padding:2px;border-width:1px;border-style:solid;border-color:305076}" width="800">
61+
<form method="get">
62+
<input type="hidden" name="option" value="patent_search">
63+
<tr>
64+
<td bgcolor="DDDDDD"><font color="000000" face="Arial" Size=3> Name of patent owner/applicant</td>
65+
<td bgcolor="DDDDDD"><input type="text" name="patent_search" size="20"></td>
66+
<td bgcolor="DDDDDD"><input type="submit" value="SEARCH" width="15"></td></tr>
67+
68+
</form>
69+
<form method="get">
70+
<input type="hidden" name="option" value="patent_info_search">
71+
<tr>
72+
<td bgcolor="DDDDDD" width="350"><font color="000000" face="Arial" Size=3> Characters in patent information (Full/Partial)<br>
73+
<font size="-1" color="red">* The search string must contain at least three characters, including at least one digit, and include punctuation marks. For best results, please enter the entire string, or as much of it as possible.</font>
74+
</td>
75+
<td bgcolor="DDDDDD"><input type="text" name="patent_info_search" size="20"></td>
76+
77+
<td bgcolor="DDDDDD"><input type="submit" value="SEARCH" width="15"></td></tr>
78+
</form>
79+
<form method="get">
80+
<input type="hidden" name="option" value="wg_search">
81+
<tr>
82+
<td bgcolor="DDDDDD"><font color="000000" face="Arial" Size=3> Working group name</td>
83+
<td bgcolor="DDDDDD">
84+
<select name="wg_search">
85+
<option value="">--Select WG</option>
86+
{% for wg in wgs %}
87+
<option value="{{ wg.group_acronym.acronym }}">{{ wg.group_acronym.acronym }}</option>{% endfor %}
88+
</select>
89+
</td>
90+
91+
<td bgcolor="DDDDDD"><input type="submit" value="SEARCH" width="15"></td></tr>
92+
</form>
93+
<form method="get">
94+
<input type="hidden" name="option" value="title_search">
95+
<tr>
96+
<td bgcolor="DDDDDD"><font color="000000" face="Arial" Size=3> Words in document title</td>
97+
<td bgcolor="DDDDDD"><input type="text" name="title_search" size="50"></td>
98+
<td bgcolor="DDDDDD"><input type="submit" value="SEARCH" width="15"></td></tr>
99+
100+
</form>
101+
<form method="get">
102+
<input type="hidden" name="option" value="ipr_title_search">
103+
<tr>
104+
<td bgcolor="DDDDDD"><font color="000000" face="Arial" Size=3> Words in IPR disclosure title</td>
105+
<td bgcolor="DDDDDD"><input type="text" name="ipr_title_search" size="50"></td>
106+
<td bgcolor="DDDDDD"><input type="submit" value="SEARCH" width="15"></td></tr>
107+
</form>
108+
109+
</table>
110+
<hr width="600"><br><br>
111+
<center><a href="./ipr_disclosure.cgi"><img src="http://www.ietf.org/images/blue.gif" hspace="3" border="0">IPR Disclosure Page</a>
112+
</center><br>
113+
114+
</body></html>
115+
116+

0 commit comments

Comments
 (0)