mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-29 05:55:28 -04:00
Implement searching individual fields
So far only for the public view, since we already have a custom search form there, where this is easy to add. This initial implementation supports the common set of metadata fields that the searchbar placeholder also mentions, but adding more fields is trivial.
This commit is contained in:
parent
8d1d39b21e
commit
10f0c4a077
2 changed files with 35 additions and 2 deletions
|
@ -6,6 +6,15 @@
|
|||
<form id="changelist-search" action="{% url 'public-index' %}" method="get">
|
||||
<div>
|
||||
<label for="searchbar"><img src="/static/admin/img/search.svg" alt="Search"></label>
|
||||
<select name="query_type" id="query_type">
|
||||
<option value="all" selected>All</option>
|
||||
<option value="fulltext">Content</option>
|
||||
<option value="meta">Metadata</option>
|
||||
<option value="url">URL</option>
|
||||
<option value="title">Title</option>
|
||||
<option value="timestamp">Timestamp</option>
|
||||
<option value="tags">Tags</option>
|
||||
</select>
|
||||
<input type="text" size="40" name="q" value="" id="searchbar" autofocus placeholder="Title, URL, tags, timestamp, or content...".>
|
||||
<input type="submit" value="Search" style="height: 36px; padding-top: 6px; margin: 8px"/>
|
||||
<input type="button"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue