mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Shifts app UI behind config option
Closes #2287 - adds helper for checking whether to show apps UI or not - hides app UI from settings page
This commit is contained in:
parent
383da31484
commit
a92c8085c5
3 changed files with 22 additions and 1 deletions
|
@ -38,6 +38,11 @@
|
||||||
initialize: function (options) {
|
initialize: function (options) {
|
||||||
this.render();
|
this.render();
|
||||||
this.menu = this.$('.settings-menu');
|
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);
|
this.showContent(options.pane);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -327,6 +327,20 @@ coreHelpers.file_storage = function (context, options) {
|
||||||
return "true";
|
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 () {
|
coreHelpers.ghost_script_tags = function () {
|
||||||
var scriptList = isProduction ? scriptFiles.production : scriptFiles.development;
|
var scriptList = isProduction ? scriptFiles.production : scriptFiles.development;
|
||||||
|
|
||||||
|
@ -785,6 +799,8 @@ registerHelpers = function (adminHbs, assetHash) {
|
||||||
|
|
||||||
registerAdminHelper('file_storage', coreHelpers.file_storage);
|
registerAdminHelper('file_storage', coreHelpers.file_storage);
|
||||||
|
|
||||||
|
registerAdminHelper('apps', coreHelpers.apps);
|
||||||
|
|
||||||
registerAdminHelper('admin_url', coreHelpers.admin_url);
|
registerAdminHelper('admin_url', coreHelpers.admin_url);
|
||||||
|
|
||||||
registerAsyncAdminHelper('update_notification', coreHelpers.update_notification);
|
registerAsyncAdminHelper('update_notification', coreHelpers.update_notification);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{!< default}}
|
{{!< default}}
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<aside class="settings-sidebar" role="complementary">
|
<aside class="settings-sidebar" role="complementary" data-apps={{apps}}>
|
||||||
|
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue