From 98d52f34c97bc3d2ac86d4159a46b7411e2d6cb2 Mon Sep 17 00:00:00 2001 From: Mo8it Date: Thu, 3 Mar 2022 03:13:06 +0100 Subject: [PATCH] Add custom details templates --- advlabdb/customClasses.py | 1 + advlabdb/templates/admin_details.html | 7 +++++++ advlabdb/templates/assistant_details.html | 7 +++++++ 3 files changed, 15 insertions(+) create mode 100644 advlabdb/templates/admin_details.html create mode 100644 advlabdb/templates/assistant_details.html diff --git a/advlabdb/customClasses.py b/advlabdb/customClasses.py index 5323152..48b2fd4 100644 --- a/advlabdb/customClasses.py +++ b/advlabdb/customClasses.py @@ -149,6 +149,7 @@ class SecureAdminModelView(CustomModelView): list_template = "admin_list.html" create_template = "admin_create.html" edit_template = "admin_edit.html" + details_template = "admin_details.html" def is_accessible(self): return adminViewIsAccessible() diff --git a/advlabdb/templates/admin_details.html b/advlabdb/templates/admin_details.html new file mode 100644 index 0000000..ffede7b --- /dev/null +++ b/advlabdb/templates/admin_details.html @@ -0,0 +1,7 @@ +{% from "macros.html" import information %} +{% extends "admin/model/details.html" %} + +{% block body %} +{{information(current_user, userActiveSemester, role="admin")}} +{{ super() }} +{% endblock %} \ No newline at end of file diff --git a/advlabdb/templates/assistant_details.html b/advlabdb/templates/assistant_details.html new file mode 100644 index 0000000..111f0ab --- /dev/null +++ b/advlabdb/templates/assistant_details.html @@ -0,0 +1,7 @@ +{% from "macros.html" import information %} +{% extends "admin/model/details.html" %} + +{% block body %} +{{information(current_user, userActiveSemester, role="assistant")}} +{{ super() }} +{% endblock %} \ No newline at end of file