Link user menu button to the users profile
This commit is contained in:
parent
64b7aa10a6
commit
f70cefb983
4 changed files with 4 additions and 3 deletions
|
|
@ -85,7 +85,7 @@
|
|||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown" id="user_menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<a href="{{urlTo "person" current_user.guid}}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<span class="user-avatar pull-left">
|
||||
{{{personImage current_user "small"}}}
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
describe("app.views.Header", function() {
|
||||
beforeEach(function() {
|
||||
this.userAttrs = {name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}};
|
||||
this.userAttrs = {name: "alice", avatar: {small: "http://avatar.com/photo.jpg"}, guid: "foo" };
|
||||
|
||||
loginAs(this.userAttrs);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ describe("app.views.NotificationDropdown", function() {
|
|||
gon.appConfig = {settings: {podname: "MyPod"}};
|
||||
this.header = new app.views.Header();
|
||||
$("header").prepend(this.header.el);
|
||||
loginAs({guid: "foo"});
|
||||
this.header.render();
|
||||
this.view = new app.views.NotificationDropdown({el: "#notification-dropdown"});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ describe("app.views.Notifications", function(){
|
|||
|
||||
context("with a header", function() {
|
||||
beforeEach(function() {
|
||||
loginAs({name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}, notifications_count : 2});
|
||||
loginAs({name: "alice", avatar: {small: "http://avatar.com/photo.jpg"}, notifications_count: 2, guid: "foo"});
|
||||
gon.appConfig = {settings: {podname: "MyPod"}};
|
||||
this.header = new app.views.Header();
|
||||
$("header").prepend(this.header.el);
|
||||
|
|
|
|||
Loading…
Reference in a new issue