diff --git a/app/corpora/routes.py b/app/corpora/routes.py index 4c1ebd29..63af1b07 100644 --- a/app/corpora/routes.py +++ b/app/corpora/routes.py @@ -332,3 +332,12 @@ def remove_permission(corpus_id, user_id, permission): a.remove_permission(permission) db.session.commit() return 'ok' + +@bp.route('/public/') +def public_corpus(corpus_id): + corpus = Corpus.query.get_or_404(corpus_id) + return render_template( + 'corpora/public_corpus.html.j2', + corpus=corpus, + title=corpus.title + ) diff --git a/app/templates/corpora/corpus.html.j2 b/app/templates/corpora/corpus.html.j2 index 0f7b0bf4..c29da972 100644 --- a/app/templates/corpora/corpus.html.j2 +++ b/app/templates/corpora/corpus.html.j2 @@ -120,56 +120,5 @@ {{ super() }} {% endblock scripts %} diff --git a/app/templates/corpora/public_corpus.html.j2 b/app/templates/corpora/public_corpus.html.j2 new file mode 100644 index 00000000..f9cb4bc9 --- /dev/null +++ b/app/templates/corpora/public_corpus.html.j2 @@ -0,0 +1,86 @@ +{% extends "base.html.j2" %} +{% import "materialize/wtf.html.j2" as wtf %} + +{% block main_attribs %} class="service-scheme" data-service="corpus-analysis"{% endblock main_attribs %} + +{% block page_content %} +
+
+
+

{{ title }}

+
+
+
+
+

Description: {{ corpus.description }}

+
+

+
+
+

Creation date: {{ corpus.creation_date }}

+
+
+

Number of tokens used: {{ corpus.num_tokens }}

+
+
+
+
+
+
+
+{% endblock page_content %} + +{% block scripts %} +{{ super() }} + +{% endblock scripts %}