diff options
author | bnewbold <bnewbold@robocracy.org> | 2012-09-20 02:50:07 +0200 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2012-09-20 02:50:07 +0200 |
commit | 627a217e7e74a6800475a9b3898855b26edd4a16 (patch) | |
tree | 64ca6d32ae3c21aa71ddb8a1cd2e458aed394a01 /templates/base.html | |
parent | e562f632fd2d56f9a0998a8f39ef7bcccb09f6ba (diff) | |
download | bommom-627a217e7e74a6800475a9b3898855b26edd4a16.tar.gz bommom-627a217e7e74a6800475a9b3898855b26edd4a16.zip |
pseudo persona stuff
Diffstat (limited to 'templates/base.html')
-rw-r--r-- | templates/base.html | 20 |
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 --> |