mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 22:54:27 -04:00

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.
74 lines
3.3 KiB
HTML
74 lines
3.3 KiB
HTML
{% extends "base.html" %}
|
|
{% load static tz %}
|
|
|
|
{% block body %}
|
|
<div id="toolbar">
|
|
<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"
|
|
value="♺"
|
|
title="Refresh..."
|
|
onclick="location.href='{% url 'public-index' %}'"
|
|
style="background-color: rgba(121, 174, 200, 0.8); height: 30px; font-size: 0.8em; margin-top: 12px; padding-top: 6px; float:right">
|
|
</input>
|
|
|
|
|
|
{{ page_obj.start_index }}-{{ page_obj.end_index }} of {{ page_obj.paginator.count }} total
|
|
|
|
(Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }})
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div style="width: 100%; overflow-x: auto;">
|
|
<table id="table-bookmarks" style="width: 100%; table-layout: fixed">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 132px">Bookmarked</th>
|
|
<th>Snapshot ({{page_obj.paginator.count}})</th>
|
|
<th style="width: 280px">Files</th>
|
|
<th>Original URL</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for link in object_list %}
|
|
{% include 'index_row.html' with link=link %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<br/>
|
|
<center>
|
|
Showing {{ page_obj.start_index }}-{{ page_obj.end_index }} of {{ page_obj.paginator.count }} total
|
|
<br/>
|
|
<span class="step-links">
|
|
{% if page_obj.has_previous %}
|
|
<a href="{% url 'public-index' %}?page=1">« first</a>
|
|
<a href="{% url 'public-index' %}?page={{ page_obj.previous_page_number }}">previous</a>
|
|
|
|
{% endif %}
|
|
|
|
<span class="current">
|
|
Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}
|
|
</span>
|
|
|
|
{% if page_obj.has_next %}
|
|
|
|
<a href="{% url 'public-index' %}?page={{ page_obj.next_page_number }}">next </a>
|
|
<a href="{% url 'public-index' %}?page={{ page_obj.paginator.num_pages }}">last »</a>
|
|
{% endif %}
|
|
</span>
|
|
<br>
|
|
</center>
|
|
{% endblock %}
|