Add contextual session login/logout to nav (#57)

This commit is contained in:
Chris Done 2014-12-15 13:00:30 +01:00
parent 1598423a6a
commit 5260b13767

View File

@ -9,7 +9,7 @@
<img src="/static/img/stackage.png" title="FP Complete"> <img src="/static/img/stackage.png" title="FP Complete">
<div> <div>
<ul class="nav"> <ul class="nav">
$forall route <- [AllSnapshotsR,UploadStackageR,AuthR LoginR] $forall route <- [AllSnapshotsR,UploadStackageR]
$maybe current <- cur $maybe current <- cur
$if route == current $if route == current
<li .active> <li .active>
@ -20,7 +20,15 @@
$nothing $nothing
<li> <li>
<a href=@{route}>#{route} <a href=@{route}>#{route}
$maybe Entity _ user <- muser
<li>
<a href=@{ProfileR}>
#{userDisplay user} (#{userHandle user})
<li>
<a href=@{AuthR LogoutR}>Logout
$nothing
<li>
<a href=@{AuthR LoginR}>Login
$maybe msg <- mmsg $maybe msg <- mmsg
<div .container> <div .container>