From be7b92d6089712e12d99f98f8f673f0ec0dd1d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sascha=20I=C3=9Fbr=C3=BCcker?= Date: Sun, 14 Feb 2021 11:21:05 +0100 Subject: [PATCH] Implement archive view (#46) --- bookmarks/templates/bookmarks/archive.html | 34 +++++++++++++++++++++ bookmarks/templates/bookmarks/index.html | 31 +------------------ bookmarks/templates/bookmarks/nav_menu.html | 4 +++ bookmarks/templates/bookmarks/search.html | 33 ++++++++++++++++++++ bookmarks/urls.py | 1 + bookmarks/views/bookmarks.py | 28 ++++++++++++----- 6 files changed, 94 insertions(+), 37 deletions(-) create mode 100644 bookmarks/templates/bookmarks/archive.html create mode 100644 bookmarks/templates/bookmarks/search.html diff --git a/bookmarks/templates/bookmarks/archive.html b/bookmarks/templates/bookmarks/archive.html new file mode 100644 index 0000000..9f4f0e8 --- /dev/null +++ b/bookmarks/templates/bookmarks/archive.html @@ -0,0 +1,34 @@ +{% extends "bookmarks/layout.html" %} +{% load static %} +{% load shared %} +{% load bookmarks %} + +{% block content %} +
+ + {# Bookmark list #} +
+
+

Archived bookmarks

+
+ {% include 'bookmarks/search.html' %} +
+ + {% if empty %} + {% include 'bookmarks/empty_bookmarks.html' %} + {% else %} + {% bookmark_list bookmarks return_url %} + {% endif %} +
+ + {# Tag list #} +
+
+

Tags

+
+ {% tag_cloud tags %} +
+
+ + +{% endblock %} diff --git a/bookmarks/templates/bookmarks/index.html b/bookmarks/templates/bookmarks/index.html index 8c0ff03..efb3683 100644 --- a/bookmarks/templates/bookmarks/index.html +++ b/bookmarks/templates/bookmarks/index.html @@ -11,17 +11,7 @@

Bookmarks

- + {% include 'bookmarks/search.html' %}
{% if empty %} @@ -40,24 +30,5 @@ - {# Replace search input with auto-complete component #} - {% endblock %} diff --git a/bookmarks/templates/bookmarks/nav_menu.html b/bookmarks/templates/bookmarks/nav_menu.html index 4cb5a28..aa4922a 100644 --- a/bookmarks/templates/bookmarks/nav_menu.html +++ b/bookmarks/templates/bookmarks/nav_menu.html @@ -1,6 +1,7 @@ {# Basic menu list #}
Add bookmark + Archive Bookmarklet Settings Logout @@ -16,6 +17,9 @@