From 1ab81931330fb830da3ca542a577bb99a5d95a7d Mon Sep 17 00:00:00 2001 From: chenshihai Date: Thu, 21 Jul 2022 09:26:18 +0800 Subject: [PATCH 1/2] kanban --- .gitignore | 1 + public/kanban/index.html | 12 ------------ templates/base/head.tmpl | 5 +++++ templates/base/head_course.tmpl | 5 +++++ templates/base/head_fluid.tmpl | 5 +++++ templates/base/head_home.tmpl | 5 +++++ templates/base/head_pro.tmpl | 5 +++++ 7 files changed, 26 insertions(+), 12 deletions(-) delete mode 100644 public/kanban/index.html diff --git a/.gitignore b/.gitignore index 9f34fea2a..02f379b0b 100644 --- a/.gitignore +++ b/.gitignore @@ -80,6 +80,7 @@ coverage.all /public/css /public/fonts /public/fomantic +/public/kanban /public/img/svg /VERSION diff --git a/public/kanban/index.html b/public/kanban/index.html deleted file mode 100644 index 0e44d84a3..000000000 --- a/public/kanban/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - -
kanban
- - diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 937abd588..4ab9da231 100755 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -109,6 +109,11 @@ ], {{end}} }; + {{if .IsSigned}} + window.sessionStorage.setItem('_csrf', '{{.CsrfToken}}'); + {{else}} + window.sessionStorage.removeItem('_csrf'); + {{end}} diff --git a/templates/base/head_course.tmpl b/templates/base/head_course.tmpl index 3fff0b8d2..fe21a0e05 100644 --- a/templates/base/head_course.tmpl +++ b/templates/base/head_course.tmpl @@ -109,6 +109,11 @@ ], {{end}} }; + {{if .IsSigned}} + window.sessionStorage.setItem('_csrf', '{{.CsrfToken}}'); + {{else}} + window.sessionStorage.removeItem('_csrf'); + {{end}} diff --git a/templates/base/head_fluid.tmpl b/templates/base/head_fluid.tmpl index 5340c7cb8..1c16e7140 100644 --- a/templates/base/head_fluid.tmpl +++ b/templates/base/head_fluid.tmpl @@ -109,6 +109,11 @@ ], {{end}} }; + {{if .IsSigned}} + window.sessionStorage.setItem('_csrf', '{{.CsrfToken}}'); + {{else}} + window.sessionStorage.removeItem('_csrf'); + {{end}} diff --git a/templates/base/head_home.tmpl b/templates/base/head_home.tmpl index 2def358f8..a77d7b00a 100644 --- a/templates/base/head_home.tmpl +++ b/templates/base/head_home.tmpl @@ -109,6 +109,11 @@ ], {{end}} }; + {{if .IsSigned}} + window.sessionStorage.setItem('_csrf', '{{.CsrfToken}}'); + {{else}} + window.sessionStorage.removeItem('_csrf'); + {{end}} diff --git a/templates/base/head_pro.tmpl b/templates/base/head_pro.tmpl index 75292b6fc..c643ea873 100644 --- a/templates/base/head_pro.tmpl +++ b/templates/base/head_pro.tmpl @@ -109,6 +109,11 @@ ], {{end}} }; + {{if .IsSigned}} + window.sessionStorage.setItem('_csrf', '{{.CsrfToken}}'); + {{else}} + window.sessionStorage.removeItem('_csrf'); + {{end}} From bf813e8c6be531e2b53fc5f9e8117faf26467294 Mon Sep 17 00:00:00 2001 From: chenshihai Date: Fri, 22 Jul 2022 09:13:56 +0800 Subject: [PATCH 2/2] update kanban entry menu --- templates/base/head_navbar.tmpl | 6 ++++-- templates/base/head_navbar_fluid.tmpl | 6 ++++-- templates/base/head_navbar_home.tmpl | 6 ++++-- templates/base/head_navbar_pro.tmpl | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index 51761a7e5..8dcca349c 100755 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -42,7 +42,8 @@ {{.i18n.Tr "explore.organizations"}} {{.i18n.Tr "explore.images"}} {{if .IsOperator}} - {{.i18n.Tr "explore.data_analysis"}} + {{/* {{.i18n.Tr "explore.data_analysis"}} */}} + {{.i18n.Tr "explore.data_analysis"}} {{end}} {{.i18n.Tr "custom.head.openi.repo"}} @@ -73,7 +74,8 @@ {{.i18n.Tr "explore.organizations"}} {{.i18n.Tr "explore.images"}} {{if .IsOperator}} - {{.i18n.Tr "explore.data_analysis"}} + {{/* {{.i18n.Tr "explore.data_analysis"}} */}} + {{.i18n.Tr "explore.data_analysis"}} {{end}} {{.i18n.Tr "custom.head.openi.repo"}} diff --git a/templates/base/head_navbar_fluid.tmpl b/templates/base/head_navbar_fluid.tmpl index 6baeced54..263e5333a 100644 --- a/templates/base/head_navbar_fluid.tmpl +++ b/templates/base/head_navbar_fluid.tmpl @@ -41,7 +41,8 @@ {{.i18n.Tr "explore.organizations"}} {{.i18n.Tr "explore.images"}} {{if .IsOperator}} - {{.i18n.Tr "explore.data_analysis"}} + {{/* {{.i18n.Tr "explore.data_analysis"}} */}} + {{.i18n.Tr "explore.data_analysis"}} {{end}} {{.i18n.Tr "custom.head.openi.repo"}} @@ -71,7 +72,8 @@ {{.i18n.Tr "explore.organizations"}} {{.i18n.Tr "explore.images"}} {{if .IsOperator}} - {{.i18n.Tr "explore.data_analysis"}} + {{/* {{.i18n.Tr "explore.data_analysis"}} */}} + {{.i18n.Tr "explore.data_analysis"}} {{end}} {{.i18n.Tr "custom.head.openi.repo"}} diff --git a/templates/base/head_navbar_home.tmpl b/templates/base/head_navbar_home.tmpl index c9ea13b8a..fb5868dce 100644 --- a/templates/base/head_navbar_home.tmpl +++ b/templates/base/head_navbar_home.tmpl @@ -33,7 +33,8 @@ {{.i18n.Tr "explore.organizations"}} {{.i18n.Tr "explore.images"}} {{if .IsOperator}} - {{.i18n.Tr "explore.data_analysis"}} + {{/* {{.i18n.Tr "explore.data_analysis"}} */}} + {{.i18n.Tr "explore.data_analysis"}} {{end}} {{.i18n.Tr "custom.head.openi.repo"}} @@ -64,7 +65,8 @@ {{.i18n.Tr "explore.organizations"}} {{.i18n.Tr "explore.images"}} {{if .IsOperator}} - {{.i18n.Tr "explore.data_analysis"}} + {{/* {{.i18n.Tr "explore.data_analysis"}} */}} + {{.i18n.Tr "explore.data_analysis"}} {{end}} {{.i18n.Tr "custom.head.openi.repo"}} diff --git a/templates/base/head_navbar_pro.tmpl b/templates/base/head_navbar_pro.tmpl index e744508f0..340f50f6b 100644 --- a/templates/base/head_navbar_pro.tmpl +++ b/templates/base/head_navbar_pro.tmpl @@ -43,7 +43,8 @@ {{.i18n.Tr "explore.organizations"}} {{.i18n.Tr "explore.images"}} {{if .IsOperator}} - {{.i18n.Tr "explore.data_analysis"}} + {{/* {{.i18n.Tr "explore.data_analysis"}} */}} + {{.i18n.Tr "explore.data_analysis"}} {{end}} {{.i18n.Tr "custom.head.openi.repo"}} @@ -74,7 +75,8 @@ {{.i18n.Tr "explore.organizations"}} {{.i18n.Tr "explore.images"}} {{if .IsOperator}} - {{.i18n.Tr "explore.data_analysis"}} + {{/* {{.i18n.Tr "explore.data_analysis"}} */}} + {{.i18n.Tr "explore.data_analysis"}} {{end}} {{.i18n.Tr "custom.head.openi.repo"}}