diff --git a/app/admin/routes.py b/app/admin/routes.py index 67739edc..66d02f00 100644 --- a/app/admin/routes.py +++ b/app/admin/routes.py @@ -52,10 +52,12 @@ def users(): @register_breadcrumb(bp, '.users.entity', '', dynamic_list_constructor=user_dlc) def user(user_id): user = User.query.get_or_404(user_id) + corpora = Corpus.query.filter(Corpus.user == user).all() return render_template( 'admin/user.html.j2', title=user.username, - user=user + user=user, + corpora=corpora ) diff --git a/app/templates/admin/corpora.html.j2 b/app/templates/admin/corpora.html.j2 index e3f89d98..90a4b28e 100644 --- a/app/templates/admin/corpora.html.j2 +++ b/app/templates/admin/corpora.html.j2 @@ -21,7 +21,7 @@ corpusList.add( [ {% for corpus in corpora %} - {{ corpus.to_json_serializeable(backrefs=True)|tojson }}, + {{ corpus.to_json_serializeable(backrefs=True,relationships=True)|tojson }}, {% endfor %} ] ); diff --git a/app/templates/admin/user.html.j2 b/app/templates/admin/user.html.j2 index 82c8723d..1fbe4c6d 100644 --- a/app/templates/admin/user.html.j2 +++ b/app/templates/admin/user.html.j2 @@ -56,7 +56,7 @@