mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
Merge pull request #860 from JohnONolan/usermenu-data
This commit is contained in:
commit
643d9c1636
2 changed files with 4 additions and 3 deletions
|
@ -112,7 +112,8 @@ function ghostLocals(req, res, next) {
|
||||||
_.extend(res.locals, {
|
_.extend(res.locals, {
|
||||||
currentUser: {
|
currentUser: {
|
||||||
name: currentUser.attributes.name,
|
name: currentUser.attributes.name,
|
||||||
profile: currentUser.attributes.image
|
email: currentUser.attributes.email,
|
||||||
|
image: currentUser.attributes.image
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
next();
|
next();
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
<li id="usermenu" class="subnav">
|
<li id="usermenu" class="subnav">
|
||||||
<a href="#" data-toggle="ul" class="dropdown">
|
<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" />
|
<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}}Ghost{{/if}}</span>
|
<span class="name">{{#if currentUser.name}}{{currentUser.name}}{{else}}{{currentUser.email}}{{/if}}</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="overlay">
|
<ul class="overlay">
|
||||||
<li class="usermenu-profile"><a href="/ghost/settings/user/">Your Profile</a></li>
|
<li class="usermenu-profile"><a href="/ghost/settings/user/">Your Profile</a></li>
|
||||||
|
|
Loading…
Add table
Reference in a new issue