mirror of https://gitee.com/bigwinds/arangodb
moved 'user management' to 'tools' dropdown
This commit is contained in:
parent
09a77d0dd2
commit
2aa3f49bb1
|
@ -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();
|
||||||
|
|
|
@ -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">
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue