aboutsummaryrefslogtreecommitdiffstats
path: root/templates/base.html
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2012-09-20 02:50:07 +0200
committerbnewbold <bnewbold@robocracy.org>2012-09-20 02:50:07 +0200
commit627a217e7e74a6800475a9b3898855b26edd4a16 (patch)
tree64ca6d32ae3c21aa71ddb8a1cd2e458aed394a01 /templates/base.html
parente562f632fd2d56f9a0998a8f39ef7bcccb09f6ba (diff)
downloadbommom-627a217e7e74a6800475a9b3898855b26edd4a16.zip
bommom-627a217e7e74a6800475a9b3898855b26edd4a16.tar.gz
pseudo persona stuff
Diffstat (limited to 'templates/base.html')
-rw-r--r--templates/base.html20
1 files changed, 17 insertions, 3 deletions
diff --git a/templates/base.html b/templates/base.html
index 8066063..4fe66ad 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -2,6 +2,19 @@
<head>
<title>bommom</title>
<link rel="stylesheet" type="text/css" href="/static/default.css"></link>
+<script src="/static/include.js"></script>
+<script>
+function login() {
+ navigator.id.get(function(assertion) {
+ if (assertion) {
+ var assertion_field = document.getElementById("assertion-field");
+ assertion_field.value = assertion;
+ var login_form = document.getElementById("login-form");
+ login_form.submit();
+ }
+ });
+}
+</script>
</head>
<body>
@@ -12,10 +25,11 @@
{{ range .BreadCrumbs }} / {{.}} {{end}}
<div class="nav-collapse collapse">
<p class="navbar-text pull-right">
- {{ if .User }}
- {{ .User.Email }}
+ {{ if .Session.UserName }}
+ {{ .Session.UserName }}
+ <a href="/account/logout/"><button class="btn btn-mini" type="button" style="margin-left: 5px;">Log out!</button></a>
{{ else }}
- <button class="btn btn-mini disabled" type="button" style="margin-top: 9px;">Log in!</button>
+ <a href="/account/login/"><button class="btn btn-mini" type="button" style="margin-top: 9px;">Log in!</button></a>
{{ end }}
</p>
</div><!--/.nav-collapse -->