Implement flash messages
- configure session cookie security - setup flash message handling in newTemplateData - show flash message in base.html - add flash message for new motionmain
parent
f8fbf00c4d
commit
47092bfa9b
@ -1,54 +1,52 @@
|
|||||||
{{ define "base" }}
|
{{ define "base" }}
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>{{ template "title" . }} - CAcert Board Voting System</title>
|
<title>{{ template "title" . }} - CAcert Board Voting System</title>
|
||||||
<link rel="stylesheet" type="text/css" href="/static/lato-fonts.css">
|
<link rel="stylesheet" type="text/css" href="/static/lato-fonts.css">
|
||||||
<link rel="stylesheet" type="text/css" href="/static/semantic.min.css">
|
<link rel="stylesheet" type="text/css" href="/static/semantic.min.css">
|
||||||
<link rel="icon" href="/static/images/favicon.ico">
|
<link rel="icon" href="/static/images/favicon.ico">
|
||||||
</head>
|
</head>
|
||||||
<body id="cacert-board-voting">
|
<body id="cacert-board-voting">
|
||||||
<header class="pusher">
|
<header class="pusher">
|
||||||
<div class="ui vertical masthead center aligned segment">
|
<div class="ui vertical masthead center aligned segment">
|
||||||
<div class="ui left secondary container">
|
<div class="ui left secondary container">
|
||||||
<img src="/static/images/CAcert-logo-colour.svg" alt="CAcert" height="40rem"/>
|
<img src="/static/images/CAcert-logo-colour.svg" alt="CAcert" height="40rem"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui text container">
|
<div class="ui text container">
|
||||||
<h1 class="ui header">
|
<h1 class="ui header">
|
||||||
{{ template "title" . }}
|
{{ template "title" . }}
|
||||||
{{ if .User }}
|
{{ if .User }}
|
||||||
<span class="ui left pointing label">Authenticated as {{ .User.Name }} <{{ .User.Reminder }}>
|
<span class="ui left pointing label">Authenticated as {{ .User.Name }} <{{ .User.Reminder }}>
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</h1>
|
</h1>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</header>
|
||||||
</header>
|
{{ template "nav" . }}
|
||||||
{{ template "nav" . }}
|
<main class="ui container">
|
||||||
<main class="ui container">
|
{{ with .Flash }}
|
||||||
{{ template "main" . }}
|
<div class="basic segment">
|
||||||
{{ with .Flashes }}
|
<div class="ui info message">
|
||||||
<div class="basic segment">
|
<i class="close icon"></i>
|
||||||
<div class="ui info message">
|
<div class="ui list">
|
||||||
<i class="close icon"></i>
|
|
||||||
<div class="ui list">
|
|
||||||
{{ range . }}
|
|
||||||
<div class="ui item">{{ . }}</div>
|
<div class="ui item">{{ . }}</div>
|
||||||
{{ end }}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ template "main" . }}
|
||||||
|
</main>
|
||||||
|
<footer class="ui vertical footer segment">
|
||||||
|
<div class="ui container">
|
||||||
|
<span class="ui small text">© 2017-2022 CAcert Inc.</span>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
</footer>
|
||||||
</main>
|
</body>
|
||||||
<footer class="ui vertical footer segment">
|
<script src="/static/jquery.min.js"></script>
|
||||||
<div class="ui container">
|
<script src="/static/semantic.min.js"></script>
|
||||||
<span class="ui small text">© 2017-2022 CAcert Inc.</span>
|
<script src="/static/handlers.js"></script>
|
||||||
</div>
|
</html>
|
||||||
</footer>
|
|
||||||
</body>
|
|
||||||
<script src="/static/jquery.min.js"></script>
|
|
||||||
<script src="/static/semantic.min.js"></script>
|
|
||||||
<script src="/static/handlers.js"></script>
|
|
||||||
</html>
|
|
||||||
{{ end }}
|
{{ end }}
|
Loading…
Reference in New Issue