mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 21:33:24 +03:00
Move debug page from /settings/debug to /debug
closes #2743 - remove settings/debug route and associated files - reimplementation at debug route
This commit is contained in:
parent
6b1dd06364
commit
789f1bd968
@ -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');
|
||||
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -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;
|
56
core/client/templates/debug.hbs
Normal file
56
core/client/templates/debug.hbs
Normal file
@ -0,0 +1,56 @@
|
||||
<div class="wrapper">
|
||||
<aside class="settings-sidebar" role="complementary">
|
||||
<header>
|
||||
<h1 class="title">Ugly Debug Tools</h1>
|
||||
</header>
|
||||
<nav class="settings-menu">
|
||||
<ul>
|
||||
<li class="general"><a href="javascript:void(0);">General</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
<section class="settings-content active">
|
||||
<header>
|
||||
<h2 class="title">General</h2>
|
||||
</header>
|
||||
<section class="content">
|
||||
<form id="settings-export">
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<label>Export</label>
|
||||
<a class="button-save" {{bind-attr href=model.exportPath}}>Export</a>
|
||||
<p>Export the blog settings and data.</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
{{#gh-form id="settings-import" enctype="multipart/form-data"}}
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<label>Import</label>
|
||||
{{file-upload onUpload="importData" uploadButtonText=uploadButtonText}}
|
||||
<p>Import from another Ghost installation. If you import a user, this will replace the current user & log you out.</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/gh-form}}
|
||||
<form id="settings-resetdb">
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<label>Delete all Content</label>
|
||||
<a href="javascript:void(0);" class="button-delete js-delete" {{action "openModal" "deleteAll"}}>Delete</a>
|
||||
<p>Delete all posts and tags from the database.</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<form id="settings-testmail">
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<label>Send a test email</label>
|
||||
<button type="submit" id="sendtestmail" class="button-save" {{action "sendTestEmail"}}>Send</button>
|
||||
<p>Sends a test email to your address.</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
@ -1,41 +0,0 @@
|
||||
<header class="fade-in">
|
||||
<h2 class="title">General</h2>
|
||||
</header>
|
||||
<section class="content fade-in">
|
||||
<form id="settings-export">
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<label>Export</label>
|
||||
<a class="button-save" {{bind-attr href=model.exportPath}}>Export</a>
|
||||
<p>Export the blog settings and data.</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
{{#gh-form id="settings-import" enctype="multipart/form-data"}}
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<label>Import</label>
|
||||
{{file-upload onUpload="importData" uploadButtonText=uploadButtonText}}
|
||||
<p>Import from another Ghost installation. If you import a user, this will replace the current user & log you out.</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/gh-form}}
|
||||
<form id="settings-resetdb">
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<label>Delete all Content</label>
|
||||
<a href="javascript:void(0);" class="button-delete js-delete" {{action "openModal" "deleteAll"}}>Delete</a>
|
||||
<p>Delete all posts and tags from the database.</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<form id="settings-testmail">
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<label>Send a test email</label>
|
||||
<button type="submit" id="sendtestmail" class="button-save" {{action "sendTestEmail"}}>Send</button>
|
||||
<p>Sends a test email to your address.</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</section>
|
Loading…
Reference in New Issue
Block a user