diff --git a/core/client/views/settings.js b/core/client/views/settings.js index d6e745a7e2..8540d070ae 100644 --- a/core/client/views/settings.js +++ b/core/client/views/settings.js @@ -38,6 +38,11 @@ initialize: function (options) { this.render(); this.menu = this.$('.settings-menu'); + // Hides apps UI unless config.js says otherwise + // This will stay until apps UI is ready to ship + if ($(this.el).attr('data-apps') !== "true") { + this.menu.find('.apps').hide(); + } this.showContent(options.pane); }, diff --git a/core/server/helpers/index.js b/core/server/helpers/index.js index 90f4d0ce98..0b3ed32020 100644 --- a/core/server/helpers/index.js +++ b/core/server/helpers/index.js @@ -326,6 +326,20 @@ coreHelpers.file_storage = function (context, options) { return "true"; }; +// ### Apps helper +// +// *Usage example:* +// `{{apps}}` +// +// Returns the config value for apps. +coreHelpers.apps = function (context, options) { + /*jslint unparam:true*/ + if (config().hasOwnProperty('apps')) { + return config().apps.toString(); + } + return "false"; +}; + coreHelpers.ghost_script_tags = function () { var scriptList = isProduction ? scriptFiles.production : scriptFiles.development; @@ -786,6 +800,8 @@ registerHelpers = function (adminHbs, assetHash) { registerAdminHelper('file_storage', coreHelpers.file_storage); + registerAdminHelper('apps', coreHelpers.apps); + registerAdminHelper('admin_url', coreHelpers.admin_url); registerAsyncAdminHelper('update_notification', coreHelpers.update_notification); diff --git a/core/server/views/settings.hbs b/core/server/views/settings.hbs index 9ddbc5b628..253476f313 100644 --- a/core/server/views/settings.hbs +++ b/core/server/views/settings.hbs @@ -1,6 +1,6 @@ {{!< default}}
-