diff options
-rw-r--r-- | lib/serve.js | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/lib/serve.js b/lib/serve.js index 5090f0e..0d9b76b 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -4258,23 +4258,21 @@ Serve.prototype.drafts = function (path) { var composerUrl = self.app.render.toUrl(draft.url) + (form.composer_id ? '#' + encodeURIComponent(form.composer_id) : '') cb(null, ph('div', [ - ph('form', {method: 'post', action: composerUrl}, [ - hiddenInput('draft_id', id), - hiddenInput('restored_draft', '1'), - Object.keys(form).map(function (key) { - if (key === 'draft_id' || key === 'save_draft') return '' - return hiddenInput(key, draft.form[key]) - }), - ph('p', [ + ph('table', ph('tr', [ + ph('td', ph('form', {method: 'post', action: composerUrl}, [ + hiddenInput('draft_id', id), + hiddenInput('restored_draft', '1'), + Object.keys(form).map(function (key) { + if (key === 'draft_id' || key === 'save_draft') return '' + return hiddenInput(key, draft.form[key]) + }), ph('input', {type: 'submit', name: 'draft_edit', value: 'Edit'}) - ]) - ]), - ph('form', {method: 'post', action: ''}, [ - ph('p', [ + ])), + ph('td', ph('form', {method: 'post', action: ''}, [ ph('input', {type: 'submit', name: 'draft_discard', value: 'Discard', title: 'Discard draft'}) - ]) - ]), + ])) + ])), self.phPreview(content, {draftId: id}) ])) }) |