Add admin backend to edit incident and change status

Also fixes Status Board display on homepage to show correct status on
each day. It was previously reusing the currnent status for all previous
days on which the incidents were open.
This commit is contained in:
2011-12-21 01:13:06 +00:00
parent 59dd99cca2
commit a119ca81d5
5 changed files with 94 additions and 10 deletions

View File

@@ -10,9 +10,21 @@ class StatusBoard_IncidentStatus extends StatusBoard_DatabaseObject {
protected $_db_description;
protected $_db_ctime;
protected function all_for_incident(StatusBoard_Incident $incident) {
public function all_for_incident(StatusBoard_Incident $incident) {
return static::all_for('incident', $incident->id);
}
public function newForIncident(StatusBoard_Incident $incident, $status, $description) {
$new_status = new self();
$new_status->incident = $incident->id;
$new_status->status = $status;
$new_status->description = $description;
$new_status->ctime = time();
$new_status->create();
return $new_status;
}
}
?>