1
0
Fork 0

moved 'user management' to 'tools' dropdown

This commit is contained in:
Guido Schwab 2014-02-21 11:14:23 +01:00
parent 09a77d0dd2
commit 2aa3f49bb1
4 changed files with 12 additions and 17 deletions

View File

@ -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();

View File

@ -23,6 +23,9 @@
<li class="dropdown-item">
<a id="api" class="internalLink" href="#api">API</a>
</li>
<li class="dropdown-item">
<a id="userManagement" class="internalLink" href="#api">User Management</a>
</li>
</ul>
</li>
<li class="dropdown" id="linkDropdown">

View File

@ -12,30 +12,17 @@
<ul class="user-dropdown-menu" id="user_dropdown">
<li class="dropdown-header" style="text-transform: none">
<%
if(username === null) {
%>User Management<%
} else {
if (name) {%>
if (name) {%>
<%=name%> (<%=username%>)
<% } else {%>
<%=username%>
<%}
}
%>
<% if(username !== null) { %>
<% } %>
<li class="dropdown-item">
<a id="userProfile" class="tab" href="#user">User profile</a>
</li>
<% } %>
<li class="dropdown-item">
<a id="userManagement" class="internalLink" href="#userManagement">User management</a>
</li>
<% if(username !== null) { %>
<li class="dropdown-item">
<a id="userLogout" class="tab" href="#user">Logout</a>
</li>
<% } %>
</ul>
</li>

View File

@ -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;
},