From 789f1bd968de69484be34d1522b531611a35eb2b Mon Sep 17 00:00:00 2001 From: fabfou Date: Wed, 14 May 2014 22:47:05 +0200 Subject: [PATCH] Move debug page from /settings/debug to /debug closes #2743 - remove settings/debug route and associated files - reimplementation at debug route --- .../controllers/{settings => }/debug.js | 0 core/client/router.js | 1 - core/client/routes/debug.js | 12 +++- core/client/routes/settings/debug.js | 11 ---- core/client/templates/debug.hbs | 56 +++++++++++++++++++ core/client/templates/settings/debug.hbs | 41 -------------- 6 files changed, 65 insertions(+), 56 deletions(-) rename core/client/controllers/{settings => }/debug.js (100%) delete mode 100644 core/client/routes/settings/debug.js create mode 100644 core/client/templates/debug.hbs delete mode 100644 core/client/templates/settings/debug.hbs diff --git a/core/client/controllers/settings/debug.js b/core/client/controllers/debug.js similarity index 100% rename from core/client/controllers/settings/debug.js rename to core/client/controllers/debug.js diff --git a/core/client/router.js b/core/client/router.js index a82e078e89..1f7cc03568 100644 --- a/core/client/router.js +++ b/core/client/router.js @@ -21,7 +21,6 @@ Router.map(function () { this.resource('settings', function () { this.route('general'); this.route('user'); - this.route('debug'); this.route('apps'); }); this.route('debug'); diff --git a/core/client/routes/debug.js b/core/client/routes/debug.js index 3fcacfec8b..1a503b2fa1 100644 --- a/core/client/routes/debug.js +++ b/core/client/routes/debug.js @@ -1,6 +1,12 @@ -var DebugRoute = Ember.Route.extend({ - beforeModel: function () { - this.transitionTo('settings.debug'); +import styleBody from 'ghost/mixins/style-body'; +import SettingsModel from 'ghost/models/settings'; + +var settingsModel = SettingsModel.create(); + +var DebugRoute = Ember.Route.extend(styleBody, { + classNames: ['settings'], + model: function () { + return settingsModel; } }); diff --git a/core/client/routes/settings/debug.js b/core/client/routes/settings/debug.js deleted file mode 100644 index e6f18b64b4..0000000000 --- a/core/client/routes/settings/debug.js +++ /dev/null @@ -1,11 +0,0 @@ -import SettingsModel from 'ghost/models/settings'; - -var settingsModel = SettingsModel.create(); - -var DebugRoute = Ember.Route.extend({ - model: function () { - return settingsModel; - } -}); - -export default DebugRoute; diff --git a/core/client/templates/debug.hbs b/core/client/templates/debug.hbs new file mode 100644 index 0000000000..016bc988e3 --- /dev/null +++ b/core/client/templates/debug.hbs @@ -0,0 +1,56 @@ +
+ + +
+
+

General

+
+
+
+
+
+ + Export +

Export the blog settings and data.

+
+
+
+ {{#gh-form id="settings-import" enctype="multipart/form-data"}} +
+
+ + {{file-upload onUpload="importData" uploadButtonText=uploadButtonText}} +

Import from another Ghost installation. If you import a user, this will replace the current user & log you out.

+
+
+ {{/gh-form}} +
+
+
+ + Delete +

Delete all posts and tags from the database.

+
+
+
+
+
+
+ + +

Sends a test email to your address.

+
+
+
+
+
+
diff --git a/core/client/templates/settings/debug.hbs b/core/client/templates/settings/debug.hbs deleted file mode 100644 index 03e67dccf1..0000000000 --- a/core/client/templates/settings/debug.hbs +++ /dev/null @@ -1,41 +0,0 @@ -
-

General

-
-
-
-
-
- - Export -

Export the blog settings and data.

-
-
-
- {{#gh-form id="settings-import" enctype="multipart/form-data"}} -
-
- - {{file-upload onUpload="importData" uploadButtonText=uploadButtonText}} -

Import from another Ghost installation. If you import a user, this will replace the current user & log you out.

-
-
- {{/gh-form}} -
-
-
- - Delete -

Delete all posts and tags from the database.

-
-
-
-
-
-
- - -

Sends a test email to your address.

-
-
-
-