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 committed Dec 7, 2013
1 parent d5e9183 commit 30857db
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/gollum/frontend/templates/user.mustache
Original file line number Diff line number Diff line change
@@ -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>
8 changes: 8 additions & 0 deletions lib/gollum/public/gollum/css/gollum.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,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/templates/layout.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<title>{{title}}</title>
</head>
<body>
{{< user}}
{{{yield}}}
Expand Down
12 changes: 12 additions & 0 deletions lib/gollum/views/layout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ def js # custom js
@js
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 30857db

Please sign in to comment.