Skip to content

Commit

Permalink
change 'register or login' to just 'login' if 'allow_user_creation=Fa…
Browse files Browse the repository at this point in the history
…lse'
  • Loading branch information
scholtalbers committed Jun 28, 2017
1 parent 40cd2df commit 9af36bd
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 29 deletions.
51 changes: 32 additions & 19 deletions client/galaxy/scripts/layout/menu.js
Expand Up @@ -222,25 +222,38 @@ var Collection = Backbone.Collection.extend({
// User tab.
//
if ( !Galaxy.user.id ){
var userTab = {
id : 'user',
title : _l('Login or Register'),
cls : 'loggedout-only',
tooltip : _l('Account registration or login'),
menu : [{
title : _l('Login'),
url : 'user/login',
target : 'galaxy_main',
noscratchbook : true
}]
};
options.allow_user_creation && userTab.menu.push({
title : _l('Register'),
url : 'user/create',
target : 'galaxy_main',
noscratchbook : true
});
this.add( userTab );
if ( options.allow_user_creation ) {
var userTab = {
id : 'user',
title : _l('Login or Register'),
cls : 'loggedout-only',
tooltip : _l('Account registration or login'),
menu : [{
title : _l('Login'),
url : 'user/login',
target : 'galaxy_main',
noscratchbook : true
}, {
title: _l('Register'),
url: 'user/create',
target: 'galaxy_main',
noscratchbook: true
}
]
};
this.add(userTab);
} else {
var userTab = {
id: 'user',
title: _l('Login'),
cls: 'loggedout-only',
tooltip: _l('Login'),
url: 'user/login',
target: 'galaxy_main',
noscratchbook: true
};
this.add(userTab);
}
} else {
var userTab = {
id : 'user',
Expand Down
2 changes: 1 addition & 1 deletion static/maps/layout/menu.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion static/scripts/bundled/admin.bundled.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/analysis.bundled.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions static/scripts/bundled/libs.bundled.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/libs.bundled.js.map

Large diffs are not rendered by default.

0 comments on commit 9af36bd

Please sign in to comment.