Use more flash messages

This commit is contained in:
Eelco Dolstra 2013-10-03 19:54:22 +02:00
parent 383bc62803
commit 550bf210fe
3 changed files with 12 additions and 4 deletions

View file

@ -53,6 +53,8 @@ sub jobset_PUT {
my $uri = $c->uri_for($self->action_for("jobset"), [$c->stash->{project}->name, $c->stash->{jobset}->name]) . "#tabs-configuration";
$self->status_ok($c, entity => { redirect => "$uri" });
$c->flash->{successMsg} = "The jobset configuration has been updated.";
}
else {
@ -85,6 +87,8 @@ sub jobset_DELETE {
my $uri = $c->uri_for($c->controller('Project')->action_for("project"), [$c->stash->{project}->name]);
$self->status_ok($c, entity => { redirect => "$uri" });
$c->flash->{successMsg} = "The jobset has been deleted.";
}

View file

@ -59,6 +59,8 @@ sub project_PUT {
my $uri = $c->uri_for($self->action_for("project"), [$c->stash->{project}->name]) . "#tabs-configuration";
$self->status_ok($c, entity => { redirect => "$uri" });
$c->flash->{successMsg} = "The project configuration has been updated.";
}
else {
@ -95,6 +97,8 @@ sub project_DELETE {
my $uri = $c->res->redirect($c->uri_for("/"));
$self->status_ok($c, entity => { redirect => "$uri" });
$c->flash->{successMsg} = "The project has been deleted.";
}

View file

@ -67,17 +67,17 @@
[% IF flashMsg %]
<br />
<p class="btn-info btn-large">[% flashMsg %]</p>
<div class="alert alert-info">[% flashMsg %]</div>
[% END %]
[% IF successMsg %]
<br />
<p class="btn-success btn-large">[% successMsg %]</p>
<div class="alert alert-success">[% successMsg %]</div>
[% END %]
[% IF errorMsg %]
<br />
<p class="btn-warning btn-large">Error: [% errorMsg %]</p>
<div class="alert alert-warning">Error: [% errorMsg %]</div>
[% END %]
[% IF !hideHeader %]