diff --git a/app/corpora/routes.py b/app/corpora/routes.py index 0312bf4c..f2cbac63 100644 --- a/app/corpora/routes.py +++ b/app/corpora/routes.py @@ -72,7 +72,7 @@ def corpus(corpus_id): db.session.commit() flash('Your changes have been saved') return redirect(url_for('.corpus', corpus_id=corpus.id)) - if corpus.user == current_user or current_user.is_administrator(): + if corpus.user == current_user: return render_template( 'corpora/corpus.html.j2', corpus_settings_form=corpus_settings_form, diff --git a/app/static/js/ResourceLists/PublicCorpusList.js b/app/static/js/ResourceLists/PublicCorpusList.js new file mode 100644 index 00000000..fdb2e9ed --- /dev/null +++ b/app/static/js/ResourceLists/PublicCorpusList.js @@ -0,0 +1,14 @@ +class PublicCorpusList extends CorpusList { + get item() { + return ` + + book +
+ + + send + + + `.trim(); + } +} diff --git a/app/templates/_scripts.html.j2 b/app/templates/_scripts.html.j2 index 64629b6c..53a0469c 100644 --- a/app/templates/_scripts.html.j2 +++ b/app/templates/_scripts.html.j2 @@ -22,6 +22,7 @@ 'js/ResourceLists/CorpusFileList.js', 'js/ResourceLists/PublicCorpusFileList.js', 'js/ResourceLists/CorpusList.js', + 'js/ResourceLists/PublicCorpusList.js', 'js/ResourceLists/JobList.js', 'js/ResourceLists/JobInputList.js', 'js/ResourceLists/JobResultList.js', diff --git a/app/templates/main/dashboard.html.j2 b/app/templates/main/dashboard.html.j2 index 5391a8af..0feba7b5 100644 --- a/app/templates/main/dashboard.html.j2 +++ b/app/templates/main/dashboard.html.j2 @@ -119,7 +119,7 @@ {% endblock scripts %}