public_index.html 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. {% extends "base.html" %}
  2. {% load static tz %}
  3. {% block body %}
  4. <div id="toolbar">
  5. <form id="changelist-search" action="{% url 'public-index' %}" method="get">
  6. <div>
  7. <label for="searchbar"><img src="/static/admin/img/search.svg" alt="Search"></label>
  8. <select name="query_type" id="query_type">
  9. <option value="all" selected>All</option>
  10. <option value="fulltext">Content</option>
  11. <option value="meta">Metadata</option>
  12. <option value="url">URL</option>
  13. <option value="title">Title</option>
  14. <option value="timestamp">Timestamp</option>
  15. <option value="tags">Tags</option>
  16. </select>
  17. <input type="text" size="40" name="q" value="" id="searchbar" autofocus placeholder="Title, URL, tags, timestamp, or content...".>
  18. <input type="submit" value="Search" style="height: 36px; padding-top: 6px; margin: 8px"/>
  19. <input type="button"
  20. value="♺"
  21. title="Refresh..."
  22. onclick="location.href='{% url 'public-index' %}'"
  23. style="background-color: rgba(121, 174, 200, 0.8); height: 30px; font-size: 0.8em; margin-top: 12px; padding-top: 6px; float:right">
  24. </input>
  25. &nbsp;
  26. &nbsp;
  27. {{ page_obj.start_index }}-{{ page_obj.end_index }} of {{ page_obj.paginator.count }} total
  28. &nbsp;
  29. (Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }})
  30. </div>
  31. </form>
  32. </div>
  33. <div style="width: 100%; overflow-x: auto;">
  34. <table id="table-bookmarks" style="width: 100%; table-layout: fixed">
  35. <thead>
  36. <tr>
  37. <th style="width: 132px">Bookmarked</th>
  38. <th>Snapshot ({{page_obj.paginator.count}})</th>
  39. <th style="width: 280px">Files</th>
  40. <th>Original URL</th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. {% for link in object_list %}
  45. {% include 'index_row.html' with link=link %}
  46. {% endfor %}
  47. </tbody>
  48. </table>
  49. </div>
  50. <br/>
  51. <center>
  52. Showing {{ page_obj.start_index }}-{{ page_obj.end_index }} of {{ page_obj.paginator.count }} total
  53. <br/>
  54. <span class="step-links">
  55. {% if page_obj.has_previous %}
  56. <a href="{% url 'public-index' %}?page=1">&laquo; first</a> &nbsp;
  57. <a href="{% url 'public-index' %}?page={{ page_obj.previous_page_number }}">previous</a>
  58. &nbsp;
  59. {% endif %}
  60. <span class="current">
  61. Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}
  62. </span>
  63. {% if page_obj.has_next %}
  64. &nbsp;
  65. <a href="{% url 'public-index' %}?page={{ page_obj.next_page_number }}">next </a> &nbsp;
  66. <a href="{% url 'public-index' %}?page={{ page_obj.paginator.num_pages }}">last &raquo;</a>
  67. {% endif %}
  68. </span>
  69. <br>
  70. </center>
  71. {% endblock %}