Added toggling of actioned on feedback, and view change for lists

This commit is contained in:
Tom Bloor 2017-10-23 16:09:20 +01:00
parent 0302a3d299
commit de90fe1f77
6 changed files with 50 additions and 5 deletions

View file

@ -33,4 +33,19 @@ sub read {
}
}
sub actioned {
my $c = shift;
my $id = $c->param('id');
if ( my $feedback = $c->result_set->find($id) ) {
$feedback->actioned( ! $feedback->actioned );
$feedback->update;
$c->redirect_to( '/admin/feedback/' . $id );
} else {
$c->flash( error => 'No Feedback found' );
$c->redirect_to( '/admin/feedback' );
}
}
1;