From: Aleksander Ɓukasz Date: Tue, 17 Dec 2013 16:22:37 +0000 (+0100) Subject: Bring back restore functionality X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/bee4a4aa8d638dcbcc91f2e511960f15f36630ce Bring back restore functionality --- diff --git a/apps/wiki/static/wiki/editor b/apps/wiki/static/wiki/editor index db307d84..e68778f2 160000 --- a/apps/wiki/static/wiki/editor +++ b/apps/wiki/static/wiki/editor @@ -1 +1 @@ -Subproject commit db307d848f244e349d6fd3bbfc5acef24d698862 +Subproject commit e68778f27b18c21c23387d7609d825ab3a192af7 diff --git a/apps/wiki/templates/wiki/bootstrap.html b/apps/wiki/templates/wiki/bootstrap.html index 1b4737a4..b4e3862d 100644 --- a/apps/wiki/templates/wiki/bootstrap.html +++ b/apps/wiki/templates/wiki/bootstrap.html @@ -28,6 +28,7 @@ documentSaveUrl: function(id) { return '/editor/text/' + id + '/'; }, documentHistoryUrl: function(id) { return '/editor/history/' + id + '/'}, documentDiffUrl: function(id) { return '/editor/diff/' + id + '/'; }, + documentRestoreUrl: function(id) { return '/editor/revert/' + id + '/'}, documentSaveForm: { fields: [ @@ -40,6 +41,13 @@ ], content_field_name: '{{forms.text_save.text.html_name}}', version_field_name: '{{forms.text_save.parent_revision.html_name}}' + }, + + documentRestoreForm: { + fields: [ + {label: '{{forms.text_revert.comment.label}}', name: '{{forms.text_revert.comment.html_name}}', type: 'textarea'} + ], + version_field_name: '{{forms.text_revert.revision.html_name}}' } }; @@ -54,6 +62,11 @@ {label: '{{forms.text_save.author_name.label}}', name: '{{forms.text_save.author_name.html_name}}', type: 'input', description: '{{forms.text_save.author_name.help_text}}'}, {label: '{{forms.text_save.author_email.label}}', name: '{{forms.text_save.author_email.html_name}}', type: 'input', description: '{{forms.text_save.author_email.help_text}}'} ); + + config.documentRevertForm.fields.push( + {label: '{{forms.text_revert.author_name.label}}', name: '{{forms.text_revert.author_name.html_name}}', type: 'input', description: '{{forms.text_revert.author_name.help_text}}'}, + {label: '{{forms.text_revert.author_email.label}}', name: '{{forms.text_revert.author_email.html_name}}', type: 'input', description: '{{forms.text_revert.author_email.help_text}}'} + ); {% endif %} {% autoescape off%}