From 4002cb74365d47d1cc8177e9d4abcc56b4bbe7aa Mon Sep 17 00:00:00 2001 From: Paul Balluff Date: Mon, 11 Jul 2022 18:24:12 +0200 Subject: [PATCH] #150 reverse display of concept tool relationship --- .../view/elements/conceptvar/reverse.html | 16 +++++++++++++++- flaskinventory/view/dgraph.py | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/flaskinventory/templates/view/elements/conceptvar/reverse.html b/flaskinventory/templates/view/elements/conceptvar/reverse.html index 1453209d..3cba4d5a 100644 --- a/flaskinventory/templates/view/elements/conceptvar/reverse.html +++ b/flaskinventory/templates/view/elements/conceptvar/reverse.html @@ -26,4 +26,18 @@ {% endif %} - \ No newline at end of file + +
+
+
Tools
+
These tools can measure this concept.
+ {% if entry.tools %} +
+
+ {% for tool in entry.tools %} +

{{ render_publication(tool) }}

+ {% endfor %} +
+ {% endif %} +
+
diff --git a/flaskinventory/view/dgraph.py b/flaskinventory/view/dgraph.py index a29bb3ef..3b8f6b6e 100644 --- a/flaskinventory/view/dgraph.py +++ b/flaskinventory/view/dgraph.py @@ -100,6 +100,7 @@ def get_entry(unique_name: str = None, uid: str = None, dgraph_type: str = None) query_fields += ''' datasets: ~concept_vars @filter(type("Dataset")) { uid name unique_name authors @facets published_date } corpus: ~concept_vars @filter(type("Corpus")) { uid name unique_name authors @facets published_date } + tool: ~concept_vars @filter(type("Tool")) { uid name unique_name authors @facets published_date } } } '''