diff --git a/lib/gollum/frontend/public/gollum/css/gollum.css b/lib/gollum/frontend/public/gollum/css/gollum.css index 687b6ffd7..f6433338a 100755 --- a/lib/gollum/frontend/public/gollum/css/gollum.css +++ b/lib/gollum/frontend/public/gollum/css/gollum.css @@ -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 { diff --git a/lib/gollum/frontend/templates/layout.mustache b/lib/gollum/frontend/templates/layout.mustache index d79c4aad2..f6d1ceaeb 100644 --- a/lib/gollum/frontend/templates/layout.mustache +++ b/lib/gollum/frontend/templates/layout.mustache @@ -21,6 +21,7 @@ {{title}} +{{< user}} {{{yield}}} diff --git a/lib/gollum/frontend/templates/user.mustache b/lib/gollum/frontend/templates/user.mustache new file mode 100644 index 000000000..5d91f5708 --- /dev/null +++ b/lib/gollum/frontend/templates/user.mustache @@ -0,0 +1,10 @@ +
+

+ {{#user_authed}} + {{user_name}} | {{user_provider}} | [Logout] + {{/user_authed}} + {{^user_authed}} + not logged in | [Login] + {{/user_authed}} +

+

diff --git a/lib/gollum/frontend/views/layout.rb b/lib/gollum/frontend/views/layout.rb index 7defafb45..62e476424 100644 --- a/lib/gollum/frontend/views/layout.rb +++ b/lib/gollum/frontend/views/layout.rb @@ -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