mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
Merge pull request #2294 from shashankmehta/apps-config
Shifts app UI behind config option
This commit is contained in:
commit
585ea121a4
@ -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);
|
||||
},
|
||||
|
||||
|
@ -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);
|
||||
|
@ -1,6 +1,6 @@
|
||||
{{!< default}}
|
||||
<div class="wrapper">
|
||||
<aside class="settings-sidebar" role="complementary">
|
||||
<aside class="settings-sidebar" role="complementary" data-apps={{apps}}>
|
||||
|
||||
</aside>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user