From 661ac7c509f83ca5272402646ac6d7b11e675e33 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Tue, 8 Aug 2023 11:28:10 +0200 Subject: [PATCH] Fix macro problems in corpus analysis --- .../corpora/_analysis/concordance.html.j2 | 4 ++-- .../_analysis/static_visualization.html.j2 | 21 +++++++++++-------- app/templates/corpora/analysis.html.j2 | 4 ++-- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/templates/corpora/_analysis/concordance.html.j2 b/app/templates/corpora/_analysis/concordance.html.j2 index a26c1a9a..6740425a 100644 --- a/app/templates/corpora/_analysis/concordance.html.j2 +++ b/app/templates/corpora/_analysis/concordance.html.j2 @@ -7,7 +7,7 @@ {% set description = 'Query your corpus with the CQP query language utilizing a KWIC view.' %} -{% macro container_element(id_prefix) %} +{% macro container_content(id_prefix) %}
@@ -187,4 +187,4 @@ } }); -{% endset %} +{% endmacro %} diff --git a/app/templates/corpora/_analysis/static_visualization.html.j2 b/app/templates/corpora/_analysis/static_visualization.html.j2 index c457cbf3..2abd34ec 100644 --- a/app/templates/corpora/_analysis/static_visualization.html.j2 +++ b/app/templates/corpora/_analysis/static_visualization.html.j2 @@ -1,12 +1,15 @@ +{# The extension icon #} +{% set icon = '' %} + +{# The extension name #} {% set name = 'Static Visualization (beta)' %} +{# The extension description #} {% set description = '' %} -{% set id_prefix = name.lower().replace(' ', '-') + '-extension' %} -{% set tab_content = '' %} - -{% set container_content %} +{# The extension container content #} +{% macro container_content(id_prefix) %}

query_stats{{ name }}

@@ -119,9 +122,9 @@
-{% endset %} +{% endmacro %} -{% set modals %} +{% macro modals(id_prefix) %} - {{ static_visualization_extension.container_content }} + {{ static_visualization_extension.container_content('static-visualizations-extension') }}