mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Add configuration option to hide visualizations from masthead
This commit is contained in:
@@ -66,24 +66,26 @@ const Collection = Backbone.Collection.extend({
|
||||
//
|
||||
// Visualization tab.
|
||||
//
|
||||
this.add({
|
||||
id: "visualization",
|
||||
title: _l("Visualize"),
|
||||
tooltip: _l("Visualize datasets"),
|
||||
disabled: !Galaxy.user.id,
|
||||
menu: [
|
||||
{
|
||||
title: _l("Create Visualization"),
|
||||
url: "visualizations",
|
||||
target: "__use_router__"
|
||||
},
|
||||
{
|
||||
title: _l("Interactive Environments"),
|
||||
url: "visualization/gie_list",
|
||||
target: "galaxy_main"
|
||||
}
|
||||
]
|
||||
});
|
||||
if (Galaxy.config.visualizations_visible) {
|
||||
this.add({
|
||||
id: "visualization",
|
||||
title: _l("Visualize"),
|
||||
tooltip: _l("Visualize datasets"),
|
||||
disabled: !Galaxy.user.id,
|
||||
menu: [
|
||||
{
|
||||
title: _l("Create Visualization"),
|
||||
url: "visualizations",
|
||||
target: "__use_router__"
|
||||
},
|
||||
{
|
||||
title: _l("Interactive Environments"),
|
||||
url: "visualization/gie_list",
|
||||
target: "galaxy_main"
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
// 'Shared Items' or Libraries tab.
|
||||
|
||||
@@ -1211,6 +1211,16 @@
|
||||
:Type: bool
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
``visualizations_visible``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:Description:
|
||||
Show visualization tab in masthead.
|
||||
:Default: ``true``
|
||||
:Type: bool
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
``message_box_visible``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -489,6 +489,7 @@ class GalaxyAppConfiguration(BaseAppConfiguration):
|
||||
self.brand = kwargs.get('brand', None)
|
||||
self.welcome_url = kwargs.get('welcome_url', '/static/welcome.html')
|
||||
self.show_welcome_with_login = string_as_bool(kwargs.get("show_welcome_with_login", "False"))
|
||||
self.visualizations_visible = string_as_bool(kwargs.get('visualizations_visible', True))
|
||||
# Configuration for the message box directly below the masthead.
|
||||
self.message_box_visible = string_as_bool(kwargs.get('message_box_visible', False))
|
||||
self.message_box_content = kwargs.get('message_box_content', None)
|
||||
|
||||
@@ -657,6 +657,9 @@ galaxy:
|
||||
# third-party server, tricking a Galaxy user to access said site.
|
||||
#enable_old_display_applications: true
|
||||
|
||||
# Show visualization tab in masthead.
|
||||
#visualizations_visible: true
|
||||
|
||||
# Show a message box under the masthead.
|
||||
#message_box_visible: false
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ class ConfigSerializer(base.ModelSerializer):
|
||||
'version_major' : _defaults_to(None),
|
||||
'require_login' : _defaults_to(None),
|
||||
'inactivity_box_content' : _defaults_to(None),
|
||||
'visualizations_visible' : _defaults_to(True),
|
||||
'message_box_content' : _defaults_to(None),
|
||||
'message_box_visible' : _defaults_to(False),
|
||||
'message_box_class' : _defaults_to('info'),
|
||||
|
||||
@@ -909,6 +909,13 @@ mapping:
|
||||
Galaxy server, but contains a redirect to a third-party server, tricking a
|
||||
Galaxy user to access said site.
|
||||
|
||||
visualizations_visible:
|
||||
type: bool
|
||||
default: true
|
||||
required: false
|
||||
desc: |
|
||||
Show visualization tab in masthead.
|
||||
|
||||
message_box_visible:
|
||||
type: bool
|
||||
default: false
|
||||
|
||||
Reference in New Issue
Block a user