From d2425b62317043853ed7ce07e0fe3e359627b0dd Mon Sep 17 00:00:00 2001 From: Chris Mann Date: Sun, 23 Jul 2023 17:14:32 +0200 Subject: [PATCH] G Pas --- templates/home.html | 23 ++++++++++++++++++++++- templates/layout.html | 21 +-------------------- templates/login.html | 10 +++++++++- templates/passwd.html | 23 +++++++++++++++++++++++ templates/profile.html | 23 ++++++++++++++++++++++- 5 files changed, 77 insertions(+), 23 deletions(-) diff --git a/templates/home.html b/templates/home.html index 3f17fa1..ce43359 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,6 +1,27 @@ {{define "title"}}Home {{end}} - +{{define "admenu"}} +{{if .Login.CanAdmin}} +
  • Administrer LDAP + +
  • +{{end}} +{{if .Login}} +
  • Se déconnecter
  • +{{else}} +
  • Se connecter + +
  • +{{end}} +{{end}} {{define "body"}}
    diff --git a/templates/layout.html b/templates/layout.html index 24a3977..925aa78 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -55,26 +55,7 @@ - {{if .Login and .Login.CanAdmin}} -
  • Administrer LDAP - -
  • - {{end}} - {{if .Login}} -
  • Se déconnecter
  • - {{else}} -
  • Se connecter - -
  • - {{end}} + {{template "admenu" .}}
    diff --git a/templates/login.html b/templates/login.html index 251d4ca..91d26d0 100644 --- a/templates/login.html +++ b/templates/login.html @@ -1,6 +1,14 @@ {{define "title"}}LesGV.com{{end}} - +{{define "admenu"}} +
  • Se connecter + +
  • +{{end}} {{define "body"}}
    diff --git a/templates/passwd.html b/templates/passwd.html index 41f26a5..eb6c420 100644 --- a/templates/passwd.html +++ b/templates/passwd.html @@ -1,5 +1,28 @@ {{define "title"}}Mot de passe |{{end}} +{{define "admenu"}} +{{if .Login.CanAdmin}} +
  • Administrer LDAP + +
  • +{{end}} +{{if .Login}} +
  • Se déconnecter
  • +{{else}} +
  • Se connecter + +
  • +{{end}} +{{end}} + {{define "body"}}

    Modifier mon mot de passe

    diff --git a/templates/profile.html b/templates/profile.html index 32d4514..bf3b9a9 100644 --- a/templates/profile.html +++ b/templates/profile.html @@ -1,5 +1,26 @@ {{define "title"}}Profile |{{end}} - +{{define "admenu"}} +{{if .Login.CanAdmin}} +
  • Administrer LDAP + +
  • +{{end}} +{{if .Login}} +
  • Se déconnecter
  • +{{else}} +
  • Se connecter + +
  • +{{end}} +{{end}} {{define "body"}}

    Modifier mon profil