Added a function to delete events.
Currently this only allows single events to be deleted.
This commit is contained in:
parent
0b5a215dca
commit
bf2e46f512
|
@ -60,6 +60,16 @@ public function index() {
|
||||||
$this->set('event', $event);
|
$this->set('event', $event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function delete($id) {
|
||||||
|
if ($this->request->is('get')) {
|
||||||
|
throw new MethodNotAllowedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->Event->delete($id)) {
|
||||||
|
return $this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue