Skip to content
This repository has been archived by the owner on Sep 17, 2018. It is now read-only.

Commit

Permalink
Merge pull request ether#285 from Gared/master
Browse files Browse the repository at this point in the history
Delete pads
  • Loading branch information
Egil Möller committed Jul 14, 2011
2 parents 3091dd9 + 94b67ae commit bd3b396
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
26 changes: 26 additions & 0 deletions etherpad/src/etherpad/control/admincontrol.js
Original file line number Diff line number Diff line change
Expand Up @@ -1531,3 +1531,29 @@ function render_reset_subscription() {
content: body
});
}

function render_delete_pad() {
var body = DIV();
body.push("Delete Pad");
if (request.isGet) {
body.push(FORM({method: "POST"},
"padId: ", INPUT({type: "text", name: "padId"}),
BUTTON({name: "delete"}, "Delete")));
} else if (request.isPost) {
var localPadId = request.params.padId;
model.accessPadGlobal(localPadId, function(pad) {
collab_server.bootUsersFromPad(pad, "deleted");
pad.destroy();
});
dbwriter.taskFlushPad(localPadId, "delete");
}
body.push(A({href: request.path}, html("« back")));
renderHtml("admin/dynamic.ejs",
{
config: appjet.config,
bodyClass: 'nonpropad',
title: 'Delete Pad',
content: body
});

}
1 change: 1 addition & 0 deletions etherpad/src/themes/default/templates/admin/page.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ limitations under the License. */ %>
<ul>
<li><a href="/ep/admin/broadcast-message">Pad Broadcast</a></li>
<li><a href="/ep/admin/padinspector">Pad Inspector</a></li>
<li><a href="/ep/admin/delete-pad">Delete Pad</a></li>
<li><a href="/ep/admin/reset-subscription">Reset Subscription</a></li>
<% if (sessions.isAnEtherpadAdmin()) { %>
<li><a href="/ep/admin/setadminmode?v=false">Exit admin mode</a></li>
Expand Down

0 comments on commit bd3b396

Please sign in to comment.