From 50889ccca57cea9166ab7c64a83d540d6c0a20ce Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sun, 23 Dec 2018 23:49:49 +0000 Subject: Add topic searching and topic discarding --- app/templates/base.html | 2 +- app/templates/macros/topics.html | 22 ++++++++++++----- app/templates/todo/topics.html | 53 +++++++++++++++++++++++++++++++++++++--- 3 files changed, 67 insertions(+), 10 deletions(-) (limited to 'app/templates') diff --git a/app/templates/base.html b/app/templates/base.html index 522e349..b3f467e 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -7,7 +7,7 @@ {% block title %}title{% endblock %} - {{ config.USER_APP_NAME }} - + {% block headextra %}{% endblock %} diff --git a/app/templates/macros/topics.html b/app/templates/macros/topics.html index a3d40c6..66d11b4 100644 --- a/app/templates/macros/topics.html +++ b/app/templates/macros/topics.html @@ -1,7 +1,6 @@ -{% macro render_topics_table(topics, show_author=True) -%} +{% macro render_topics_table(topics, show_author=True, show_discard=False) -%} - {% if show_author %}{% endif %} @@ -10,8 +9,7 @@ {% for topic in topics %} - - + @@ -24,8 +22,20 @@ {% endif %} - {% endfor %} diff --git a/app/templates/todo/topics.html b/app/templates/todo/topics.html index 4236a40..d2fcd28 100644 --- a/app/templates/todo/topics.html +++ b/app/templates/todo/topics.html @@ -5,11 +5,21 @@ Topics to be Added {% endblock %} {% block content %} + + {% if not show_discarded %} + Show + {% else %} + Hide + {% endif %} + + Discarded Topics + +

Topics to be Added

- {{ total - (topic_count) }} / {{ total }} packages have been added. - {{ topics | count }} remaining. + {{ total - (topic_count) }} / {{ total }} topics have been added as packages to CDB. + {{ topic_count }} remaining.

@@ -18,7 +28,7 @@ Topics to be Added {% from "macros/topics.html" import render_topics_table %} - {{ render_topics_table(topics) }} + {{ render_topics_table(topics, show_discard=True) }} {% endblock %} + +{% block scriptextra %} + + +{% endblock %} -- cgit v1.2.3
Id TitleAuthorActions
{{ topic.topic_id }}
[{{ topic.type.value }}] {{ topic.name or ""}} {% if topic.link %}{{ topic.link | domain }}{% endif %} - Create + + + Create + + {% if show_discard %} + + {% if topic.discarded %} + Show + {% else %} + Discard + {% endif %} + + {% endif %}