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.footerView = new window.FooterView();
this.naviView = new window.NavigationView({ this.naviView = new window.NavigationView({
notificationCollection: this.notificationList notificationCollection: this.notificationList,
userCollection: window.userCollection
}); });
this.footerView.render(); this.footerView.render();
this.naviView.render(); this.naviView.render();

View File

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

View File

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

View File

@ -14,6 +14,7 @@
}, },
initialize: function () { initialize: function () {
this.userCollection = this.options.userCollection,
this.dbSelectionView = new window.DBSelectionView({ this.dbSelectionView = new window.DBSelectionView({
collection: window.arangoDatabase, collection: window.arangoDatabase,
current: window.currentDB current: window.currentDB
@ -37,7 +38,10 @@
isSystem: window.currentDB.get("isSystem") isSystem: window.currentDB.get("isSystem")
})); }));
this.dbSelectionView.render($("#dbSelect")); this.dbSelectionView.render($("#dbSelect"));
this.userBarView.render();
if (this.userCollection.whoAmI() !== null) {
this.userBarView.render();
}
this.statisticBarView.render($("#statisticBar")); this.statisticBarView.render($("#statisticBar"));
return this; return this;
}, },