Merge pull request #860 from JohnONolan/usermenu-data

This commit is contained in:
Hannah Wolfe 2013-09-26 12:06:16 +01:00
commit 643d9c1636
2 changed files with 4 additions and 3 deletions

View File

@ -112,7 +112,8 @@ function ghostLocals(req, res, next) {
_.extend(res.locals, {
currentUser: {
name: currentUser.attributes.name,
profile: currentUser.attributes.image
email: currentUser.attributes.email,
image: currentUser.attributes.image
}
});
next();

View File

@ -9,8 +9,8 @@
<li id="usermenu" class="subnav">
<a href="#" data-toggle="ul" class="dropdown">
<img class="avatar" src="{{#if currentUser.profile}}{{currentUser.profile}}{{else}}/shared/img/user-image.png{{/if}}" alt="Avatar" />
<span class="name">{{#if currentUser.name}}{{currentUser.name}}{{else}}Ghost{{/if}}</span>
<img class="avatar" src="{{#if currentUser.image}}{{currentUser.image}}{{else}}/shared/img/user-image.png{{/if}}" alt="Avatar" />
<span class="name">{{#if currentUser.name}}{{currentUser.name}}{{else}}{{currentUser.email}}{{/if}}</span>
</a>
<ul class="overlay">
<li class="usermenu-profile"><a href="/ghost/settings/user/">Your Profile</a></li>