From 823dedde417794893d9b5141ff4e8a3e8a5ff296 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Tue, 17 Oct 2023 22:20:40 +1100 Subject: [PATCH] Polish up notebook delete button Signed-off-by: Steve Cassidy --- src/routes.ts | 1 + views/notebooks.handlebars | 59 +++++++++++++++++++++++++++++++++----- 2 files changed, 53 insertions(+), 7 deletions(-) diff --git a/src/routes.ts b/src/routes.ts index 4b9fd1d7..a34f4aba 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -117,6 +117,7 @@ app.get('/notebooks/', requireAuthentication, async (req, res) => { res.render('notebooks', { user: user, notebooks: notebooks, + cluster_admin: userIsClusterAdmin(user), developer: DEVELOPER_MODE, }); } else { diff --git a/views/notebooks.handlebars b/views/notebooks.handlebars index 3cec79fd..062c13a1 100644 --- a/views/notebooks.handlebars +++ b/views/notebooks.handlebars @@ -14,9 +14,47 @@ {{this.name}} - {{#if ../developer}} + {{#if ../cluster_admin}} - + + + + {{/if}} @@ -58,7 +96,17 @@