public_index.html 3.7 KB

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