From 2aa3f49bb14f3fcb6d1e5df6fb42648f8160187a Mon Sep 17 00:00:00 2001 From: Guido Schwab Date: Fri, 21 Feb 2014 11:14:23 +0100 Subject: [PATCH] moved 'user management' to 'tools' dropdown --- .../aardvark/frontend/js/routers/router.js | 3 ++- .../frontend/js/templates/navigationView.ejs | 3 +++ .../frontend/js/templates/userBarView.ejs | 17 ++--------------- .../frontend/js/views/navigationView.js | 6 +++++- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/js/apps/system/aardvark/frontend/js/routers/router.js b/js/apps/system/aardvark/frontend/js/routers/router.js index 1c5e8624cf..1ce7aecac5 100644 --- a/js/apps/system/aardvark/frontend/js/routers/router.js +++ b/js/apps/system/aardvark/frontend/js/routers/router.js @@ -72,7 +72,8 @@ this.footerView = new window.FooterView(); this.naviView = new window.NavigationView({ - notificationCollection: this.notificationList + notificationCollection: this.notificationList, + userCollection: window.userCollection }); this.footerView.render(); this.naviView.render(); diff --git a/js/apps/system/aardvark/frontend/js/templates/navigationView.ejs b/js/apps/system/aardvark/frontend/js/templates/navigationView.ejs index 87a8213a2f..93ab0006a5 100644 --- a/js/apps/system/aardvark/frontend/js/templates/navigationView.ejs +++ b/js/apps/system/aardvark/frontend/js/templates/navigationView.ejs @@ -23,6 +23,9 @@ + diff --git a/js/apps/system/aardvark/frontend/js/views/navigationView.js b/js/apps/system/aardvark/frontend/js/views/navigationView.js index 2ae28ddea1..edb74986f5 100644 --- a/js/apps/system/aardvark/frontend/js/views/navigationView.js +++ b/js/apps/system/aardvark/frontend/js/views/navigationView.js @@ -14,6 +14,7 @@ }, initialize: function () { + this.userCollection = this.options.userCollection, this.dbSelectionView = new window.DBSelectionView({ collection: window.arangoDatabase, current: window.currentDB @@ -37,7 +38,10 @@ isSystem: window.currentDB.get("isSystem") })); this.dbSelectionView.render($("#dbSelect")); - this.userBarView.render(); + + if (this.userCollection.whoAmI() !== null) { + this.userBarView.render(); + } this.statisticBarView.render($("#statisticBar")); return this; },