From 381ec547962e77b3014060f42605bb6e7738a6dd Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sun, 24 Oct 2021 23:35:44 +0200 Subject: [PATCH] Added page for UI for tag list --- server/app.py | 8 +++++++ server/templates/tag_list.htm | 41 +++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 server/templates/tag_list.htm diff --git a/server/app.py b/server/app.py index 7a40bb7..1c50df1 100644 --- a/server/app.py +++ b/server/app.py @@ -249,6 +249,14 @@ def show_stats(): } ) +@flask_app.route("/tag") +def show_tag(): + tag_list: List[Tag] = Tag.select() + return render_template( + "tag_list.htm", + tag_list=tag_list, + ) + @flask_app.route("/debug/test") def test(): diff --git a/server/templates/tag_list.htm b/server/templates/tag_list.htm new file mode 100644 index 0000000..05b8c5d --- /dev/null +++ b/server/templates/tag_list.htm @@ -0,0 +1,41 @@ +{% import "macros.htm" as macros %} + + + {% set title = tag_list | length | string + " Tags known" %} + + + {{ title }} + {{ macros.shared_style() }} + + +

{{ title }}

+ + + + + + + + + {% for tag in tag_list %} + + + + + + + + {% endfor %} +
IdTitleUse for Pref.Super TagsSub Tags
+ {{ tag.id }} + + {{ tag.title }} + + {{ tag.use_for_preferences | tenary("Yes", "no") }} + + {{ tag.super_tag_list | map(attribute="id") | join(",") }} + + {{ tag.sub_tag_list | map(attribute="id") | join(",") }} +
+ +