mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-23 04:51:39 +02:00
@@ -1,10 +1,10 @@
|
||||
{{define "content"}}
|
||||
{{if .Message }}
|
||||
{{if .Infos.message }}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-4">
|
||||
<div class="alert alert-info p-3 text-center fs-3" role="alert">
|
||||
<i class="bi-info-circle-fill me-3"></i>
|
||||
{{.Message}}
|
||||
{{.Infos.message}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -9,11 +9,11 @@ import (
|
||||
"html/template"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/ClusterCockpit/cc-backend/internal/auth"
|
||||
"github.com/ClusterCockpit/cc-backend/internal/config"
|
||||
"github.com/ClusterCockpit/cc-backend/internal/util"
|
||||
"github.com/ClusterCockpit/cc-backend/pkg/log"
|
||||
"github.com/ClusterCockpit/cc-backend/pkg/schema"
|
||||
)
|
||||
@@ -48,7 +48,7 @@ func init() {
|
||||
}
|
||||
|
||||
if path == "templates/login.tmpl" {
|
||||
if _, err := os.Stat("./var/login.tmpl"); err == nil {
|
||||
if util.CheckFileExists("./var/login.tmpl") {
|
||||
log.Info("overwrite login.tmpl with local file")
|
||||
templates[strings.TrimPrefix(path, "templates/")] =
|
||||
template.Must(template.Must(base.Clone()).ParseFiles("./var/login.tmpl"))
|
||||
@@ -56,7 +56,7 @@ func init() {
|
||||
}
|
||||
}
|
||||
if path == "templates/imprint.tmpl" {
|
||||
if _, err := os.Stat("./var/imprint.tmpl"); err == nil {
|
||||
if util.CheckFileExists("./var/imprint.tmpl") {
|
||||
log.Info("overwrite imprint.tmpl with local file")
|
||||
templates[strings.TrimPrefix(path, "templates/")] =
|
||||
template.Must(template.Must(base.Clone()).ParseFiles("./var/imprint.tmpl"))
|
||||
@@ -64,7 +64,7 @@ func init() {
|
||||
}
|
||||
}
|
||||
if path == "templates/privacy.tmpl" {
|
||||
if _, err := os.Stat("./var/privacy.tmpl"); err == nil {
|
||||
if util.CheckFileExists("./var/privacy.tmpl") {
|
||||
log.Info("overwrite privacy.tmpl with local file")
|
||||
templates[strings.TrimPrefix(path, "templates/")] =
|
||||
template.Must(template.Must(base.Clone()).ParseFiles("./var/privacy.tmpl"))
|
||||
|
Reference in New Issue
Block a user