Link user menu button to the users profile

This commit is contained in:
Jonne Haß 2015-12-30 11:45:11 +01:00
parent 64b7aa10a6
commit f70cefb983
4 changed files with 4 additions and 3 deletions

View file

@ -85,7 +85,7 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li class="dropdown" id="user_menu"> <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"> <span class="user-avatar pull-left">
{{{personImage current_user "small"}}} {{{personImage current_user "small"}}}
</span> </span>

View file

@ -1,6 +1,6 @@
describe("app.views.Header", function() { describe("app.views.Header", function() {
beforeEach(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); loginAs(this.userAttrs);

View file

@ -4,6 +4,7 @@ describe("app.views.NotificationDropdown", function() {
gon.appConfig = {settings: {podname: "MyPod"}}; gon.appConfig = {settings: {podname: "MyPod"}};
this.header = new app.views.Header(); this.header = new app.views.Header();
$("header").prepend(this.header.el); $("header").prepend(this.header.el);
loginAs({guid: "foo"});
this.header.render(); this.header.render();
this.view = new app.views.NotificationDropdown({el: "#notification-dropdown"}); this.view = new app.views.NotificationDropdown({el: "#notification-dropdown"});
}); });

View file

@ -79,7 +79,7 @@ describe("app.views.Notifications", function(){
context("with a header", function() { context("with a header", function() {
beforeEach(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"}}; gon.appConfig = {settings: {podname: "MyPod"}};
this.header = new app.views.Header(); this.header = new app.views.Header();
$("header").prepend(this.header.el); $("header").prepend(this.header.el);