From 52fa23ff650d16761470ea5899b5403bbcf54a86 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch <p.jentsch@uni-bielefeld.de> Date: Thu, 9 Feb 2023 12:02:00 +0100 Subject: [PATCH] Fix some problems after merge --- app/corpora/routes.py | 3 ++- app/templates/corpora/corpus_public.html.j2 | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/corpora/routes.py b/app/corpora/routes.py index 3b591140..0312bf4c 100644 --- a/app/corpora/routes.py +++ b/app/corpora/routes.py @@ -80,10 +80,11 @@ def corpus(corpus_id): title='Corpus' ) else: - print('public') + corpus_files = [x.to_json_serializeable() for x in corpus.files] return render_template( 'corpora/corpus_public.html.j2', corpus=corpus, + corpus_files=corpus_files, title='Corpus' ) diff --git a/app/templates/corpora/corpus_public.html.j2 b/app/templates/corpora/corpus_public.html.j2 index 90a45f62..86356b87 100644 --- a/app/templates/corpora/corpus_public.html.j2 +++ b/app/templates/corpora/corpus_public.html.j2 @@ -76,7 +76,7 @@ if (response.status === 404) {app.flash('Not Found', 'error'); reject(response);} {# app.flash(`You are not following "{{ corpus.title }}" anymore`, 'corpus'); #} resolve(response); - window.location.href = '{{ url_for("corpora.public_corpus", corpus_id=corpus.id) }}'; + window.location.href = '{{ url_for("corpora.corpus", corpus_id=corpus.id) }}'; }, (response) => { app.flash('Something went wrong', 'error'); @@ -92,7 +92,7 @@ if (response.status === 403) {app.flash('Forbidden', 'error'); reject(response);} if (response.status === 404) {app.flash('Not Found', 'error'); reject(response);} {# app.flash(`You follow "{{ corpus.title }}" now`, 'corpus'); #} - window.location.href = '{{ url_for("corpora.public_corpus", corpus_id=corpus.id) }}'; + window.location.href = '{{ url_for("corpora.corpus", corpus_id=corpus.id) }}'; resolve(response); }, (response) => { -- GitLab