/delete_action
action deletes this layout

Sourcecode in Layout/actions.js:
1:   function delete_action() {
2:      if (this.isDefaultLayout() || this.sharedBy.size() > 0) {
3:         res.message = new DenyException("layoutDelete");
4:         res.redirect(this._parent.href());
5:      }
6:      if (req.data.cancel)
7:         res.redirect(this._parent.href());
8:      else if (req.data.remove) {
9:         var href = this._parent.href();
10:        try {
11:           res.message = this._parent.deleteLayout(this);
12:           res.redirect(href);
13:        } catch (err) {
14:           res.message = err.toString();
15:           res.redirect(href);
16:        }
17:     }
18:  
19:     res.data.action = this.href(req.action);
20:     res.data.title = res.handlers.context.getTitle();
21:     var skinParam = {
22:        description: "the layout",
23:        detail: this.title
24:     };
25:     res.data.body = this.renderSkinAsString("delete", skinParam);
26:     res.handlers.context.renderSkin("page");
27:     return;
28:  }