summaryrefslogtreecommitdiff
path: root/results.gtpl
diff options
context:
space:
mode:
authornavanchauhan <navanchauhan@gmail.com>2022-10-04 02:13:05 -0600
committernavanchauhan <navanchauhan@gmail.com>2022-10-04 02:13:05 -0600
commit0e2444e6afd9df38b740bd6fdcaff0f95321c325 (patch)
tree5fa2fc4b1c2d632c74ed76dbf49473dce18f78dd /results.gtpl
parentbec4e596415c623d7294ec87680bc029e407fc23 (diff)
rewrite
Diffstat (limited to 'results.gtpl')
-rw-r--r--results.gtpl34
1 files changed, 34 insertions, 0 deletions
diff --git a/results.gtpl b/results.gtpl
new file mode 100644
index 0000000..39e2a32
--- /dev/null
+++ b/results.gtpl
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<body>
+<h1>Search Results</h1>
+<p>Showing results for <b>{{.OriginalQuery.Query}}</b></p>
+<p>Go <a href="/">home</a></p>
+<p>Showing {{.NumResults}} of {{.TotalResults}}</p>
+ <table border="1">
+ <tr>
+ <th>510(k) Number</th>
+ <th>Title</th>
+ <th>Applicant</th>
+ <th>Submission Date</th>
+ <th>Predicates</th>
+ </tr>
+ {{ range .SearchResults }}
+ <tr>
+ <td><a href="https://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfPMN/pmn.cfm?ID={{.id}}">{{ .id }}</a></td>
+ <td>{{ .title }}</td>
+ <td>{{ .applicant }}</td>
+ <td>{{ .submission_date }}</td>
+ <td>{{ range .predicates}}
+ <a href="https://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfPMN/pmn.cfm?ID={{.}}">{{ . }}</a>,
+ {{ end }}
+ </td>
+ </tr>
+ {{ end }}
+ </table>
+ {{ if .MoreResults }}
+ <a href="/search?query={{.OriginalQuery.Query}}&offset={{.LastOffset}}"> <p>Previous Page</p></a>
+ <a href="/search?query={{.OriginalQuery.Query}}&offset={{.Offset}}"> <p>Next Page</p></a>
+ {{ end }}
+</body>
+</html> \ No newline at end of file