diff --git a/profile.go b/profile.go index 84e7af2..f9de490 100644 --- a/profile.go +++ b/profile.go @@ -19,6 +19,7 @@ type ProfileTplData struct { GivenName string Surname string Description string + Login *LoginStatus } //ProfilePicture string @@ -34,6 +35,7 @@ func handleProfile(w http.ResponseWriter, r *http.Request) { data := &ProfileTplData{ Status: login, + Login: login, ErrorMessage: "", Success: false, } diff --git a/static/css/lesgv.css b/static/css/lesgv.css index 6082364..15d54f2 100644 --- a/static/css/lesgv.css +++ b/static/css/lesgv.css @@ -56,4 +56,10 @@ div.card { div.card-header { transform: rotate(180deg); writing-mode: vertical-lr; +} + +@media (max-width: 700px) { + div.card { + flex-direction: column; + } } \ No newline at end of file diff --git a/templates/profile.html b/templates/profile.html index ba8be2b..bf3b9a9 100644 --- a/templates/profile.html +++ b/templates/profile.html @@ -1,5 +1,14 @@ {{define "title"}}Profile |{{end}} {{define "admenu"}} +{{if .Login.CanAdmin}} +
  • Administrer LDAP + +
  • +{{end}} {{if .Login}}
  • Se déconnecter
  • {{else}}