Bootstrapify the Hydra forms (except the project and jobset edit pages)

Plus lots of other tweaks.
This commit is contained in:
Eelco Dolstra
2012-04-17 16:53:11 +02:00
parent 8f31935ffa
commit 51b920c875
36 changed files with 456 additions and 359 deletions
+5 -11
View File
@@ -116,6 +116,11 @@ sub edit : Chained('view') PathPart('edit') Args(0) {
sub submit : Chained('view') PathPart('submit') Args(0) {
my ($self, $c) = @_;
requireProjectOwner($c, $c->stash->{project});
if (($c->request->params->{submit} || "") eq "delete") {
$c->stash->{view}->delete;
$c->res->redirect($c->uri_for($c->controller('Project')->action_for('view'),
[$c->stash->{project}->name]));
}
txn_do($c->model('DB')->schema, sub {
updateView($c, $c->stash->{view});
});
@@ -123,17 +128,6 @@ sub submit : Chained('view') PathPart('submit') Args(0) {
}
sub delete : Chained('view') PathPart('delete') Args(0) {
my ($self, $c) = @_;
requireProjectOwner($c, $c->stash->{project});
txn_do($c->model('DB')->schema, sub {
$c->stash->{view}->delete;
});
$c->res->redirect($c->uri_for($c->controller('Project')->action_for('view'),
[$c->stash->{project}->name]));
}
sub latest : Chained('view') PathPart('latest') {
my ($self, $c, @args) = @_;