mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 00:45:44 +01:00
improve web interface navigation
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
var debug = typeof console != 'undefined';
|
||||
|
||||
var state = null;
|
||||
var admin = false;
|
||||
|
||||
// sonia.scm.api.rest.resources.UserResource.DUMMY_PASSWORT
|
||||
var dummyPassword = '__dummypassword__';
|
||||
@@ -50,6 +51,7 @@ function loadState(s){
|
||||
console.debug( s );
|
||||
}
|
||||
state = s;
|
||||
admin = s.user.admin;
|
||||
// call login callback functions
|
||||
Ext.each(loginCallbacks, function(callback){
|
||||
if ( Ext.isFunction(callback) ){
|
||||
|
||||
@@ -109,7 +109,7 @@ Ext.onReady(function(){
|
||||
console.debug('create main menu');
|
||||
}
|
||||
var panel = Ext.getCmp('navigationPanel');
|
||||
panel.addSections([{
|
||||
panel.addSection({
|
||||
title: 'Main',
|
||||
items: [{
|
||||
label: 'Repositories',
|
||||
@@ -117,7 +117,10 @@ Ext.onReady(function(){
|
||||
addTabPanel('repositories', 'repositoryPanel', 'Repositories');
|
||||
}
|
||||
}]
|
||||
},{
|
||||
});
|
||||
|
||||
if ( admin ){
|
||||
panel.addSections([{
|
||||
title: 'Config',
|
||||
items: [{
|
||||
label: 'General',
|
||||
@@ -131,7 +134,9 @@ Ext.onReady(function(){
|
||||
}
|
||||
},{
|
||||
label: 'Server',
|
||||
fn: function(){console.debug( 'Server Config' );}
|
||||
fn: function(){
|
||||
console.debug( 'Server Config' );
|
||||
}
|
||||
}]
|
||||
},{
|
||||
title: 'Security',
|
||||
@@ -141,13 +146,18 @@ Ext.onReady(function(){
|
||||
addTabPanel('users', 'userPanel', 'Users');
|
||||
}
|
||||
}]
|
||||
},{
|
||||
}]);
|
||||
}
|
||||
|
||||
panel.addSection({
|
||||
title: 'Abmelden',
|
||||
items: [{
|
||||
label: 'Abmelden',
|
||||
fn: logout
|
||||
}]
|
||||
}]);
|
||||
});
|
||||
//fix hidden logout button
|
||||
panel.doLayout();
|
||||
}
|
||||
|
||||
function createWelcomePanel(){
|
||||
|
||||
Reference in New Issue
Block a user