Skip to content

Commit

Permalink
Add links and status for omniauth
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 authored and Arran Cudbard-Bell committed Jun 15, 2012
1 parent b785346 commit 32de2ca
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/gollum/frontend/public/gollum/css/gollum.css
Expand Up @@ -34,6 +34,14 @@ a:hover, a:visited {
text-decoration: underline;
}

/* @section user */
#user p {
text-align: right;
padding-right:0.5em;
font-size: .8em;
line-height: 2.0em;
color: #999;
}

/* @section head */
#head {
Expand Down
1 change: 1 addition & 0 deletions lib/gollum/frontend/templates/layout.mustache
Expand Up @@ -21,6 +21,7 @@
<title>{{title}}</title>
</head>
<body>
{{< user}}

{{{yield}}}

Expand Down
10 changes: 10 additions & 0 deletions lib/gollum/frontend/templates/user.mustache
@@ -0,0 +1,10 @@
<div id="user">
<p>
{{#user_authed}}
{{user_name}} | {{user_provider}} | <strong><a href="/__omnigollum__/logout">[Logout]</a></strong>
{{/user_authed}}
{{^user_authed}}
not logged in | <strong><a href="/__omnigollum__/login">[Login]</a></strong>
{{/user_authed}}
<p>
</div>
13 changes: 13 additions & 0 deletions lib/gollum/frontend/views/layout.rb
Expand Up @@ -15,6 +15,19 @@ def escaped_name
def title
"Home"
end

# Passthrough additional omniauth parameters for status bar
def user_authed
@user_authed
end

def user_provider
@user.provider
end

def user_name
@user.name
end
end
end
end

0 comments on commit 32de2ca

Please sign in to comment.